Bug 903398

Summary: The iscsi initiator name is being modified during a RHEV-H upgrade.
Product: Red Hat Enterprise Linux 6 Reporter: Gordon Watson <gwatson>
Component: ovirt-nodeAssignee: Joey Boggs <jboggs>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3CC: acathrow, bsarathy, cshao, gouyang, hadong, hambrose, huiwa, jboggs, leiwang, mburns, ovirt-maint, pzhukov, thildred, tlavigne, ycui
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-node-2.5.0-17.el6 Doc Type: Bug Fix
Doc Text:
Previously, a Red Hat Enterprise Virtualization Hypervisor node upgraded from the Manager would have its iSCSI initiator configuration file (/etc/iscsi/initiatorname.iscsi) modified as part of the upgrade. The modification could cause a loss of connectivity to storage infrastructure. Now, the upgrade logic includes a check to see if an upgrade or a fresh installation of the hypervisor is being performed, and does not modify the iSCSI initiator configuration file on upgrade.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-28 16:47:54 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:

Description Gordon Watson 2013-01-23 21:57:19 UTC
Description of problem:
The iscsi initiator name is being modified during a RHEV-H upgrade, i.e. the '/etc/iscsi/initiatorname.iscsi' file is being rewritten with a new value.

The 'ovirt-config-iscsi' script does the following;

function set_initiator {
    if [ -z "$1" ]; then
        INITIATOR_NAME=$(iscsi-iname)
    else
        INITIATOR_NAME=$1
    fi

    echo "InitiatorName=$INITIATOR_NAME" > $INITIATOR_FILE
    ovirt_store_config $INITIATOR_FILE
    rc=$?
    if [ $rc = 0 ]; then
        printf "Initiator name set as: $INITIATOR_NAME\n"
    else
        printf "Setting initiator name failed\n"
    fi
}

# AUTO for auto-install
if [ "$1" = "AUTO" ]; then
    set_initiator $OVIRT_ISCSI_NAME
else
    printf "\n\n iSCSI Initiator Configuration\n\n"
    prompt_user
fi


It would seem that a conditional check for an upgrade could be added above. I had assumed that checking for OVIRT_UPGRADE being set would suffice, but I didn't see this being set during my upgrade attempt. 

I then noticed BZ 513456, for an older release. That bug appeared to address this very issue (refer to comments 6,7,8) by modifying 'ovirt-config-boot' to check to see if the '/etc/iscsi/initiatorname.iscsi' file had already been persisted or not. However, at some later time, it appears that (at least) the iscsi-related code was removed from 'ovirt-config-boot' in deference to 'ovirt-config-iscsi'. However, the code added to not modify the iscsi initiator name during an upgrade appears to be have omitted.

So, maybe adding a similar check for persistency as existed previously in 'ovirt-config-boot' might be the way to go ?


Version-Release number of selected component (if applicable):
RHEV Hypervisor 6.3 (20121212.0.el6_3).


How reproducible:
It occurred the one time that I performed a RHEV-H upgrade and eight times for the customer. The specific upgrade in each case was from 20121012.0 to 20121212.0.


Steps to Reproduce:
1.  'cat /etc/iscsi/initiatorname.iscsi'.
2.  Upgrade RHEV-H.
3.  'cat /etc/iscsi/initiatorname.iscsi', the initiator name will have changed.
  

Actual results:
The iscsi initiator name is being modified during a RHEV-H upgrade.

Expected results:
The iscsi initiator name should remain unchanged as a result of a RHEV-H upgrade.

Additional info:
The customer in question had to manually modify the targets on the server with the new initiator name. However, when I tried an upgrade here, the new initiator name was propagated to the target server. Regardless, the point is that the initiator name is being modified during an upgrade, but it's still of value to note that this caused the customer in question some inconvenience.

Any questions, please let me know. 
Thanks, GFW.

Comment 2 cshao 2013-01-24 08:06:34 UTC
RHEV-H QE can reproduce this issue always when upgrade RHEV-H via RHEV-M, 
But can't reproduce if upgrade rhevh via command line.

Test steps:
1. Install rhev-hypervisor6-6.3-20121025.0.el6_3 and register to RHEV-M Si build.
2. Upgrade RHEV-H to rhev-hypervisor6-6.3-20121212.0.el6_3 via RHEV-M.Actual 

Test results:
The iscsi initiator name is being modified during upgrade RHEV-H via rhevm.

Comment 11 errata-xmlrpc 2013-02-28 16:47:54 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.

http://rhn.redhat.com/errata/RHBA-2013-0556.html

Comment 12 Mike Burns 2013-03-06 13:14:16 UTC
Note that this will work when doing media upgrade to this version or any upgrade from this version to a higher version.  Doing an upgrade from an older version to this version through the RHEV-M interface will still show this bug.  Subsequent upgrades will not.

Comment 13 Mike Burns 2013-03-06 14:58:36 UTC
*** Bug 917847 has been marked as a duplicate of this bug. ***