freezer-agent error when backup instance or volume without path-to-backup

Bug #1619158 reported by howard lee
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Backup/Restore and DR (Freezer)
Fix Released
Undecided
tanmingxiao

Bug Description

when i backup instance or volume with only instance id or volume id, freezer-agent reports critical error:

===============================
stack@devstack:~$ freezer-agent --cinder-vol-id e3160a6f-d40b-42df-a1dd-9595818eb22f
Critical Error: path-to-backup argument must be provided

stack@devstack:~$ freezer-agent --nova-inst-id 6103bd42-6570-4794-a490-b2c5bd68455e
Critical Error: path-to-backup argument must be provided
===============================

stack@devstack:~$ freezer-agent --version
3.0.0
stack@devstack:~$

Revision history for this message
jiaopengju (pj-jiao) wrote :

this bug also affect me.

Revision history for this message
Shangzhong Zhu (zhusz) wrote :

It works well on my openstack deploy. Could you provide the log info?

cat ~/.freezer/freezer.log

Revision history for this message
howard lee (howardlee) wrote :

stack@ubuntu14:~$ freezer-agent --nova-inst-id 94a9e2dd-7b4b-4634-9a7a-66a97db06f84 --storage local --container /tmp/freezer_backup --backup-name inst_test_bak0
Critical Error: path-to-backup argument must be provided
stack@ubuntu14:~$

========================

stack@ubuntu14:~/.freezer$ less freezer.log
2016-11-23 18:27:40.522 47828 INFO freezer.main [-] Begin freezer agent process with args: ['/usr/local/bin/freezer-agent', '--nova-inst-id', '94a9e2dd-7b4b-4634-9a7a-66a97db06f84', '--storage', 'local', '--container', '/tmp/freezer_backup', '--backup-name', 'inst_test_bak0']
2016-11-23 18:27:40.523 47828 INFO freezer.main [-] log file at /opt/stack/.freezer/freezer.log
2016-11-23 18:27:42.571 47828 INFO freezer.job [-] Validating args for the backup job.
2016-11-23 18:27:42.572 47828 ERROR freezer.main [-] path-to-backup argument must be provided
2016-11-23 18:27:42.572 47828 ERROR freezer.main Traceback (most recent call last):
2016-11-23 18:27:42.572 47828 ERROR freezer.main File "/opt/stack/freezer/freezer/main.py", line 227, in main
2016-11-23 18:27:42.572 47828 ERROR freezer.main freezer_main(backup_args)
2016-11-23 18:27:42.572 47828 ERROR freezer.main File "/opt/stack/freezer/freezer/main.py", line 111, in freezer_main
2016-11-23 18:27:42.572 47828 ERROR freezer.main return run_job(backup_args, storage)
2016-11-23 18:27:42.572 47828 ERROR freezer.main File "/opt/stack/freezer/freezer/main.py", line 120, in run_job
2016-11-23 18:27:42.572 47828 ERROR freezer.main 'exec': job.ExecJob}[conf.action](conf, storage)
2016-11-23 18:27:42.572 47828 ERROR freezer.main File "/opt/stack/freezer/freezer/job.py", line 52, in __init__
2016-11-23 18:27:42.572 47828 ERROR freezer.main self._validate()
2016-11-23 18:27:42.572 47828 ERROR freezer.main File "/opt/stack/freezer/freezer/job.py", line 97, in _validate
2016-11-23 18:27:42.572 47828 ERROR freezer.main raise ValueError('path-to-backup argument must be provided')
2016-11-23 18:27:42.572 47828 ERROR freezer.main ValueError: path-to-backup argument must be provided
2016-11-23 18:27:42.572 47828 ERROR freezer.main
2016-11-23 18:27:42.574 47828 CRITICAL freezer.main [-] End freezer agent process unsuccessfully
2016-11-23 18:27:42.575 47828 CRITICAL freezer.main [-] Critical Error: path-to-backup argument must be provided

Revision history for this message
Shangzhong Zhu (zhusz) wrote :

howard, the swift storage is only supported for the nova/cinder backup currently.
A patch has been submitted for fixing the issue. We are reviewing it.
Please refer to https://review.openstack.org/#/c/379281/.

howard lee (howardlee)
Changed in freezer:
status: New → In Progress
status: In Progress → New
Revision history for this message
Mingxiao Tan (tanmingxiao) wrote :

see /opt/stack/freezer/freezer/job.py
```
class BackupJob(Job):

    def _validate(self):
        if self.conf.mode == 'fs':
            if not self.conf.path_to_backup:
                raise ValueError('path-to-backup argument must be provided')
            if self.conf.no_incremental and (self.conf.max_level or
                                             self.conf.always_level):
                raise Exception(
                    'no-incremental option is not compatible '
                    'with backup level options')
        if self.conf.mode == 'nova':
            if not self.conf.no_incremental:
                raise ValueError("Incremental nova backup is not supported")

            if not self.conf.nova_inst_id and not self.conf.project_id:
                raise ValueError("nova-inst-id or project-id"
                                 " argument must be provided")

        if self.conf.mode == 'cinder':
            if not self.conf.cinder_vol_id:
                raise ValueError("cinder-vol-id argument must be provided")

        if self.conf.mode == "cindernative":
            if not self.conf.cindernative_vol_id:
                raise ValueError("cindernative-vol-id"
                                 " argument must be provided")
```
path-to-backup is the option of fs mode,the default mode of freezer-agent is fs,so we need to specify mode when back cinder or nova

tanmingxiao (tanmx)
Changed in freezer:
assignee: nobody → tanmingxiao (tanmx)
Changed in freezer:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to freezer (master)

Reviewed: https://review.openstack.org/554822
Committed: https://git.openstack.org/cgit/openstack/freezer/commit/?id=f3265d293c7136998c52400fc7816838b9b70070
Submitter: Zuul
Branch: master

commit f3265d293c7136998c52400fc7816838b9b70070
Author: tanmingxiao <email address hidden>
Date: Wed Mar 21 15:20:20 2018 +0800

    fix some mistake in freezer user guide document(cinder backup)

    I test the freezer with freezer-agent.rst and I find some mistake in
    cinder and nova backups
     - cinder backup need --mode option otherwise it will into the
       default mode fs
    Closes-Bug:1619158

    Change-Id: I4a0a322ac0a439d2a170a5e6e93c4819556bfca9

Changed in freezer:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/freezer 7.0.0.0b1

This issue was fixed in the openstack/freezer 7.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to freezer (master)

Reviewed: https://review.openstack.org/554823
Committed: https://git.openstack.org/cgit/openstack/freezer/commit/?id=61a28e1475ac663802a8d0121491863028b183c8
Submitter: Zuul
Branch: master

commit 61a28e1475ac663802a8d0121491863028b183c8
Author: tanmingxiao <email address hidden>
Date: Wed Mar 21 15:47:03 2018 +0800

    fix some mistake in freezer user guide document(nova backup)

    I test the freezer with freezer-agent.rst and I find some mistake in
    cinder and nova backups
     - nova backup need --mode option. otherwise it will into the
       default mode fs
     - nova backup need more necessary parameters,It is the --engine nova
       and --no-incremental True and --backup-name [BACKUP_NAME]

    Closes-Bug:1619158

    Change-Id: Id0326f35f8d15eb78c4aa272dba4cf8bf5c539ff

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/freezer 7.0.0

This issue was fixed in the openstack/freezer 7.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.