Commit Graph

19 Commits (master)

Author SHA1 Message Date
Michal Arbet a197c8caf8 Fix creation of full backup when using cindernative incremental
Per configuration freezer should firstly create full backup
automatically if there are no backups for job and config options
incremental=True, mode=cindernative are set. This patch is fixing this.

From config:
>> # When the option is set, freezer will perform a cindernative
   incremental backup instead of the default full backup. And if True,
   but volume do not have a base full backup, freezer will do a full backup
>> #incremental = <None>

Change-Id: Ib56c5528bcdedc34c16c209488c7439250dd85e1
2020-02-02 18:52:54 +01:00
David Rabel 9f8d6c382e Fix license boilerplates
license boilerplates as docstring are included in automatically
generated documentation which leads to wrong formatting.

For example the indented hyperlink to the license is formatted as

Change-Id: I9d6088ab48d6787f29b593bfa5445b6a84e99de7
2018-05-04 14:53:13 +00:00
caoyuan f07dca96e4 Update uuid.uuid4() to uuidutils.generate_uuid()
Since oslo.utils provide the ability to generate the uuid string,
and some others use oslo.utils[0] too. For consistency, this ps
replaces uuid.uuid4() with uuidutils.generate_uuid().

missing from Ide5cdaf48a27e9c080fd8691b100a601f82ca2bf

Change-Id: Ia9b8cda25252b70d3706c23e402ae81ccf48e33e
2018-03-06 04:43:10 +00:00
Pengju Jiao 95292d10ef Add support for backup of volume boot nova instance
Currently, nova backup only support image type
instance. When using 'freezer-agent --action backup
--engine nova --nova-inst-id xxx --mode nova
--no-incremental true' to backup instance that boot
from volume or snapshot, it gives us the result of
successful backup. But when we restore and launch
the instance from the backup data, it will fail
with 'no boot device error' message. This patch
add support for backup of volume boot nova
instance and will fix the issue.

Change-Id: Ibd87087c5f631fc47357395e9ed7ca23b7844a51
Closes-Bug: #1685763
2017-06-21 08:40:54 +08:00
Saad Zaher 103b6ba352 Use Timeout option
Using CLI option timeout for different operations

   1. Nova engine
   2. Backup Operations

Change-Id: Iec86658fc09333efd9b27d0418b227938a106dcc
2017-03-10 12:11:56 +00:00
jiangpch 3c96039d7a Change some confusing log messages.
Change-Id: Ifd47ebe589dc5a39756d0773ac42bd8ae0f4f57a
2017-03-07 11:46:02 +08:00
Pierre-Arthur MATHIEU af8e1caaf6 Fix backups of nameless volumes
Change-Id: I2d1dfb45f816bd38ec2f663c3159b827c46634c9
2017-03-01 17:07:34 +00:00
Gleb Stepanov 43d631c616 Add flexible wait mechanism for events
As far as nova is not hard-realtime system it is
we should not depend on particular sleep time waiting
for some event.

Change-Id: I4271acbefbd735bb943263d664c5d68853ade0bc
2017-02-09 12:28:24 +00:00
yangyapeng eee345b4c6 Backup nova/cinder to local
Freezer-agent backup volume_by_glance upload data to swift by default.
This patch backup it and metadata to local,Now.

backup nova / cinder by glance to local:
freezer-agent --cinder-vol-id 0bd0d291-e75c-4fd9-b13b-058c335a8497
--storage local --container /home/nfs --mode cinder


freezer-agent --action restore
--cinder-vol-id 0bd0d291-e75c-4fd9-b13b-058c335a8497
--storage local --container /home/nfs
--restore-from-date 2016-05-10T00:01:00

Implements blueprint: backup-nova-cinder-to-non-swift

Change-Id: I9bc8496fea7727edbf35130b7dbf9bb435d7038b
2016-12-15 15:04:56 +00:00
Saad Zaher 83eff55604 Fix Cinder Backups
Change-Id: I48d8a8f91f8373f7e3b127ec0c4c686094642ccb
dpeneds-on: Iea7f5fb0d0fb42d95e6c24d6d63693e272af3992
Closes-Bug: #1615461
2016-09-15 20:36:32 +00:00
Saad Zaher 7658243238 Fixed nova backup and restore
Change-Id: Iea7f5fb0d0fb42d95e6c24d6d63693e272af3992
Closes-Bug: #1615461
2016-09-15 18:51:57 +00:00
yangyapeng 304e06db6d Change cinder backup to define full backup or incremental backup
Now, freezer backup cinder through cindernative, if volume have a
backup, it must be incremental, it is unfriendly.
Increase  incremental parameter to backup cinder volume. Default
freezer backup volume do a full backup, if cremental, it shoud do
a incremental backup.


Do a full backup:
freezer-agent --cindernative-vol-id eb7e8d07-800f-4de8-a918-38aa36e2ef83

Do a incremental backup:

freezer-agent --cindernative-vol-id eb7e8d07-800f-4de8-a918-38aa36e2ef83 --incremental

Closes-Bug: #1592322

Change-Id: I31c8c2875e275511448d4dcb53425d011e91bb5d
2016-07-18 07:39:20 +00:00
Deklan Dieterly 00db2b0d95 Fix Freezer Agent Logging
Standardize on oslo.log.
Log exception stack traces where appropriate.
Add logging to all files.
Remove '[*]' from log messages.
Log command line arguments at Freezer Agent start
so that errors can be traced to specific invocations.

Leave scheduler module mostly unchanged because it
is doing python logging configuration.

Change-Id: I23de0558409e63978303963d592a4e5ee4dee2b5
2016-06-30 07:41:28 -06:00
Deklan Dieterly 694c98e063 Fix tox.ini file
Remove select line in tox.ini.
Currently checks are not being run.
Run pep8 checks.
Fix code to pass pep8 checks.

Change-Id: Iacef4386b1214f95b1bd106c17a5f714f948a1a1
Closes-Bug: #1593452
2016-06-17 17:11:14 -06:00
yangyapeng 9cddf838a3 Delete Invalid variable
Change-Id: Ibfaaae8768e6f2f5636904d190c3397b1a253c20
Closes-Bug: #1587713
2016-06-05 22:09:29 +00:00
Saad Zaher 1b83ba7aef Refactor Freezer authentication with keystone
Supports v2 and v3 of keystone and using keystoneauth library for
authentication with sessions. Supports new OS environment variables

Change-Id: I5cf8a5460b81c071f5982c1a7b7750d1c861a86f
Implements: blueprint refactor-os-clients
2016-05-10 15:53:58 +00:00
Einst Crazy 285e292aa2 Use volume_id and timestamp to generate container name
Currently, the container is fixed string, so that the backup will
coverage the older one everytime.
Use volume_id and timestamp to generate container name, so each
time will provide a different container to storage the backup.

Change-Id: I58b3e151e6fcd8a37bf45cd545c79208ac968c3b
Closes-Bug: #1563207
2016-04-07 14:10:45 +00:00
Einst Crazy c62a9da7ef Generate a full backup first time
If there isn't any backup of the specified volume, generate a full
backup, but not an incremental one.

Closes-Bug: #1563245
Change-Id: If30e0292671e2be8d026006986b942206cfd2435
2016-04-07 13:03:37 +01:00
eldar nugaev c01d7c0a72 Refactoring of code:
1) new snapshot module with code vss,
lvm and part of -
create_snapshot and remove_snapshot

This module should contain all code related shadow,
vss and any new snapshots.

2) new openstack module with code from osclient,
restore and backup (BackupOS)

This module should contain code related to cinder/nova backups

3) new utils module with code from utils, win_utils,
bandwidth, config, exec_cmd, validator, streaming

This module should containd code related to anything
that cannot be extracted to its own module

4) new test modules - snapshot, utils, openstack and apiclient.

Test scheduler daemon is now located in scheduler module.

5) is deleted and code placed to
openstack.backup (BackupOS) and to job.BackupJob

Change-Id: I46194b40b3a65c15b6095cfb7388dcfd30d95997
2016-03-08 14:20:23 +00:00