'sameas:<device>' broken, fix included

Thomas Lange lange at informatik.uni-koeln.de
Wed Jun 25 12:12:15 CEST 2014


>>>>> On Wed, 25 Jun 2014 11:14:40 +0200, Thomas Neumann <blacky+fai at fluffbunny.de> said:

    > The actual fix is simply changing line
    > $FAI::configs{$FAI::device} = Storable::clone($FAI::configs{"PHY_" . $ref_dev});
    >   into
    > $FAI::configs{$FAI::device} = Storable::dclone($FAI::configs{"PHY_" . $ref_dev});
OK, that's easy to apply.

    > However there's an underlying problem by treating 'disk#' and
    > hda/sda/xvda differently. patch3 addresses that issue.
Mmm, I did a diff on the code block after sameas:(\S+) and
sameas:disk(\d+). Except for the clone vs. dclone call, it's the same
code! So why do you see a problem by treating disk# and
sda,.... differently, when there's no diff in the code?




    > If you like the change to be as non-invasive as possible, then you could go
    > for something like this
    > 1) modify | /^sameas:(\S+)/
    > 2) and delete
    > | /^sameas:disk(\d+)/
That sounds good. And it's a much smaller patch than your patch3.


    > [An alternative for 1) would be to change resolve_disk_shortname() to
    > recognize 'disk1' as a proper value. Now that I think about that
    > would be a better long-term-solution. Why does 'the user' / the caller
    > have to care whether the disk device is 'disk1' or 'sda'?]
I would also put this function into resolve_disk_shortname.

-- 
regards Thomas


More information about the linux-fai-devel mailing list