Fixing Exapatch with the ZFS replacement bundle

Fixing Exapatch with the ZFS replacement bundle

Gepubliceerd: Categorie: Oracle

Before 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:

  1. def getZfsSoftwareFile(): 
  2. 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:

  1. def getZfsSoftwareFile():
  2. 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:

  1. def getZfsSoftwareVersion():
  2.    return "2013.06.05.3.5,1-2.1.2.2"

3. Replace the ZFS bundle with the one from patch 20983458

  1. [root@xxxxxcn01 ~]# cd /exalogic-lcdata/patches/Virtual/20383732/Infrastructure/ZFS_Storage/Software
  2. [root@xxxxxcn01 Software]# ll
  3. total 2
  4. drwxr-xr-x+ 2 559583 8500 4 Apr 3 12:36 2013.1.3.5
  5. [root@xxxxxcn01 Software]# mv 2013.1.3.5 2013.1.3.5_dontuse
  6. [root@xxxxxcn01 Software]# mkdir 2013.1.3.5
  7. [root@xxxxxcn01 Software]# cp /exalogic-lcdata/patches/patches_jn/20983458/* 2013.1.3.5/.
  8. [root@xxxxxcn01 Software]# cd 2013.1.3.5 ; ll
  9. total 1062956
  10. -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
  11. -rw-r--r--+ 1 root root       1650 Jun 3 09:13 nfs_set_idmap.akwf
  12. -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).

  1. vi /exalogic-lctools/lib/exapatch/1.2.4/pymodules/version.py
  1. IF noDelims: # no delims, INT comparison
  2.  
  3. IF re.match(“^[\d]+$”, str(SELF)):
  4.  
  5.       #if(INT(SELF)==INT(other)):
  6.  
  7. RETURN -1 # signal TO continue, TRUE/FALSE take up 1,0
  8.  
  9.                #else:
  10.  
  11.                    #return (INT(SELF) < INT(other))
  12.  
  13. ELSE: #contains non digits
  14.  
  15. IF(str(SELF)==str(other)):
  16.  
  17. RETURN -1 # signal TO continue, TRUE/FALSE take up 1,0
  18.  
  19. ELSE:
  20.  
  21. RETURN (str(SELF) < str(other))
  22.  
  23. 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

  1. [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:

  1. [root@xxxxxcn01 Infrastructure]# /exalogic-lctools/bin/exapatch -a patch zfs_software
  2. Logging to file /var/log/exapatch_20150714180714.log
  3. INFO: ZFS-Storage-Head 10.xx.yy.31 running pre-patch checks for active head
  4. INFO: ZFS-Storage-Head 10.xx.yy.31 Active Head PreReq Checks Completed.
  5. INFO: ZFS-Storage-Head 10.xx.yy.31 successfully completed all pre-patch checks
  6. INFO: ZFS: Rebooting 10.xx.yy.31
  7. INFO: ZFS: 10.xx.yy.31 Head, reboot command issued
  8. INFO: ZFS: Waiting for head 10.xx.yy.31 to restart after reboot
  9. INFO: ZFS: Running on 10.xx.yy.30 , Waiting for other head after reboot
  10. INFO: ZFS: STOP! as the other head is not ready yet, Peer State - AKCS_OWNER, Peer Description - Active (takeover completed
  11. ...
  12. ...
  13. Sun Microsystems, Inc. 1.0
  14. INFO: ZFS: Host 10.xx.yy.31 patched successfully, proceeding with setting various parameters
  15. INFO: ZFS-Storage-Head 10.xx.yy.31 Configuring IPMP Service Parameters
  16. INFO: ZFS: Configured IPMP Service Parameters.
  17. INFO: ZFS-Storage-Head 10.xx.yy.31 Disabling NFSv4 delegation
  18. INFO: ZFS: Disabled NFSv4 delegation.
  19. INFO: ZFS-Storage-Head 10.xx.yy.31 running post patch checks
  20. INFO: ZFS-Storage-Head 10.xx.yy.31 running post-patch checks for ready head
  21. INFO: ZFS-Storage-Head 10.xx.yy.31 Ready Head PreReq Checks Completed.
  22. INFO: ZFS-Storage-Head 10.xx.yy.31 successfully completed all post-patch checks
  23. INFO: ZFS-Storage-Head 10.xx.yy.30 Active Head PreReq Checks Completed.
  24. INFO: ZFS-Storage-Head 10.xx.yy.30 running post patch checks
  25. INFO: ZFS-Storage-Head 10.xx.yy.30 running post-patch checks for active head
  26. INFO: ZFS-Storage-Head 10.xx.yy.30 Active Head PreReq Checks Completed.
  27. INFO: ZFS-Storage-Head 10.xx.yy.30 successfully completed all post-patch checks
  28. INFO: ZFS-Storage-Head 10.xx.yy.31 running post patch checks
  29. INFO: ZFS-Storage-Head 10.xx.yy.31 running post-patch checks for ready head
  30. INFO: ZFS-Storage-Head 10.xx.yy.31 Ready Head PreReq Checks Completed.
  31. INFO: ZFS-Storage-Head 10.xx.yy.31 successfully completed all post-patch checks
  32. INFO: ZFS: Patching completed on both heads

Undo mods

And remember… don’t forget to undo your ‘mods’ afterwards!

Jos Nijhoff
Over auteur Jos Nijhoff

Jos Nijhoff is an experienced Application Infrastructure consultant at Qualogy. Currently he plays a key role as technical presales and hands-on implementation lead for Qualogy's exclusive Exalogic partnership with Oracle for the Benelux area. Thus he keeps in close contact with Oracle presales and partner services on new developments, but maintains an independent view. He gives technical guidance and designs, reviews, manages and updates the application infrastructure before, during and after the rollout of new and existing Oracle (Fusion) Applications & Fusion Middleware implementations. Jos is also familiar with subjects like high availability, disaster recovery scenarios, virtualization, performance analysis, data security, and identity management integration with respect to Oracle applications.

Meer posts van Jos Nijhoff
Reacties
Reactie plaatsen