On Wed, Nov 6, 2013 at 10:04 AM, Michele Tartara <[email protected]> wrote:
> On Wed, Nov 6, 2013 at 8:10 AM, Apollon Oikonomopoulos
> <[email protected]> wrote:
>> Hi Michele,
>>
>> On 16:54 Tue 05 Nov , Michele Tartara wrote:
>>> On Tue, Nov 5, 2013 at 3:30 PM, Apollon Oikonomopoulos
>>> <[email protected]> wrote:
>>> > kernel: [1465514.164009] block drbd2: I shall become SyncTarget,
>>> > but I am primary!
>>> > kernel: [1465514.171562] block drbd2: ASSERT( os.conn ==
>>> > C_WF_REPORT_PARAMS ) in
>>> > /build/linux-rrsxby/linux-3.2.51/drivers/block/drbd/drbd_receiver.c:3245
>>>
>>> This line is too long and cannot be committed (I know it's a log line,
>>> and it would be nice to keep it like that, but we have automated
>>> checks in place), so it should be split.
>>
>> ACK, I'll resubmit.
>>
>>> > self.is_diskless = self.ldisk == self.DS_DISKLESS
>>> > self.is_disk_uptodate = self.ldisk == self.DS_UPTODATE
>>> > + self.peer_disk_uptodate = self.rdisk == self.DS_UPTODATE
>>>
>>> I'd change peer_disk_uptodate to is_peer_disk_uptodate, to be
>>> consistent with the style of all the predicates defined here.
>>
>> Actually it _is_ consistent with the style of all predicates referring
>> to the remote node:
>>
>> $ grep -c "\bis_peer" lib/bdev.py
>> 0
>> $ grep -c "\bpeer_" lib/bdev.py
>> 5
>>
>> Shall we keep it this way?
>
> I hadn't noticed that the is_* pattern did not apply to peers. Thanks
> for pointing it out.
>
> Then, LGTM.
> And no need to resend: I'll fix the long line in the commit message
> myself while pushing.
>
> Thanks,
> Michele
As a side note: the patch per se was OK, but adding a new attribute
(peer_disk_uptodate) to the class makes it have one attribute too
much, and a lint check is failing. I will push the patch with this
interdiff, disabling the pylint check on the number of attributes:
diff --git a/lib/bdev.py b/lib/bdev.py
index acc18ec..7226f1f 100644
--- a/lib/bdev.py
+++ b/lib/bdev.py
@@ -1050,7 +1050,7 @@ class LogicalVolume(BlockDev):
_ThrowError("Can't grow LV %s: %s", self.dev_path, result.output)
-class DRBD8Status(object):
+class DRBD8Status(object): # pylint: disable=R0902
"""A DRBD status representation class.
Note that this doesn't support unconfigured devices (cs:Unconfigured).
Michele
--
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