Comment 5 for bug 1619158

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