-
Notifications
You must be signed in to change notification settings - Fork 931
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: Fix import of instance snapshots with underscores in their names #13899
Conversation
…rt in CreateInstanceFromBackup Fixes canonical#13879 Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
…dName Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
…pshot names Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
@@ -658,7 +658,11 @@ func ValidName(instanceName string, isSnapshot bool) error { | |||
return fmt.Errorf("Invalid instance name %q: %w", parentName, err) | |||
} | |||
|
|||
// Snapshot part is more flexible, but doesn't allow space or / character. | |||
// Snapshot part is more flexible, but doesn't allow "..", space or / characters. |
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.
Should we also reject *
?
$ lxc snapshot c1 '.*'
Error: Create instance snapshot: Failed to run: zfs snapshot -r default/containers/c1@snapshot-.*: exit status 1 (cannot create snapshot 'default/containers/c1@snapshot-.*': invalid character '*' in name
no snapshots were created)
And also @
and #
which have special meaning in ZFS at least.
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.
yeah maybe - although this might break users who've used snapshots with those chars in on non-zfs drivers.
From canonical/lxd#13899 Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
- Fix Dell Powerflex migrations from canonical/lxd#13934 - Fix snap preseed support from #532 - Fix snapshot importing from canonical/lxd#13899
- Fix for Oracular unprivileged containers from canonical/lxd#13820 - Fix snapshot importing from canonical/lxd#13899 - Fix Dell Powerflex migrations from canonical/lxd#13934 Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
- Fix Dell Powerflex migrations from canonical/lxd#13934 - Fix snap preseed support from #532 - Fix snapshot importing from canonical/lxd#13899 - Vendor apparmor and cherry-pick Oracular container fixes from #534
Fixes #13879
Closes #13897