diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-02-17 20:14:47 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-02-17 20:14:47 +0000 |
| commit | 8a274a78ed9e989bc26328d020708341e932a984 (patch) | |
| tree | caa0a07fd0837f3e7dc2a873e9739519a2831379 | |
| parent | 1239741ca8267abd54f911400cd87507d1f3b94d (diff) | |
| parent | 7ffbff485e40bc3f36542f2892877adc5241accf (diff) | |
Merge "improve injection diagnostics when nbd unavailable. Bug 755854"
| -rw-r--r-- | nova/virt/disk/nbd.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/virt/disk/nbd.py b/nova/virt/disk/nbd.py index 029fecaf2..1839b2d90 100644 --- a/nova/virt/disk/nbd.py +++ b/nova/virt/disk/nbd.py @@ -54,6 +54,9 @@ class Mount(mount.Mount): _DEVICES = ['/dev/nbd%s' % i for i in range(FLAGS.max_nbd_devices)] def _allocate_nbd(self): + if not os.path.exists("/sys/block/nbd0"): + self.error = _('nbd unavailable: module not loaded') + return None while True: if not self._DEVICES: # really want to log this info, not raise |
