Skip to content

instrument pycloudlib failures in lxc delete /mnt/path --force - #231

Open
holmanb wants to merge 1 commit into
canonical:mainfrom
holmanb:holmanb/instrument-introspection
Open

instrument pycloudlib failures in lxc delete /mnt/path --force#231
holmanb wants to merge 1 commit into
canonical:mainfrom
holmanb:holmanb/instrument-introspection

Conversation

@holmanb

@holmanbholmanb commented Jan 12, 2023

Copy link
Copy Markdown
Member

Our integration tests are currently seeing lxd vm failures like the following:

failed on teardown with "RuntimeError: Failure (rc=1): Error: Stopping the instance failed: Failed unmounting instance: Failed to unmount "/var/snap/lxd/common/lxd/storage-pools/default/virtual-machines/cloudinit-0111-2315175ouu6z5k": device or resource busy"

Another example

Since lxd doesn't include diagnostic information required to understand why this is happening, I propose temporarily parsing the error message for the mount point and checking the mount for open files.

Update: almost 2 years later and the underlying issue hasn't been resolved and now we are seeing similar issues on lxd VM restarts as well. I just revived this PR because I'd like to get to the bottom of these failures, but for that we need more information. Triaging constant integration test failures is a waste of time and I don't see any better proposals at this currently.

No tests because this is just some simple instrumentation that I plan to rip out as soon as the underlying issue is resolved. It should only run in the failure path anyways so risk of breaking things is low.

This is a pretty ugly hackParsing lxd's error messages isn't ideal, so I didn't go further than open file checking before getting eyes on this. We may want/need to add checks for the various other causes of EBUSY. This is a common cause for EBUSY, so this could be enough, however if a reviewer is okay with the general approach I can also move forward with something a little more comprehensive than just checking for open files.

@blackboxswblackboxsw self-assigned this Jan 12, 2023
@holmanb
holmanbforce-pushed the holmanb/instrument-introspection branch from 1e2614c to 4b5b0bbCompareJanuary 18, 2023 02:29
@TheRealFalcon

Copy link
Copy Markdown
Contributor

@holmanb is this PR still relevant?

@holmanb

Copy link
Copy Markdown
MemberAuthor

@holmanb is this PR still relevant?

I think @blackboxsw was had preference for a different approach. I'll close it.

@holmanbholmanb closed this Mar 6, 2023
@holmanbholmanb reopened this Nov 23, 2024
@holmanb
holmanbforce-pushed the holmanb/instrument-introspection branch 3 times, most recently from 6ad7db0 to e25472fCompareNovember 23, 2024 02:19
@holmanb
holmanbforce-pushed the holmanb/instrument-introspection branch from e25472f to c0a4d8fCompareNovember 23, 2024 02:27
Sign up for freeto 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

@holmanb@TheRealFalcon@blackboxsw