After updating my NIM master to AIX 7.1 TL2 SP1 (7100-02-01-1245), I noticed a problem. Whenever I installed a new AIX partition using NIM, the resources allocated to the NIM client were not being de-allocated, even though the installation was completing successfully. Also, if I tried to run my usual NIM client reset script (below), the resources were still allocated.
#!/usr/bin/ksh
# Reset a NIM client.
if [[ "$1" = "" ]] ; then
echo Please specify a NIM client to reset e.g. aixlpar1.
else
if lsnim -l $1 > /dev/null 2>&1 ; then
nim -o reset -F $1
nim -Fo de-allocate -a subclass=all $1
nim -Fo change -a cpuid= $1
else
echo Not a valid NIM client!?
fi
fi
For example, heres my NIM client with the lpp_source, mksysb and SPOT resources assigned to it (even though the AIX install completed OK).
root@nim1 : / # lsnim -l aixlpar1
aixlpar1:
class = machines
type = standalone
connect = shell
platform = chrp
netboot_kernel = 64
if1 = network1 aixlpar1 0
cable_type1 = N/A
Cstate = ready for a NIM operation
prev_state = not running
Mstate = currently running
boot = boot
lpp_source = lpp_sourceaix710105
mksysb = aixlpar1-71
nim_script = nim_script
spot = spotaix710105
cpuid = 00C453C75C00
control = master
Cstate_result = success
installed_image = aixlpar1-71
My workaround was to use 'smit nim_mac_res' to manually de-allocate resources from the client:
====
De-allocate Network Install Resources
aixlpar1 machines standalone
>lpp_sourceaix710105 lpp_source
>spotaix710105 spot
>aixlpar1-71 mksysb
====
It appears that others were also experiencing this problem. I found the following thread on the IBM developerWorks AIX user forum:
NIM de-allocate with subclass=all doesn't work:
https://www.ibm.com/developerworks/forums/thread.jspa?threadID=464710
Someone even provided their own version of a NIM client reset script that offered another workaround to the problem:
nim -Fo reset $1
for i in bosinst_data fb_script image_data installp_bundle lpp_source mksysb nim_script script spot ; do
ressources_to_clean=$(lsnim -l $1 | grep $i | awk '{print $NF}')
for j in ${ressources_to_clean} ; do
nim -Fo de-allocate -a $i=$j $1
done
done
I reported the issue to IBM AIX support and discovered that this is a known issue with 7.1 TL2.
This is a known issue which recently has been documented in 2 open
APARs: IV32570 and IV32670: UPDATE NIM BINARIES FOR UPDATES.
Error description
One known symptom (of this issue) is that "nim -Fo
de-allocate -a subclass=all <client>" returns successfully but the
resource will still be allocated.
The problem occured because the "update" pack that brings you from
7.1.1.x to 7.1.2.0 missed a piece that effected the bos.sysmgt.7.1.2.0
fileset.
Currently there is no fix available and no projected timeframe when this
issue will be fixed (i assume it will be with the next SP for AIX
7100-02)
However, a workaround is allready documented in our incidents
database - you simply need to force reinstall the bos.sysmgt.nim.master
7.1.2.0 fileset using your AIX 7.1 TL02 media.
This is not a backleveling of the fileset, you are simply force
overwriting the full base level at the same version that you are
currently at. It will still be at 7100-02.
The workaround is a force overwrite of the bos.sysmgt.nim.master 7.1.2.0
from media."
The AIX support team suggested that I download the necessary install fileset from the following location:
ftp://testcase.software.ibm.com/fromibm/aix/bos.sysmgt.7.1.2.0.I
I backed up my NIM database before re-installing the fileset, just in case.
---------------------------------------------------------
Starting NIM Database Backup on nim1 at Wed Dec 12 12:39:43 EETDT 2012
a ./etc/objrepos/nim_attr 32 blocks.
a ./etc/objrepos/nim_attr.vc 112 blocks.
a ./etc/objrepos/nim_object 8 blocks.
a ./etc/objrepos/nim_object.vc 24 blocks.
a ./etc/NIM.level 1 blocks.
a ./etc/niminfo 1 blocks.
a ./etc/NIM.primary.cpuid 1 blocks.
Finished NIM Database Backup on nim1 at Wed Dec 12 12:39:44 EETDT 2012
---------------------------------------------------------
I placed the fileset into a separate directory on the NIM master and ran inutoc.
root@nim1 : /home/cgibson/NIMPMR # ls -ltr
total 36170
-rw-r--r-- 1 cgibson staff 18512896 Dec 12 12:21 bos.sysmgt.7.1.2.0.I
-rw-r--r-- 1 root system 4778 Dec 12 12:35 .toc
Then I re-installed the fileset (force OVERWRITE) on the NIM master:
Install Software
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* INPUT device / directory for software .
* SOFTWARE to install [@ 7.1.2.0 Network Install Manager - Master Tools @@I:bos.sysmgt.nim.master 7>
PREVIEW only? (install operation will NOT occur) no
COMMIT software updates? yes
SAVE replaced files? no
AUTOMATICALLY install requisite software? no
EXTEND file systems if space needed? yes
OVERWRITE same or newer versions? yes
VERIFY install and check file sizes? no
Include corresponding LANGUAGE filesets? yes
DETAILED output? yes
Process multiple volumes? yes
ACCEPT new license agreements? yes
Preview new LICENSE agreements? no
The fileset re-installed without a problem.
Installation Summary
--------------------
Name Level Part Event Result
-------------------------------------------------------------------------------
bos.sysmgt.nim.master 7.1.2.0 USR APPLY SUCCESS
root@nim1 : /home/cgibson/NIMPMR # lslpp -l bos.sysmgt.nim.master
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.sysmgt.nim.master 7.1.2.0 COMMITTED Network Install Manager -
Master Tools
I re-tried installing AIX on a NIM client.
root@nim1 : / # lsnim -l aixlpar1
aixlpar1:
class = machines
type = standalone
connect = shell
platform = chrp
netboot_kernel = 64
if1 = network1 aixlpar1 0
cable_type1 = N/A
Cstate = Base Operating System installation is being performed
prev_state = BOS installation has been enabled
Mstate = in the process of booting
info = verifying_data_files
boot = boot
lpp_source = lpp_sourceaix710105
mksysb = aixlpar1-71
nim_script = nim_script
spot = spotaix710105
cpuid = 00C453C75C00
control = master
Cstate_result = success
installed_image = aixlpar1-71
Once the install completed I found that all allocated NIM resources (lpp_source, mksysb and SPOT) were de-allocated. Problem solved.
root@nim1 : / # lsnim -l aixlpar1
aixlpar1:
class = machines
type = standalone
connect = shell
platform = chrp
netboot_kernel = 64
if1 = network1 aixlpar1 0
cable_type1 = N/A
Cstate = ready for a NIM operation
prev_state = in the process of booting
Mstate = not running
cpuid = 00C453C75C00
Cstate_result = success
installed_image = aixlpar1-71
So if you are planning on updating your NIM master to 7.1 TL2, please take note and make sure you implement the workaround.