(qq: can you rebase this patch series on devel-2.7 ? it should be in
stable as it's a fix)

Thanks,

Guido


On Wed, Apr 3, 2013 at 11:08 AM, Guido Trotter <[email protected]> wrote:
> LGTM
>
> Thanks,
> Guido
>
>
> On Wed, Apr 3, 2013 at 10:47 AM, Klaus Aehlig <[email protected]> wrote:
>> Now that _CreateDisks cleans up after itself in case of failure,
>> do not clean up at call sites, as there we have to overapproximate
>> thus potentially causing data loss.
>>
>> Signed-off-by: Klaus Aehlig <[email protected]>
>> ---
>>  lib/cmdlib.py | 18 ++++++------------
>>  1 file changed, 6 insertions(+), 12 deletions(-)
>>
>> diff --git a/lib/cmdlib.py b/lib/cmdlib.py
>> index 3867f0e..0f37cf9 100644
>> --- a/lib/cmdlib.py
>> +++ b/lib/cmdlib.py
>> @@ -8507,12 +8507,9 @@ class LUInstanceMove(LogicalUnit):
>>      try:
>>        _CreateDisks(self, instance, target_node=target_node)
>>      except errors.OpExecError:
>> -      self.LogWarning("Device creation failed, reverting...")
>> -      try:
>> -        _RemoveDisks(self, instance, target_node=target_node)
>> -      finally:
>> -        self.cfg.ReleaseDRBDMinors(instance.name)
>> -        raise
>> +      self.LogWarning("Device creation failed")
>> +      self.cfg.ReleaseDRBDMinors(instance.name)
>> +      raise
>>
>>      cluster_name = self.cfg.GetClusterInfo().cluster_name
>>
>> @@ -11041,12 +11038,9 @@ class LUInstanceCreate(LogicalUnit):
>>        try:
>>          _CreateDisks(self, iobj)
>>        except errors.OpExecError:
>> -        self.LogWarning("Device creation failed, reverting...")
>> -        try:
>> -          _RemoveDisks(self, iobj)
>> -        finally:
>> -          self.cfg.ReleaseDRBDMinors(instance)
>> -          raise
>> +        self.LogWarning("Device creation failed")
>> +        self.cfg.ReleaseDRBDMinors(instance)
>> +        raise
>>
>>      feedback_fn("adding instance %s to cluster config" % instance)
>>
>> --
>> 1.8.1.3
>>
>
>
>
> --
> Guido Trotter
> Ganeti engineering
> Google Germany



-- 
Guido Trotter
Ganeti engineering
Google Germany

Reply via email to