Skip to content
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

Backup instance config #6520

Merged
merged 9 commits into from Nov 28, 2019
Merged

Backup instance config #6520

merged 9 commits into from Nov 28, 2019

Conversation

@tomponline
Copy link
Member

tomponline commented Nov 27, 2019

  • Re-works backup yaml file updates during backup import to simplify storage layer restoration functions and moves into non-main package so can be accessed in future from new storage layer.
  • Also improves backup yaml pool update function to also update embedded snapshots pool property.
tomponline added 7 commits Nov 27, 2019
Moved from main package and cleaned up.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
…eInstanceConfigYamlFile

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
Replaced by backup.UpdateInstanceConfigStoragePool

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
- Removes need for customBool variable and instead will just always update backup.yaml file to use current storage pool.
- This simplifies the function signature needed later for pool.CreateInstanceFromBackup().

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
… longer updates snapshots backup.yaml

Several storage drivers do not make backup.yaml available during backup restore (for example BTRFS snapshots are read only, and ZFS needs to be mounted).

As such we should only update the pool name of the main volume's backup.yaml during backup restore.

We regenerate the backup.yaml file of snapshots when they are restored to the main instance instead.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
@tomponline tomponline force-pushed the tomponline:tp-backup-instance-config branch from 1001f11 to 1479cfb Nov 28, 2019
tomponline added 2 commits Nov 28, 2019
This check differentiates between a user specified pool from the CLI vs the pool contained within the backup.yaml.

If the latter pool doesn't exist then the project's default pool is used, however if the former doesn't exist then an error is returned.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
So that this can be done earlier on where the user specified pool can be differentiated between that and the pool inside backup.yaml.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
@lxc-jenkins

This comment has been minimized.

Copy link

lxc-jenkins commented Nov 28, 2019

Testsuite passed

@tomponline

This comment has been minimized.

Copy link
Member Author

tomponline commented Nov 28, 2019

@stgraber tests passing, ready for review.

@tomponline tomponline requested a review from stgraber Nov 28, 2019
@stgraber stgraber merged commit 6b23a30 into lxc:master Nov 28, 2019
5 checks passed
5 checks passed
Branch target Branch target is correct
Details
DCO All commits signed-off
Details
Testsuite Build finished.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@tomponline tomponline deleted the tomponline:tp-backup-instance-config branch Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.