Today I am wearing my “Keen Upgrader” hat!
I have been upgrading my lab environment and got stuck with VMware vCenter Operations Manager upgrade. The procedure is quite straight forward and is well documented.
The procedure consists of two steps (see here):
- Upgrade vCenter Operations Manager vApp;
- Upgrade the OS to SUSE Linux Enterprise Server 11 to SPx.
I tried to upgrade vCenter Operations Manager from v. 5.8.3 to 5.8.4. Yes…, I know,… Hence the “Keen Upgrader” badge… :)
The first step of the upgrade went well, no issues whatsoever but when I tried to upgrade the OS, it stopped straight after the launch without any errors or messages:
firstvm-external:/data # /usr/lib/vmware-vcops/user/conf/upgrade/va_sles11_spx_init.sh /data/VMware-vcops-SP3-2191616.pak Started applying upgrade.. firstvm-external:/data #
That was odd! Upon close inspection of the scripts, the issues has been identified! vCenter Operations Manager v. 5.8.3 comes with SUSE Linux Enterprise Server 11 Patch 3 already installed and the OS upgrade is not required!
You can actually check current version of the OS by running the following command:
firstvm-external:~ # cat /etc/SuSE-release SUSE Linux Enterprise Server 11 (x86_64) VERSION = 11 PATCHLEVEL = 3
Here is what actually happened during the upgrade:
- When you apply vCOPs vApp patch (as per upgrade procedure) it changes scripts:
Old ones:rwxrwxrwx 1 root root 1729 Nov 27 2013 va_sles11_sp2_common.sh -rwxrwxrwx 1 root root 1091 Nov 27 2013 va_sles11_sp2_common_defs.sh -rwxrwxrwx 1 root root 4174 Nov 27 2013 va_sles11_sp2_init.sh -rwxrwxrwx 1 root root 1001 Nov 27 2013 va_sles11_sp2_postupgrade.sh -rwxrwxrwx 1 root root 3504 Nov 27 2013 va_sles11_sp2_upgrade.sh -rwxrwxrwx 1 root root 247 Nov 27 2013 va_sles11_sp2_upgrade_required.sh
Replaced with:
-rwxrwxrwx 1 admin admin 1956 Nov 13 14:02 va_sles11_spx_common.sh -rwx------ 1 root root 1947 Nov 13 13:51 va_sles11_spx_common.sh.old -rwxrwxrwx 1 admin admin 991 Oct 10 06:12 va_sles11_spx_common_defs.sh -rwxrwxrwx 1 admin admin 4337 Oct 10 06:12 va_sles11_spx_init.sh -rwxrwxrwx 1 admin admin 1425 Oct 10 06:12 va_sles11_spx_postupgrade.sh -rwxrwxrwx 1 admin admin 3695 Oct 10 06:12 va_sles11_spx_upgrade.sh -rwxrwxrwx 1 admin admin 247 Oct 10 06:12 va_sles11_spx_upgrade_required.sh
- For the OS upgrade you launch: ‘
./va_sles11_spx_init.sh /data/VMware-vcops-SP3-2191616.pak
‘
Then ‘va_sles11_spx_init.sh'
calls ‘va_sles11_spx_common.sh'
:#Checks the SLES version to see if the upgrade is needed checkSLESversionAsString() { OS_MAJOR_VERSION=`awk '/^VERSION = /{print $NF}' /etc/SuSE-release` OS_SP_VERSION=`awk '/^PATCHLEVEL = /{print $NF}' /etc/SuSE-release` if expr match "$OS_MAJOR_VERSION" "11" > /dev/null; then if ( expr match "$OS_SP_VERSION" "1" || expr match "$OS_SP_VERSION" "2" ) > /dev/null; then return $SPx_UPGRADE_REQ else return $SPx_UPGRADE_NOT_REQ fi else return $SPx_UPGRADE_NOT_REQ fi }
- And there is a procedure:
log_and_echo() { log_info $1 }
in the old script the procedure is slightly different:
log_and_echo() { log_info $1 echo $1 }
The “
echo $1
” is missing!!! - When you add it back and run upgrade again you get:
firstvm-external:/usr/lib/vmware-vcops/user/conf/upgrade # ./va_sles11_spx_init.sh /data/VMware-vcops-SP3-2191616.pak Started applying upgrade.. SLES upgrade not required on Analytics VM hence skipping..
I hope you will find this entertaining! :)
I would like to thank Zbigniew ‘Ziggy’ Misiak for his help with the upgrade scripts!
Recent Comments