Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add way for users to configure block-probing timeout #2073

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

ogayot
Copy link
Member

@ogayot ogayot commented Sep 4, 2024

Subiquity now supports two new options:

  • --no-block-probing-timeout to disable the block-probing timeout completely
  • --block-probing-timeout <seconds> to set the timeout to a specific value

In addition, we now make the subiquity snap configurable so that this CLI options can be used without modifying the snap.

To disable the timeout:

snap set subiquity block-probing-timeout=no

To set the timeout to a different value:

snap set subiquity block-probing-timeout=180

To reset the timeout to the default value:

snap unset subiquity block-probing-timeout

Based on the current snap configuration, the wrapper script (e.g., bin/subiquity-server) will invoke subiquity either with the --no-block-probing-timeout option, the --block-probing-timeout <seconds> option, or none).

Subiquity (the server) now supports two new options that allow one to
configure the block probing timeout:

Disable the timeout completely:

 * --no-block-probing-timeout

Set the timeout to a specific value (in seconds)

 * --block-probing-timeout 180

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Users can now set configuration on the subiquity snap. Currently we
support configuring the block probing tiemout only.

To set the timeout to a specific value:

 * snap set subiquity block-probing-timeout=180

To disable the timeout:

 * snap set subiquity block-probing-timeout=no

To revert to the default:

 * snap unset subiquity block-probing-timeout

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
@ogayot
Copy link
Member Author

ogayot commented Sep 4, 2024

CC @d-loose if this change is accepted, I would like to do the same in the ubuntu-desktop-bootstrap snap (desktop is the main driver for this).

Copy link
Collaborator

@mwhudson mwhudson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought "wow that looks a bit complicated" and then realized that the snap config bits are pretty much straight from the documentation! ho hum

Did you consider having the subiquity process dynamically fetch the snap value rather than this command line arg / restart server game? I guess that's harder to use in dry run mode.

@ogayot
Copy link
Member Author

ogayot commented Sep 5, 2024

I thought "wow that looks a bit complicated" and then realized that the snap config bits are pretty much straight from the documentation! ho hum

Yeah, I expected a way to declare the supported variables in the snapcraft.yaml and not write all these scripts but apparently there's no way around it..

Did you consider having the subiquity process dynamically fetch the snap value rather than this command line arg / restart server game? I guess that's harder to use in dry run mode.

The idea didn't cross my mind but it's surely a good idea. I think we need to update more of the code to support the timeout update without restart though. But will consider doing this later! (if we don't get rid of the timeout completely)

Copy link
Contributor

@Chris-Peterson444 Chris-Peterson444 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM. Although I am still slightly confused how this all gets set right within snapcraft.yaml, but if it works it works.

@ogayot ogayot merged commit a8bb999 into canonical:main Sep 9, 2024
12 checks passed
@ogayot ogayot deleted the block-probing-timeout branch September 9, 2024 07:49
d-loose added a commit to canonical/ubuntu-desktop-provision that referenced this pull request Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants