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: Simplifies squashfs restore handling #6521

Merged
merged 12 commits into from Nov 28, 2019

Conversation

@tomponline
Copy link
Member

tomponline commented Nov 27, 2019

Includes #6520

@tomponline tomponline requested a review from stgraber Nov 27, 2019
tomponline added 12 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>
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>
Expects to always be passed an (optionally compressed) tarball now.

Squashfs files should be converted to a tarball before being passed to this function.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
Expects to always be passed an (optionally compressed) tarball now.

Squashfs files should be converted to a tarball before being passed to this function.

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

This avoids copying the uploaded backup file to multiple temporary files and simplifies the downstream logic.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
@tomponline tomponline force-pushed the tomponline:tp-backup-squashfs branch from dd16c27 to 2586514 Nov 28, 2019
@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.

@stgraber stgraber merged commit 0ccf867 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-squashfs 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.