[PATCH rhel7] iscsi: fall back to session initiator name for null offload name (#836307)

Radek Vykydal rvykydal at redhat.com
Thu Jul 12 12:00:01 UTC 2012


On 07/12/2012 01:40 PM, Martin Gracik wrote:
> ack, with one comment
>
> ----- Original Message -----
>> Resolves: rhbz#836307
>>
>> Tested by reporter to fix the issue.
>> ---
>>   pyanaconda/storage/udev.py |    5 +++++
>>   1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/pyanaconda/storage/udev.py b/pyanaconda/storage/udev.py
>> index 9b1e8da..855ee70 100644
>> --- a/pyanaconda/storage/udev.py
>> +++ b/pyanaconda/storage/udev.py
>> @@ -585,11 +585,16 @@ def udev_device_get_iscsi_initiator(info):
>>               initiator_file =
>>               "/sys/class/iscsi_host/%s/initiatorname" % host
>>               if os.access(initiator_file, os.R_OK):
>>                   initiator = open(initiator_file).read().strip()
>> +                log.debug("found offload iscsi initiatorname %s in
>> file %s" %
>> +                          (initiator, initiator_file))
>> +                if initiator.lstrip("(").rstrip(")").lower() ==
>> "null":
> wouldn't this be easier to read?
>
> if initiator.lower() == "(null)":
>

My version will accept also "null" which is intentional.

Radek


More information about the anaconda-patches mailing list