On Mon, Nov 17, 2014 at 11:29:13AM +0100, Aaron Karper wrote:
> Signed-off-by: Aaron Karper <[email protected]>
> ---
>  lib/backend.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/backend.py b/lib/backend.py
> index 8b8429b..8831a1c 100644
> --- a/lib/backend.py
> +++ b/lib/backend.py
> @@ -2557,7 +2557,7 @@ def AcceptInstance(instance, info, target):
>  
>    """
>    # TODO: why is this required only for DTS_EXT_MIRROR?
> -  if instance.disk_template in constants.DTS_EXT_MIRROR:
> +  if utils.AnyDiskOfType(instance.disk_info, constants.DTS.EXT_MIRROR):
>      # Create the symlinks, as the disks are not active
>      # in any way
>      try:
> @@ -2569,7 +2569,7 @@ def AcceptInstance(instance, info, target):
>    try:
>      hyper.AcceptInstance(instance, info, target)
>    except errors.HypervisorError, err:
> -    if instance.disk_template in constants.DTS_EXT_MIRROR:
> +    if utils.AnyDiskOfType(instance.disk_info, constants.DTS.EXT_MIRROR):
>        _RemoveBlockDevLinks(instance.name, instance.disks_info)
>      _Fail("Failed to accept instance: %s", err, exc=True)
>  
> -- 
> 2.1.0.rc2.206.gedb03e5
> 


diff --git a/lib/backend.py b/lib/backend.py
index 8831a1c..cdc61cf 100644
--- a/lib/backend.py
+++ b/lib/backend.py
@@ -2557,7 +2557,7 @@ def AcceptInstance(instance, info, target):
 
   """
   # TODO: why is this required only for DTS_EXT_MIRROR?
-  if utils.AnyDiskOfType(instance.disk_info, constants.DTS.EXT_MIRROR):
+  if utils.AnyDiskOfType(instance.disk_info, constants.DTS_EXT_MIRROR):
     # Create the symlinks, as the disks are not active
     # in any way
     try:
@@ -2569,7 +2569,7 @@ def AcceptInstance(instance, info, target):
   try:
     hyper.AcceptInstance(instance, info, target)
   except errors.HypervisorError, err:
-    if utils.AnyDiskOfType(instance.disk_info, constants.DTS.EXT_MIRROR):
+    if utils.AnyDiskOfType(instance.disk_info, constants.DTS_EXT_MIRROR):
       _RemoveBlockDevLinks(instance.name, instance.disks_info)
     _Fail("Failed to accept instance: %s", err, exc=True)
 


-- 
Google Germany GmbH
Dienerstr. 12
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores

Reply via email to