We don't support Python 2 anymore so we don't need this
compatibility library.
This patch remove six usage.
Change-Id: I661e9cdaf33e89bdb905d1f34a001f3853c4c366
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
ssh is a storage used for linux destro, and the key file is
usually in '~/.ssh/' folder, default value is needed,
if the file is not generate by manually,
the freezer-agent will broken. Add checking is a
good idea for use. this patch is to:
1. add default ssh keyfile value
2. add ssh keyfile checking
Change-Id: Ic2d3cdd6f9d4c260cbf650f7aa532d5060778693
Closes-Bug: #1750566
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
Specify the swift storage as 'abc/123', it will
fail when 'abc' was not exist. This patch will fix it.
Change-Id: Id11d632741bbfc8da8ccb6180374fb6da59d32da
Closes-Bug: #1688442
When object count is bigger than 1000, IsTruncated is True, then
the restore will fail. (Although object number of the cinder mode
backup of a volume will never be bigger than 1000 with using
multipart upload in s3 driver, this should also be fixed)
Depends-On: I7586763cf25be7ca115c7325129a7c9aa7022603
Change-Id: I9e972023817f3c804ae02e925b93811e1e05cc52
Currently, when use 'freezer-agent --action admin --remove-older-than
xx --mode cinder --cinder-vol-id xx --storage xx --container xx' to
remove the old backups, the result is successful, but the backup data
is not really deleted. This path will increase AdminJob support for
cinder mode backup and fix the issue.
Change-Id: I8c9bb86a6d6d82f0609f340df42e220204794940
Closes-Bug: #1701422
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
There are two issues in current 'admin action' of nova
based backups.
1. When remove old nova backups with command 'freezer-agent
--action admin --mode nova --engine nova --nova-inst-id xxxx
--no-incremental true --remove-older-than x" will fail cause
the incorrect swift path.
2. Can not do 'admin action' of nova tenant.
This patch contains two changes.
1. Fix remove old nova backups error.
2. Add option to do 'admin action' of nova tenant.
Change-Id: I60b3445905fab65725882fba9b0ca6b1e2abc408
Closes-Bug: #1684526
At the moment, the Swift storage codebase does not have a consistent
way of using the Swift client, as it switches from grabbing an
existing client and creating new ones.
Due to the architecture of how restores happen, there are several
times where the same storage instance is held by the main process,
the process which reads from the storage and the engine (to retrieve
metadata). All of these accesses result in unexpected behaviour which
can raise SSL errors such as: DECRYPTION_FAILED_OR_BAD_RECORD_MAC
The overall cost of creating a new client for every request is very
minimal and it eliminates all possibility of multithreading issues
that occur as per suggested by the author of the requests Python
library[0], which is used by the Swift client.
This patch eliminates all calls to create_swift() indirectly and makes
sure that all accesses to the Swift client create a new instance. In
my local testing, there was no noticable performance change but
no more SSL failures.
Closes-Bug: #1682606
[0]: https://github.com/kennethreitz/requests/issues/1906#issuecomment-201238170
Change-Id: I2d43f14943fc52fd6b6cb994251c97e00d3eb863
Implement nova tenant backup and restore to swift, local and ssh storage.
Add unit tests. Add new CLI option '--project-id' to perform tenant
backup/restore. Add new option - '--backup-media' as well.
Partially implements bp: tenant-backup
Change-Id: Ia8e4412dfaf0c24364db692de78c27cd0e3b3c4c
ssh connection gets lost while restoring, so we check if the
connection is not alive we reconnect again.
Change-Id: I2f6bce2555d89ac103dd77248013ddbdfa862bc4
Added new engine type (rsync) to perform
space/bandwidth efficient backups.
Change-Id: I8390c9c85fc2478a4ad2fe7eb4e40f3e580da912
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
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 restore data with --restore-from-date option from local storage,
The most recent backup subsequent to the specified date will be
selected.
According to the detailed desciptions from README.rst, the
--restore-from-date option will select the most recent backup previous
to the specified date.
The patch fixed the issue.
Change-Id: Iaac936c845ab5ccddd59c751a773e6f190dc064a
Closes-Bug: #1644478
Signed-off-by: Shangzhong Zhu <zhu.shangzhong@zte.com.cn>
We need to pass the content length to swift in case of uploading
files, so we needed to calcuate the engine's metadata file size
and pass it to swift during upload.
Change-Id: I404401d0046c5aaff463043b82d40b48708b7149
When backup data to ssh storage for the first time, because the sub
directory "metadata" isn't exist in the ssh storage directory, the
exception IOError will be raised.
The exception IOError should be caught in the funtion listdir() of the
SshStorage class, and the empty list should be returned when the errno
is ENOENT which indicates "No such file or directory". The other
exceptions, e.g. "Permission denied", should be raised.
Change-Id: Icddca7078a47fb82c12d4232065d51e2baa0ab60
Closes-Bug: #1638816
This patch set modifies lines which are importing objects
instead of modules. As per openstack import guide lines, user should
import modules in a file not objects.
Also, imports was regrouped and placed in alphabetical order.
http://docs.openstack.org/developer/hacking/#imports
Change-Id: I192b8bf6f50a85e19640975f0902a014c4ba0878
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
There is no need to call os.remove() with temp file,
it will be removed automatically after closed.
Actually, freezer.log has warning messages about it:
WARNING freezer.utils.utils [-] Error deleting file /tmp/tmpSNedJh
This patch will fix it.
Also, added newline to info message that using scheduler is deprecated
and more verbose output if there is a problem with deleting file.
Change-Id: I8dc31684bfece130eed6dd89806e965a4e1eabea
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
When an exception was caught and rethrown, it should call 'raise'
without any arguments because it shows the place where an exception
occured initially instead of place where the exception re-raised.
Change-Id: Ic071e958694166a7df87915f50fe0f4a70f01fab