Bug 903398 - The iscsi initiator name is being modified during a RHEV-H upgrade.
The iscsi initiator name is being modified during a RHEV-H upgrade.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node (Show other bugs)
6.3
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Joey Boggs
Virtualization Bugs
: Regression
: 917847 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-23 16:57 EST by Gordon Watson
Modified: 2013-05-06 09:56 EDT (History)
15 users (show)

See Also:
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 11:47:54 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 299373 None None None Never

  None (edit)
Description Gordon Watson 2013-01-23 16:57:19 EST
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 shaochen 2013-01-24 03:06:34 EST
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 11:47:54 EST
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 08:14:16 EST
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 09:58:36 EST
*** Bug 917847 has been marked as a duplicate of this bug. ***

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