Bug 985122

Summary: iscsi target connected twice
Product: Red Hat Enterprise Linux 7 Reporter: michal novacek <mnovacek>
Component: iscsi-initiator-utilsAssignee: Chris Leech <cleech>
Status: CLOSED CURRENTRELEASE QA Contact: Bruno Goncalves <bgoncalv>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: agrover, nperic, xiaoli
Target Milestone: rcKeywords: TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: iscsi-initiator-utils-6.2.0.873-11.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:33:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 883874, 1080147    

Description michal novacek 2013-07-16 20:52:00 UTC
Description of problem:
Iscsi target is connected twice on boot with iscsi.service enabled.

Version-Release number of selected component (if applicable):
7.0-20130705.n.0
iscsi-initiator-utils-6.2.0.873-7.el7.x86_64

How reproducible: always


Steps to Reproduce:
1. discover and log into the target
2. enable iscsi.service with systemctl
3. reboot

Actual results: target drive is connected twice

Expected results: target drive connected once 

Additional info: 
Everything seemed fine unless I created PVs which than gave me errors on
running 'pvs':

$ cat /proc/partitions 
...
   8        0   41943040 sda
   8       16   41943040 sdb

$ iscsiadm -m session
tcp: [1] 10.34.70.17:3260,1 iqn.2008-09.com.example:beaker-disk-2224-d1-path1
tcp: [2] 10.34.70.17:3260,1 iqn.2008-09.com.example:beaker-disk-2224-d1-path1

$ pvs
  PV         VG            Fmt  Attr PSize PFree
  /dev/vda2  rhel_virt-168 lvm2 a--  7.51g    0 

$ pvcreate /dev/sda
  Physical volume "/dev/sda" successfully created

$ pvs
  Found duplicate PV PDLSYj8gdcC0YIQpIJsELbp1Z3pH1NsG: using /dev/sdb not /dev/sda
  PV         VG            Fmt  Attr PSize  PFree 
  /dev/sdb                 lvm2 a--  40.00g 40.00g
  /dev/vda2  rhel_virt-168 lvm2 a--   7.51g     0

Comment 3 Chris Leech 2013-07-22 18:01:54 UTC
This seems to be caused by the NetworkManager hook script restarting iscsi.service multiple times as network interfaces come online.

Removing /etc/NetworkManager/dispatcher.d/04-iscsi fixes this, but then iSCSI sessions configured for automatic login will not be retried once the network is ready.  It needs to do something other than a service restart, or at least the restart behavior need to be changed from the default.

Comment 4 Nenad Peric 2013-08-29 09:32:37 UTC
This behavior is still present and it makes LVM testing almost impossible. 

It does not help if I log out of targets and log back in:

iscsiadm -m node -u --> properly logs everything out.
iscsiadm -m node -l --> logs back in again twice, creating double PVs. 

Happens with:

iscsi-initiator-utils-6.2.0.873-13.el7
kernel-3.10.0-12.el7

Comment 5 Nenad Peric 2013-08-29 09:51:36 UTC
Hmm disregard my comment please.. 
It was not iscsi related at all this time.
 
It is a bug in my freakin' terminal, doubled the connection (without actually displaying it to me) :(

Comment 6 Bruno Goncalves 2013-09-04 15:20:49 UTC
It looks duplicated of BZ#981320

And the fix is verified on iscsi-initiator-utils-6.2.0.873-13.el7.x86_64.

Comment 8 Ludek Smid 2014-06-13 12:33:08 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.