~gandelman-a/ubuntu/precise/nova/UCA_2012.2.1

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Adam Gandelman
  • Date: 2012-08-16 14:04:11 UTC
  • mfrom: (1.1.59)
  • Revision ID: package-import@ubuntu.com-20120816140411-8dvudjblnx1w0mwx
Tags: 2012.2~f3-0ubuntu1
[ Chuck Short ]
* New upstream version.
* debian/rules: Re-enable testsuite.
* debian/control:
  - Add python-quantumclient as a build depends.
  - Bump standards to 3.9.3
  - Fix lintian warnings.
  - Recommend python-glanceclient and python-keystoneclient.
  - Add dependency of iptables for nova-network.
* debian/watch: Update
* debian/rules: Do not run pep8 tests since upstream is still using an
  older pep8.
* debian/patches/0001-Update-tools-hacking-for-pep8-1.2-and-
  beyond.patch: Get the testsuite running again.
* debian/nova-volume.install, debian/nova_tgt: Add support for
  persistent volumes.

[ Adam Gandelman ]
* debian/{nova-api.install, nova-api-metadata.install}: Install
  api-metadata.filters. (LP: #1002111)
* debian/control: Added python-glanceclient.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
class Mount(mount.Mount):
41
41
    """qemu-nbd support disk images."""
42
42
    mode = 'nbd'
 
43
    device_id_string = mode
43
44
 
44
45
    # NOTE(padraig): There are three issues with this nbd device handling
45
46
    #  1. max_nbd_devices should be inferred (#861504)
69
70
        return device
70
71
 
71
72
    def _free_nbd(self, device):
72
 
        self._DEVICES.append(device)
 
73
        # The device could already be present if unget_dev
 
74
        # is called right after a nova restart
 
75
        # (when destroying an LXC container for example).
 
76
        if not device in self._DEVICES:
 
77
            self._DEVICES.append(device)
73
78
 
74
79
    def get_dev(self):
75
80
        device = self._allocate_nbd()