-
Notifications
You must be signed in to change notification settings - Fork 935
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
Storage: Avoid filling volume config on VolumeDBCreate
`
#14923
Draft
hamistao
wants to merge
20
commits into
canonical:main
Choose a base branch
from
hamistao:move_volume_config_filling
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
6e4bca9
lxd/storage/drivers/btrfs: Remove unused parameters
hamistao c02f46a
lxd/storage/drivers/common: Remove stale return value from `[F|f]illV…
hamistao fe4bcdb
lxd/storage/drivers: Remove stale return value from `FillVolumeConfig`
hamistao c08ac7f
lxd/storage/backend_lxd: Update `FillVolumeConfig` usage
hamistao 90e36f2
lxd/storage/utils: Update `FillVolumeConfig` usage
hamistao 5ee733d
lxd/storage/drivers/ceph: Remove stale return value from `FillVolumeC…
hamistao 300ddd4
lxd/storage/drivers/dir: Remove stale return value from `FillVolumeCo…
hamistao f5fa02c
lxd/storage/drivers/lvm: Remove stale return value from `FillVolumeCo…
hamistao 6a5c520
lxd/storage/drivers/powerflex: Remove stale return value from `FillVo…
hamistao a780860
lxd/storage/drivers/zfs: Remove stale return value from `FillVolumeCo…
hamistao adc44a5
lxd/storage/drivers/pure: Remove stale return value from `FillVolumeC…
hamistao 3c368f1
lxd/storage/utils: Don't fill up config on `VolumeDBCreate`
hamistao 64afc6d
lxd/storage/backend_lxd: Fill volume configuration on `GetNewVolume`
hamistao 9ff8f15
lxd/storage/backend_lxd: Add needed `FillVolumeConfig`
hamistao 6e9d608
lxd/storage/backend_lxd: Update comments
hamistao c7ceccb
lxd/storage/drivers/ceph: Pre-allocate `ret` slice (prealloc)
hamistao 1033993
lxd/storage/drivers/ceph: Avoid deprecated `RunCommand` (staticcheck)
hamistao e7c01f1
lxd/storage/drivers/common: Avoid deprecated `RunCommand` (staticcheck)
hamistao 827bf2a
lxd/storage/drivers/zfs: Avoid deprecated `RunCommand` (staticcheck)
hamistao 1497ea0
WIP
hamistao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont think we should use d.state.ShutdownCtx for anything mutating the disk, as Go will then forcefully kill the command, leaving it in an inconsistent state.
We've been bitten before by this in the past where we killed an ongoing ceph map command, which then left unrecoverable structures in the kernel and the system had to be rebooted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always useful to know some history, thanks for the insight!
I will make the necessary updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general if a command isnt mutating something we can use d.state.shutdownCtx to exit more quickly, but if we're mutating something it'd be better to let it finish in my view (ofc if thats going to take a long time and some cleanup is going to happen on error, such as writing a large file out and then removing it on error in a defer then that would be different).