~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to nova/virt/disk/mount.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-05-24 13:12:53 UTC
  • mfrom: (1.1.55)
  • Revision ID: package-import@ubuntu.com-20120524131253-ommql08fg1en06ut
Tags: 2012.2~f1-0ubuntu1
* New upstream release.
* Prepare for quantal:
  - Dropped debian/patches/upstream/0006-Use-project_id-in-ec2.cloud._format_image.patch
  - Dropped debian/patches/upstream/0005-Populate-image-properties-with-project_id-again.patch
  - Dropped debian/patches/upstream/0004-Fixed-bug-962840-added-a-test-case.patch
  - Dropped debian/patches/upstream/0003-Allow-unprivileged-RADOS-users-to-access-rbd-volumes.patch
  - Dropped debian/patches/upstream/0002-Stop-libvirt-test-from-deleting-instances-dir.patch
  - Dropped debian/patches/upstream/0001-fix-bug-where-nova-ignores-glance-host-in-imageref.patch 
  - Dropped debian/patches/0001-fix-useexisting-deprecation-warnings.patch
* debian/control: Add python-keystone as a dependency. (LP: #907197)
* debian/patches/kombu_tests_timeout.patch: Refreshed.
* debian/nova.conf, debian/nova-common.postinst: Convert to new ini
  file configuration
* debian/patches/nova-manage_flagfile_location.patch: Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
        """Map partitions of the device to the file system namespace."""
59
59
        assert(os.path.exists(self.device))
60
60
 
61
 
        if self.partition:
 
61
        if self.partition == -1:
 
62
            self.error = _('partition search unsupported with %s') % self.mode
 
63
        elif self.partition:
62
64
            map_path = '/dev/mapper/%sp%s' % (os.path.basename(self.device),
63
65
                                              self.partition)
64
66
            assert(not os.path.exists(map_path))
73
75
            # so given we only use it when we expect a partitioned image, fail
74
76
            if not os.path.exists(map_path):
75
77
                if not err:
76
 
                    err = _('no partitions found')
 
78
                    err = _('partition %s not found') % self.partition
77
79
                self.error = _('Failed to map partitions: %s') % err
78
80
            else:
79
81
                self.mapped_device = map_path