Bug 1397007 - [z-stream clone - 4.0.5] Any host installed with RHVH-4.0-20161018.0-RHVH-x86_64-dvd1.iso is showing same iqn name.
Summary: [z-stream clone - 4.0.5] Any host installed with RHVH-4.0-20161018.0-RHVH-x86...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: imgbased
Version: 4.0.4
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: ovirt-4.0.5
: ---
Assignee: Fabian Deutsch
QA Contact: Qin Yuan
URL:
Whiteboard:
Depends On: 1393661
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-21 11:42 UTC by rhev-integ
Modified: 2019-12-16 07:24 UTC (History)
13 users (show)

Fixed In Version: imgbased-0.8.19-0.1.el7ev
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1393661
Environment:
Last Closed: 2016-11-22 17:03:22 UTC
oVirt Team: Node
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2759371 0 None None None 2016-11-21 11:43:56 UTC
Red Hat Product Errata RHBA-2016:2813 0 normal SHIPPED_LIVE redhat-virtualization-host bug fix and enhancement update for RHV 4.0.5-1 2016-11-22 22:01:32 UTC
oVirt gerrit 66592 0 None None None 2016-11-21 11:43:56 UTC
oVirt gerrit 66593 0 None None None 2016-11-21 11:43:56 UTC

Comment 1 rhev-integ 2016-11-21 11:42:52 UTC
Description of problem:
Any host installed with latest ISO available on portal is showing same initiator iqn name as iqn.1994-05.com.redhat:94d965987640

Version-Release number of selected component (if applicable):
RHV 4 Host : RHVH-4.0-20161018.0-RHVH-x86_64-dvd1.iso

How reproducible:
100%

Steps to Reproduce:
1. Install the RHV host with ISO RHVH-4.0-20161018.0-RHVH-x86_64-dvd1.iso
2. Check the Initiator iqn name at /etc/iscsi/initiatorname.iscsi
3. It is always same for all the hosts.

Actual results:
same Initiator name as iqn.1994-05.com.redhat:94d965987640 for all the hosts

Expected results:
The iqn name should be generated randomly

Additional info:

This comment was originaly posted by kmashalk

Comment 4 rhev-integ 2016-11-21 11:43:04 UTC
This should really be fixed in platform.

But this script can be used to generate a new name:

sed "s/:.*$/:$(cut -d- -f 5 < /proc/sys/kernel/random/uuid)/" < /etc/iscsi/initiatorname.iscsi

This comment was originaly posted by fdeutsch

Comment 9 rhev-integ 2016-11-21 11:43:37 UTC
Test this issue on redhat-virtualization-host-4.0-20161115.1.
Test steps are split into two parts, one is initial install test, the other is upgrade test. The test steps and results are as followed:

Initial install test:
1. Install RHVH on several servers(for example, 3 servers)
2. Check the initiator iqn on each server after login to RHVH
   cat /etc/iscsi/initiatorname.iscsi
3. Reboot the server, and check the initiator iqn again

Initial install results:
1. Each server has an unique initiator iqn.
2. After reboot, the iqn can be persisted.


Upgrade test:
1. Install an old version RHVH(redhat-virtualization-host-4.0-20160919.0)
2. Check the initiator iqn after login to the old version RHVH
3. Upgrade to the latest version(redhat-virtualization-host-4.0-20161115.1)
4. Reboot and login to the latest version RHVH
5. Check the initiator iqn again

Upgrade results:
After upgrade, the initiator iqn of the latest RHVH is the same as the old RHVH.


Fabian, there are two questions need your confirmation:

1. If the test steps are sufficient to test this issue?

2. All hosts installed with one old version, such as redhat-virtualization-host-4.0-20160919.0, have the same initiator iqn. Upgrade them to the latest version, the iqn will be persisted. So, after upgrade, all hosts with the latest version will have the same iqn as well.
To resolve this problem, should we generate the unique iqn manually before upgrade?

This comment was originaly posted by qiyuan

Comment 12 Qin Yuan 2016-11-22 07:26:40 UTC
Verified this issue on redhat-virtualization-host-4.0-20161116.1

Test versions:
Build1:
redhat-virtualization-host-4.0-20161116.1
imgbased-0.8.10-0.1.el7ev.noarch
Build2:
redhat-virtualization-host-4.0-20160919.0
imgbased-0.8.5-0.1.el7ev.noarch

Test steps and results:
Part1: Initial install test
Steps:
1. Install Biuld1 on 3 servers.
2. Check the initiator iqn on each server after login to RHVH.
   cat /etc/iscsi/initiatorname.iscsi
3. Reboot the server, and check the initiator iqn again.

Results:
1. After step2, each server has an unique initiator iqn.
2. After step3, the iqn can be persisted on each server.


Part2: Upgrade test
Steps:
1. Install Build2 on a server.
2. Check the initiator iqn after login to RHVH.
3. Manually modify the iqn using the workaround:
"sed "s/:.*$/:$(cut -d- -f 5 < /proc/sys/kernel/random/uuid)/" < /etc/iscsi/initiatorname.iscsi"
3. Upgrade to the latest Build1.
4. Reboot and login to the latest Build1.
5. Check the initiator iqn again.

Results:
1. After step3, the initiator iqn is changed into an unique one.
2. After step5, the iqn is the same as step3.


Conclusion:
1. Servers with initial installed latest RHVH have unique iqn.
2. Servers with old version RHVH, even upgrade to the latest RHVH, must use the workaround to get the unique iqn.

So this issue is conditional fixed due to the upgrade case still needs workaround.

Comment 14 errata-xmlrpc 2016-11-22 17:03:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2813.html


Note You need to log in before you can comment on or make changes to this bug.