Fixing Exapatch with the ZFS replacement bundle
Gepubliceerd: Auteur: Jos Nijhoff Categorie: OracleBefore moving to some more extensive posts on the workings and usage of the Exalogic exapatch tool, I would like to share a little fix I did some time ago to make life easier and make exapatch do the work that it should be.
Sometimes a new a new Exalogic PSU comes out, but there are some post-release issues with it. This happens very rarely, but for the April 2015 PSU this was the case and the ZFS Storage Appliance Software (2013.1.3.5) bundled with it had an serious issue that was not caught in QA.
Back in the pre-exapatch days
Thus, you had to replace the bundled ZFS version with the replacement provided through patch 20983458. However, reading through the readme of this patch, it becomes apparent that it’s installation is all manual work and you are back in the pre-exapatch days, with all the hazards of error of manual proceedings that come with it. Apparently the team working on the problem resolution was in too much hurry to make it work through exapatch.
Luckily I had a bit more time and I set out to get the replacement ZFS bundle conveniently installed via exapatch, as it should be.
Modding exapatch
So here’s what I did on a virtualised Exalogic stack for PSU 20383732:
1. Update the patch descriptor file for the April 2015 PSU
Find:
def getZfsSoftwareFile(): return "ZFS_Storage/Software/2013.1.3.5/ak-nas-2013-06-05-3-5-1-1-1-nd.pkg.gz"
and change it to:
def getZfsSoftwareFile(): return "ZFS_Storage/Software/2013.1.3.5/ak-nas-2013-06-05-3-5-1-2-1-2-2-nd.pkg.gz"
2. Change the ZFSSoftwareVersion function as well
Change it to:
def getZfsSoftwareVersion(): return "2013.06.05.3.5,1-2.1.2.2"
3. Replace the ZFS bundle with the one from patch 20983458
[root@xxxxxcn01 ~]# cd /exalogic-lcdata/patches/Virtual/20383732/Infrastructure/ZFS_Storage/Software [root@xxxxxcn01 Software]# ll total 2 drwxr-xr-x+ 2 559583 8500 4 Apr 3 12:36 2013.1.3.5 [root@xxxxxcn01 Software]# mv 2013.1.3.5 2013.1.3.5_dontuse [root@xxxxxcn01 Software]# mkdir 2013.1.3.5 [root@xxxxxcn01 Software]# cp /exalogic-lcdata/patches/patches_jn/20983458/* 2013.1.3.5/. [root@xxxxxcn01 Software]# cd 2013.1.3.5 ; ll total 1062956 -rw-r--r--+ 1 root root 1087595389 Jun 3 09:13 ak-nas-2013-06-05-3-5-1-2-1-2-2-nd.pkg.gz -rw-r--r--+ 1 root root 1650 Jun 3 09:13 nfs_set_idmap.akwf -rw-r--r--+ 1 root root 22463 Jun 3 09:13 README.txt
4. Temporarily update the version.py module of exapatch
Keep the original and restore is after succesfully finishing the ZFS firmware patching via exapatch. Modify the if clause as below, add hashes at highlighted lines (three).
vi /exalogic-lctools/lib/exapatch/1.2.4/pymodules/version.py
IF noDelims: # no delims, INT comparison IF re.match(“^[\d]+$”, str(SELF)): #if(INT(SELF)==INT(other)): RETURN -1 # signal TO continue, TRUE/FALSE take up 1,0 #else: #return (INT(SELF) < INT(other)) ELSE: #contains non digits IF(str(SELF)==str(other)): RETURN -1 # signal TO continue, TRUE/FALSE take up 1,0 ELSE: RETURN (str(SELF) < str(other)) RETURN -1 #all parts exhausted, continue
Celebrate your success, and sit back
After changing, run the pre-patch check, should go OK
Celebrate your success, and sit back
After changing, run the pre-patch check, should go OK
[root@xxxxxcn01 Infrastructure]# /exalogic-lctools/bin/exapatch -a prePatchCheck
And now you can let exapatch do the dirty work for you and patch the ZFS:
[root@xxxxxcn01 Infrastructure]# /exalogic-lctools/bin/exapatch -a patch zfs_software Logging to file /var/log/exapatch_20150714180714.log INFO: ZFS-Storage-Head 10.xx.yy.31 running pre-patch checks for active head INFO: ZFS-Storage-Head 10.xx.yy.31 Active Head PreReq Checks Completed. INFO: ZFS-Storage-Head 10.xx.yy.31 successfully completed all pre-patch checks INFO: ZFS: Rebooting 10.xx.yy.31 INFO: ZFS: 10.xx.yy.31 Head, reboot command issued INFO: ZFS: Waiting for head 10.xx.yy.31 to restart after reboot INFO: ZFS: Running on 10.xx.yy.30 , Waiting for other head after reboot INFO: ZFS: STOP! as the other head is not ready yet, Peer State - AKCS_OWNER, Peer Description - Active (takeover completed ... ... Sun Microsystems, Inc. 1.0 INFO: ZFS: Host 10.xx.yy.31 patched successfully, proceeding with setting various parameters INFO: ZFS-Storage-Head 10.xx.yy.31 Configuring IPMP Service Parameters INFO: ZFS: Configured IPMP Service Parameters. INFO: ZFS-Storage-Head 10.xx.yy.31 Disabling NFSv4 delegation INFO: ZFS: Disabled NFSv4 delegation. INFO: ZFS-Storage-Head 10.xx.yy.31 running post patch checks INFO: ZFS-Storage-Head 10.xx.yy.31 running post-patch checks for ready head INFO: ZFS-Storage-Head 10.xx.yy.31 Ready Head PreReq Checks Completed. INFO: ZFS-Storage-Head 10.xx.yy.31 successfully completed all post-patch checks INFO: ZFS-Storage-Head 10.xx.yy.30 Active Head PreReq Checks Completed. INFO: ZFS-Storage-Head 10.xx.yy.30 running post patch checks INFO: ZFS-Storage-Head 10.xx.yy.30 running post-patch checks for active head INFO: ZFS-Storage-Head 10.xx.yy.30 Active Head PreReq Checks Completed. INFO: ZFS-Storage-Head 10.xx.yy.30 successfully completed all post-patch checks INFO: ZFS-Storage-Head 10.xx.yy.31 running post patch checks INFO: ZFS-Storage-Head 10.xx.yy.31 running post-patch checks for ready head INFO: ZFS-Storage-Head 10.xx.yy.31 Ready Head PreReq Checks Completed. INFO: ZFS-Storage-Head 10.xx.yy.31 successfully completed all post-patch checks INFO: ZFS: Patching completed on both heads
Undo mods
And remember… don’t forget to undo your ‘mods’ afterwards!