On 07/02/2014 12:35 μμ, Santi Raffa wrote: > * Extend the CheckPrereq dt check to catch all disk templates that are > not LV-based (namely blockdev, diskless, ext, file, rbd, sharedfile) > * Fix the bug with the error message in BlockdevSnapshot (at exec time)
Hi, I think the disk.unique_id is also referenced a few lines above, for the DRBD case. Doesn't it need to be changed to disk.uuid too? Thanks, Stratos > > This technically fixes issue 545. > > Signed-off-by: Santi Raffa <[email protected]> > --- > lib/backend.py | 2 +- > lib/cmdlib/backup.py | 7 ++++--- > 2 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/lib/backend.py b/lib/backend.py > index 639dd4f..6029361 100644 > --- a/lib/backend.py > +++ b/lib/backend.py > @@ -3070,7 +3070,7 @@ def BlockdevSnapshot(disk): > _Fail("Cannot find block device %s", disk) > else: > _Fail("Cannot snapshot non-lvm block device '%s' of type '%s'", > - disk.unique_id, disk.dev_type) > + disk.uuid, disk.dev_type) > > > def BlockdevSetInfo(disk, info): > diff --git a/lib/cmdlib/backup.py b/lib/cmdlib/backup.py > index 79e7d27..81babde 100644 > --- a/lib/cmdlib/backup.py > +++ b/lib/cmdlib/backup.py > @@ -341,9 +341,10 @@ class LUBackupExport(LogicalUnit): > # instance disk type verification > # TODO: Implement export support for file-based disks > for disk in self.instance.disks: > - if disk.dev_type in [constants.DT_FILE, constants.DT_SHARED_FILE]: > - raise errors.OpPrereqError("Export not supported for instances with" > - " file-based disks", errors.ECODE_INVAL) > + if disk.dev_type in constants.DTS_NOT_LVM: > + raise errors.OpPrereqError("Export not supported for instances of > disk" > + " type %r" % disk.dev_type, > + errors.ECODE_INVAL) > > def _CleanupExports(self, feedback_fn): > """Removes exports of current instance from all other nodes. -- Stratos Psomadakis <[email protected]>
signature.asc
Description: OpenPGP digital signature
