Removing the failed attempt to rescan specific targets
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
os-brick |
Fix Released
|
Undecided
|
Guy Rozendorn |
Bug Description
In git commit 28a4d55 LinuxFibreChann
to find specific targets to rescan by looking for
the hba wwnn in the target port_name.
This commit has a number of problems:
* the grep for target* fails many times with the following error:
[Errno 2] No such file or directory
this can be seen in many 3rd party cinder CIs
since the log files are rotated there is no point in giving a link
* the code used to grep the initiaitor wwnn in the target node_name
that simple cannot happen so even if you didn't get errno 2,
the function _get_hba_
here's an example:
from c-vol.log:
2017-02-08 21:25:38.706 6714 ERROR
os_brick.
[-] Could not get HBA channel and SCSI target ID,
path: /sys/class/
reason: [Errno 2] No such file or directory
at looking at sysfs:
$ ls /sys/class/
target10:0:1
$ ls /sys/class/
device node_name port_id port_name power subsystem uevent
$ cat /sys/class/
0x5742b0f00
$ cat /sys/class/
0x5742b0f00
$ cat /sys/class/
0x20000000c
$ cat /sys/class/
0x10000000c
$ cat /sys/class/
0x5742b0f00
$ cat /sys/class/
* calling /sys/class/
and since the method rescan_hosts doesn't get any info about the
target except for the lun, it needs to rescan all the targets
that this hba is connected to
So I removed the method _get_hba_
because it won't work anyway and it is not needed there,
and removed the tests that mock it.
Some references: 54.201. 44.218/ 71/433671/ 1/check/ 3par-fc- driver- master- client- pip-c8k01- dsvm/241d930/ logs/screen- c-vol.txt. gz?level= ERROR initiator. linuxfc [-] Could not get HBA channel and SCSI target ID, path: /sys/class/ fc_transport/ target2: , reason: [Errno 2] No such file or directory fc_transport/ target2: */node_ name initiator. linuxfc [-] Could not get HBA channel and SCSI target ID, path: /sys/class/ fc_transport/ target2: , reason: [Errno 2] No such file or directory fc_transport/ target2: */node_ name initiator. linuxfc [-] Could not get HBA channel and SCSI target ID, path: /sys/class/ fc_transport/ target2: , reason: [Errno 2] No such file or directory fc_transport/ target2: */node_ name
3par
http://
2017-02-14 16:04:54.527 10189 ERROR os_brick.
Command: grep 2000d4c9ef7671cd /sys/class/
Exit code: -
Stdout: None
Stderr: None
2017-02-14 16:06:12.323 10189 ERROR os_brick.
Command: grep 2000d4c9ef7671cd /sys/class/
Exit code: -
Stdout: None
Stderr: None
2017-02-14 16:07:01.347 10189 ERROR os_brick.
Command: grep 2000d4c9ef7671cd /sys/class/
Exit code: -
Stdout: None
Stderr: None