diff options
| author | Alvaro Lopez <aloga@ifca.unican.es> | 2011-11-14 16:58:05 +0100 |
|---|---|---|
| committer | Alvaro Lopez <aloga@ifca.unican.es> | 2011-11-16 09:46:18 +0100 |
| commit | aa7dd96f1c23b29bd2cabd57d579f2c3b0fe678a (patch) | |
| tree | 4fe2de6ec09fd139f17d1c0c077d372ef9d93552 /nova/compute | |
| parent | 7ece1e7e607849f0d9a0eb5551899b3cc973545e (diff) | |
Fixes bug 890206
Add a check when creating the volume definition for the libvirt manager
to use the apporpiate driver for the disk, according to [1].
[1] http://libvirt.org/formatdomain.html#elementsDisks
Change-Id: I89cf3bb308cff28194de0beb36d69f0e32224cbe
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 0f3e0ae3d..aa2d08c64 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -1522,7 +1522,7 @@ class API(base.Base): def attach_volume(self, context, instance, volume_id, device): """Attach an existing volume to an existing instance.""" - if not re.match("^/dev/[a-z]d[a-z]+$", device): + if not re.match("^/dev/x{0,1}[a-z]d[a-z]+$", device): raise exception.ApiError(_("Invalid device specified: %s. " "Example device: /dev/vdb") % device) self.volume_api.check_attach(context, volume_id=volume_id) |
