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
first.
>> #incremental = <None>
Change-Id: Ib56c5528bcdedc34c16c209488c7439250dd85e1
The older version of pylint being used does not work correctly under
python 3. In order to be able to update the pylint job to run under
python 3, we need to update the tool.
This patch updates to the latest version at this time. It also updates
and pins astroid, which was previously capped. Using a pin instead of
a cap should let us avoid issues with new releases while being
specific about which version to actually use.
The import-error linter rule is disabled because it appears in
Windows-related code that looks for modules we don't expect to be able
to find on the CI system under Linux.
The non-iterator-returned rule is disabled because it is erroring on a
class that doesn't make sense (freezer.utils.utils.ReSizeStream does
appear to honor the iterator protocol). Further investigation is
probably warranted on this one.
The public entry point for multiprocessing.SimpleQueue is the
top-level multiprocessing module, not multiprocessing.queues. The
linter correctly caught this error because the ctx argument was not
being passed to the class. The fix is to use the top-level entry point
to access the class.
basestring is no longer defined under python 3. The fix is to use
six.string_types, which correctly sets the alias to str or
basestring. By using the library, we can avoid having to tell the
linter to ignore the local customization.
The linter also caught a base raise, without an exception specified
and not in the context of an exception handler. I added an exception
using the pattern from the one on an earlier line.
Change-Id: I349de35c9ee52e2946e661f777308444b61ba4e0
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Co-Authored-By: Nguyen Hai <nguyentrihai93@gmail.com>
Under python 3 'print' is a function, and the linter does not like
having a space between the function name and the paren indicating the
call. Remove the space.
The builtin 'file' is removed under python 3. Replace its use with
'open', which is available on both python 2 and 3.
Change-Id: Ib8522d8ab1974a4ba3e407ffbe449e2f5fc9471a
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
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
quotation.
Change-Id: I9d6088ab48d6787f29b593bfa5445b6a84e99de7
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
Enable treading warnings as errors so that no new broken stuff gets
merged. Remove obsolete way of doing it, it's a nop.
Fix bugs found:
* Add missing sphinx modules to properly generate content.
* Misformatting of comments and files
* Do not index the windows modules, they import modules that do not
exist on Linux.
* Place api docs in reference/api according to
http://specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration.html
and reference it. Update .gitignore for this.
* Include missing files in tree.
Change-Id: I57d3124ac9571f189cd0e10e4cf7e805b8e09045
When doing restore of cinder volume from specify swift
container named 'freezer/prefix', it will fail because
the wrong usage of swift client. 'freezer' should be
container name, 'prefix' should be object prefix.
Change-Id: Ib9a8092ac9afb3e3867be91501a198d1ab867efc
Closes-Bug:#1714170
When using ssh, local or s3 storage, freezer do not need do the
initialization of swift client in the process of creating image.
Change-Id: I5280d3e97bed7f2c488acc2ed6bd2befe1f21b88
Closes-Bug: #1705603
When use cinder mode to backup cinder volume which is bigger
than 1G in devstack environment, it will fail into an infinite
loop. It is because the max_file_size in swift.conf is set to
1G by default. This will cause creating image error, and then
cause freezer-agent failure. This patch will catch the exceptions
and fix the issue.
Change-Id: Icee5656a3f187b128313a98918b9c6c9612f66c9
Closes-Bug: #1703373
When use s3 driver, you should specify storage type with
'--storage s3', specify the auth info like '--access-key xxx'
and '--secret-key xxx', and specify the S3 compatible storage
endpoint with '--endpoint http://ip:port'.
Change-Id: If35468b3bd3a156ac5ade60c771ec8ff1a320139
Implements: blueprint s3-driver-support
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
Currently, restore nova feature is broken, it is because the
latest python-novaclient has removed the 'nova.network'. This
patch use python-neutronclient instead and will fix the issue.
Change-Id: Ifb2ab820a3cfc347d86a1b0b2fac79217752d227
Closes-Bug: #1693437
1. The backup may be in an infinite loop in the case that
the volume copy is in error state.
2. When snapshot error, backup will be interrupted, but
the wrong snapshot will never be deleted.
Change-Id: Ia29ae1d352930852c80ba776f5bf44173a42cadb
Closes-Bug: #1685261
Provide alternative names to newly restored volume in case of the
previous name doesn't exists in the metadata
Change-Id: Ib5195bfcc7c087efe6abc39679ec03635c9b8913
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
Freezer-agent backup volume_by_glance upload data to swift by default.
This patch backup it and metadata to local,Now.
usage:
backup nova / cinder by glance to local:
freezer-agent --cinder-vol-id 0bd0d291-e75c-4fd9-b13b-058c335a8497
--storage local --container /home/nfs --mode cinder
restore:
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
When restoring cinder by glance temporary image
is created but failed to be cleaned up because
of wrong parameters used for it's deletion.
Change-Id: Id4b37eee6c4b7b4f3c76bf43cdca5092c70493b4
Closes-Bug: #1648150