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 wait-for-disk functionality to disk_setup (#1832645) #710

Closed
wants to merge 1 commit into from

Conversation

nibalizer
Copy link

Proposed Commit Message

Add wait-for-disk functionality to disk_setup

In a cloud environment, sometimes disks will attach while cloud-init is
running and get missed. This adds a configurable timeout to wait for
those disks.

LP: #1832645

summary: no more than 70 characters

A description of what the change being made is and why it is being
made, if the summary line is insufficient. The blank line above is
required. This should be wrapped at 72 characters, but otherwise has
no particular length requirements.

If you need to write multiple paragraphs, feel free.

LP: #NNNNNNN (replace with the appropriate bug reference or remove
this line entirely if there is no associated bug)

Additional Context

Test Steps

Checklist:

  • My code follows the process laid out in the documentation
  • I have updated or added any unit tests accordingly
  • I have updated or added any documentation accordingly

@nibalizer
Copy link
Author

This is a work in progress

cloudinit/config/cc_disk_setup.py Outdated Show resolved Hide resolved
cloudinit/config/cc_disk_setup.py Outdated Show resolved Hide resolved
@nibalizer nibalizer force-pushed the add_wait_for_disk branch 4 times, most recently from c97a0dd to d1515f4 Compare December 9, 2020 18:37
Copy link
Collaborator

@OddBloke OddBloke left a comment

Choose a reason for hiding this comment

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

Thanks for this branch @nibalizer! Some comments inline.

cloudinit/config/cc_disk_setup.py Outdated Show resolved Hide resolved
cloudinit/config/cc_disk_setup.py Outdated Show resolved Hide resolved
try:
if definition.get("timeout"):
util.wait_for_files([disk],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this move outside the try block here? This call failing would not really be a "Failed partitioning operation", and perhaps should not be ignored in the same way.

Copy link
Author

Choose a reason for hiding this comment

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

I took a whack at this, let me know if you think this works better.

In a cloud environment, sometimes disks will attach while cloud-init is
running and get missed. This adds a configurable timeout to wait for
those disks.
@github-actions
Copy link

Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close.

If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging mitechie, and he will ensure that someone takes a look soon.

(If the pull request is closed, please do feel free to reopen it if you wish to continue working on it.)

@github-actions github-actions bot added the stale-pr Pull request is stale; will be auto-closed soon label Jan 26, 2021
@github-actions github-actions bot closed this Feb 3, 2021
@HeroCC
Copy link

HeroCC commented Jun 29, 2021

Could this be reopened? This feature would be quite useful.

@TheRealFalcon
Copy link
Member

Github won't let us reopen this one because the base branch has changed, but we can certainly open a new PR referencing this one. @HeroCC or @nibalizer , are you interested in pushing this across the finish line? I think what we have currently looks good, but we'd need to also add/modify some unit testing before we'd be ready to merge it.

@dirien
Copy link

dirien commented Jul 22, 2021

Yeah stumled also on this on Equinix Metal... Would be nice to get this activated again...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale-pr Pull request is stale; will be auto-closed soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants