Monday, July 16, 2012

Solaris 10 registration

Registration with an adequate MOS credential is important to get patches.
Particularly, smpatch and patchsvr won't work if the system is not registered.
Make sure to have a properly configured Internet connection and DNS resolution.
There are many hard to pinpoint possibilities that may cause a registration attempt to fail.
For the latest details check My Oracle Support website and consider the following hints:
     
  • Make sure to have at least, patches:
    (with something such as $ showrev -p | grep 99999 | cut -c 1-17)
    SPARC: 121118-19, 123005-09, 124171-08, 123630-04, 123893-25
    X86:   121119-19, 123006-09, 124187-08, 123631-04, 123896-25

         
  • Install required patches, beginning by the Common Agent Container:

    # cacaoadm stop
    # patchadd 123896-XX
    # cacaoadm start
    # patchadd 121119-XX
    # patchadd 123006-XX
    ...

          
  •  Make sure registration database is clean:

    # cacaoadm stop
    # rm /var/scn/persistence/SCN*
    # /usr/lib/cc-ccr/bin/eraseCCRRepository
    # cacaoadm start

        
  • Edit registration profile, setting MOS credentials and proxy information only:

    # REG_FILE=RegistrationProfile.properties
    # cp /usr/lib/breg/data/$REG_FILE /tmp

    # vi /tmp/$REG_FILE

       
  • Perform the registration:

    # sconadm proxy -r /tmp/$REG_FILE
    # sconadm register -a -r /tmp/$REG_FILE
      
  • Adjust the patch source (and proxy, if needed):

    # smpatch set patchpro.patch.source=https://updates.oracle.com/
    # smpatch set patchpro.proxy.host=proxy-1
    # smpatch set patchpro.proxy.port=8080
    # smaptch set patchpro.proxy.user
    # smpatch set patchpro.proxy.passwd

       
  • For testing, attempt an update operation.
   
IMPORTANT
As for Solaris 10 Update 11 (aka 1/13) sconadm has been removed.
To register such new systems a cool hack has been recently indisclosed.
Perhaps (I haven't tested) it may help register other boxes too (U9 and U10).

s10-u10# cd /var/cc-ccr
s10-u10# tar cvf /tmp/cc-ccr.tar .
s10-u10# scp /tmp/cc-ccr.tar s10-u11:/tmp
s10-u10# rm -r /tmp/cc-ccr.tar

s10-u11# cd /var/cc-ccr
s10-u11# tar /tmp/cc-ccr.tar
s10-u11# rm -r /tmp/cc-ccr.tar

Note: Unfortunately patchsvr may not work either due to latest U10 Tomcat updates.