-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I think it is related to my Bug report:
https://code.google.com/p/ganeti/issues/detail?id=768

Greetings,
Neal

Am 08.07.2014 14:20, schrieb Stratos Psomadakis:
> Hi,
>
> we tried adding new disks to running instances with the wait_for_sync
> option set
> to False and the job failed with OpPrereqError("Can't add a disk to an
> instance with activated disks and  --no-wait-for-sync given.").
>
> Commit 3c26084 deactivates disks which are added to instances with
> instance.disks_active=False. However, it also forbids using
> wait_for_sync=False
> when adding new disks to instances with activated disks (e.g. running
> instances).
>
> This doesn't seem consistent with the corresponding 'gnt-instance add
> --no-wait-for-sync' command. Is this the intended behavior?
>
> If not, is the following fix ok?
>
> diff --git a/lib/cmdlib/instance.py b/lib/cmdlib/instance.py
> index 480198d..3cf674d 100644
> --- a/lib/cmdlib/instance.py
> +++ b/lib/cmdlib/instance.py
> @@ -2819,14 +2819,6 @@ class LUInstanceSetParams(LogicalUnit):
>                                        constants.DT_EXT),
>                                       errors.ECODE_INVAL)
> 
> -    if not self.op.wait_for_sync and self.instance.disks_active:
> -      for mod in self.diskmod:
> -        if mod[0] == constants.DDM_ADD:
> -          raise errors.OpPrereqError("Can't add a disk to an instance
with"
> -                                     " activated disks and"
> -                                     " --no-wait-for-sync given.",
> -                                     errors.ECODE_INVAL)
> -
>      if self.op.disks and self.instance.disk_template ==
> constants.DT_DISKLESS:
>        raise errors.OpPrereqError("Disk operations not supported for"
>                                   " diskless instances",
errors.ECODE_INVAL)
>
> Thanks,
> Stratos
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTvFlIAAoJEAjn3+N5q55v4KEH/0E+JLUdeZGf/Rnrwq9Yq0d3
Q/uNtAQ9ONbe+xJdx+KfZWHDfhWIzx7/AQ0CGoaulefQPkoW4WQQZqLX4QB5hBpo
a19rIPAkDHIB010MQFqrIEQSpoIlztxqBj0/awtD3PPWl6MT2/5eFyAnIGYoBgon
IrGJZJB7rV6gqP4w3YC9MsX/MVNNlgUUkh767giUER6LlAujhp64JDyU3IuWSe4f
MWt2ArBRZLfVkZxuqcxGGMDqr/KAB1ZUCUMamFVF0FUo3iLEN10Ipxr9fGgFII/C
8KuS9QogDvxSnMAl9uOTFboZhJm8YuTFWWVkjo57pDEn2i+WN2Lj9e1q8YWvzJ8=
=rsYC
-----END PGP SIGNATURE-----

Reply via email to