On Fri, Jul 2, 2010 at 2:44 PM, Iustin Pop <[email protected]> wrote:

>> +    if self.op.drbd_helper is not None and not self.op.drbd_helper:
>> +      instances = self.cfg.GetAllInstancesInfo().values()
>> +      for inst in instances:
>> +        for disk in inst.disks:
>> +          if disk.RecursiveCheckIfLogicalDiskBased(constants.LD_DRBD8):
>> +            raise errors.OpPrereqError("Cannot disable drbd helper while"
>> +                                       " drbd-based instances exist",
>> +                                       errors.ECODE_INVAL)
>> +
>
> This code and the code in upgrade config look very similar. Maybe it
> should be abstracted in a ConfigWriter.HasAnyDiskOfType() method.

True, what about a method of the instance object then?

> I don't think this is LogWarning, maybe just LogInfo. Having offline
> nodes is perfectly fine (well, from the point of view of the ganeti
> code, at least :).

:) ok!


Thank you,

Luca

Reply via email to