-
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
lxc: Accept volume full name on detach
#14593
Conversation
68ff64f
to
20b1408
Compare
d1bcf4c
to
6491103
Compare
lxc/storage_volume.go
Outdated
@@ -323,26 +324,26 @@ func (c *cmdStorageVolumeAttachProfile) run(cmd *cobra.Command, args []string) e | |||
return errors.New(i18n.G("Missing pool name")) | |||
} | |||
|
|||
volName, volType := parseVolume("custom", args[1]) | |||
if volType != "custom" { | |||
return errors.New(i18n.G("Only \"custom\" volumes can be attached to instances")) |
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.
lets use backticks here to save needing the escaping
6201f0c
to
f73656e
Compare
tests failing, converted to draft |
Can we please update |
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.
Just a few small nits - thanks :)
@kadinsayani Sorry I am confused by this, why would it need ot be updated on this PR? |
Sorry, I was confused by the function naming - we don't need to update |
7f530e3
to
8b3dcca
Compare
@MggMuggins I happened to parse the volume name on |
8b3dcca
to
b54be69
Compare
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.
With the exception of 8128f85, I am happy to rebase over this.
b54be69
to
616c11c
Compare
All comments were addressed @kadinsayani @MggMuggins @tomponline |
65777f4
to
29c54c2
Compare
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
On attach and detach commands, only include custom volumes as those are the only ones attachable. Signed-off-by: hamistao <[email protected]>
This checks the device entry on `lxc config show`, checks that the entry is gone after detaching and tests detaching with the full volume name, e.g. custom/c1pool1. Signed-off-by: hamistao <[email protected]>
29c54c2
to
2ef5355
Compare
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.
Thanks!
@MggMuggins please feel free to make changes to this in your later PR that feel appropriate when being able to attached root disks too. Ta |
The completions suggest the volume name but the client doesn't parse it correctly and this has been annoying me, so I took some of my time off to fix it and also improved the completions for detach/attach commands. Along with other small improvements.