-
Notifications
You must be signed in to change notification settings - Fork 933
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
lxc: Handle volume rename in lxc storage volume move
command
#12348
Merged
tomponline
merged 2 commits into
canonical:main
from
monstermunchkin:issues/12344-storage-volumes
Oct 6, 2023
Merged
lxc: Handle volume rename in lxc storage volume move
command
#12348
tomponline
merged 2 commits into
canonical:main
from
monstermunchkin:issues/12344-storage-volumes
Oct 6, 2023
Conversation
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
When calling `lxc storage volume move` it internally always calls `lxc storage volume copy`. This in itself is not a problem. However, the `copy` handler expects LXD to always return an `OperationResponse`. This doesn't happen though as LXD will return a `SyncResponse` if it detects a move request. This changes the `move` handler to call `lxc storage volume rename` if it detects a rename request, instead of passing it to the `copy` handler. Fixes canonical#12344 Signed-off-by: Thomas Hipp <[email protected]>
tomponline
reviewed
Oct 5, 2023
Signed-off-by: Thomas Hipp <[email protected]>
tomponline
approved these changes
Oct 6, 2023
roosterfish
added a commit
to roosterfish/lxd
that referenced
this pull request
Oct 18, 2023
…is set This fixes a regression introduced in canonical#12348 which causes the `--destination-target` flag to be ignored. Instead if the destination flag is set when renaming a volume, use the handler for volume movements. When renaming a volume using `lxc storage volume move`, the args were passed to the handler behind `lxc storage volume rename` which does not support the `--destination-target` flag. Signed-off-by: Julian Pelizäus <[email protected]>
roosterfish
added a commit
to roosterfish/lxd
that referenced
this pull request
Oct 18, 2023
…is set This fixes a regression introduced in canonical#12348 which causes the `--destination-target` flag to be ignored. When renaming a volume using `lxc storage volume move`, the args were passed to the handler behind `lxc storage volume rename` which does not support the `--destination-target` flag. Instead if the destination flag is set when renaming a volume, use the handler for volume movements. Signed-off-by: Julian Pelizäus <[email protected]>
roosterfish
added a commit
to roosterfish/lxd
that referenced
this pull request
Nov 9, 2023
This fixes a regression introduced in canonical#12348. When the target project flag is set don't use the function for renaming volumes. Signed-off-by: Julian Pelizäus <[email protected]>
tomponline
pushed a commit
to tomponline/lxd
that referenced
this pull request
Dec 5, 2023
…is set This fixes a regression introduced in canonical#12348 which causes the `--destination-target` flag to be ignored. When renaming a volume using `lxc storage volume move`, the args were passed to the handler behind `lxc storage volume rename` which does not support the `--destination-target` flag. Instead if the destination flag is set when renaming a volume, use the handler for volume movements. Signed-off-by: Julian Pelizäus <[email protected]>
tomponline
pushed a commit
to tomponline/lxd
that referenced
this pull request
Dec 5, 2023
…is set This fixes a regression introduced in canonical#12348 which causes the `--destination-target` flag to be ignored. When renaming a volume using `lxc storage volume move`, the args were passed to the handler behind `lxc storage volume rename` which does not support the `--destination-target` flag. Instead if the destination flag is set when renaming a volume, use the handler for volume movements. Signed-off-by: Julian Pelizäus <[email protected]>
tomponline
pushed a commit
to tomponline/lxd
that referenced
this pull request
Dec 13, 2023
This fixes a regression introduced in canonical#12348. When the target project flag is set don't use the function for renaming volumes. Signed-off-by: Julian Pelizäus <[email protected]>
tomponline
pushed a commit
to tomponline/lxd
that referenced
this pull request
Dec 13, 2023
This fixes a regression introduced in canonical#12348. When the target project flag is set don't use the function for renaming volumes. Signed-off-by: Julian Pelizäus <[email protected]>
ganto
pushed a commit
to ganto/lxd
that referenced
this pull request
May 8, 2024
This fixes a regression introduced in canonical#12348. When the target project flag is set don't use the function for renaming volumes. Signed-off-by: Julian Pelizäus <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When calling
lxc storage volume move
it internally always callslxc storage volume copy
. This in itself is not a problem. However, thecopy
handler expects LXD to always return anOperationResponse
. Thisdoesn't happen though as LXD will return a
SyncResponse
if it detectsa move request.
This changes the
move
handler to calllxc storage volume rename
ifit detects a rename request, instead of passing it to the
copy
handler.
Fixes #12344
Signed-off-by: Thomas Hipp [email protected]