AIX

 View Only
  • 1.  AIX 7200-05 update from 7200-03-02 - rpm.rte ends up BROKEN

    IBM Champion
    Posted Thu May 06, 2021 07:49 PM
    Updating a host from AIX 7200-03-02 to 7200-05-02 (will subsequently patch to 7200-05-02).  rpm.rte ends up broken.  Any ideas?  I've reproduced this twice.  Can't forcibly overwrite it from media...  There's no release notes on this, that I could see...


    ./rpm.rte.pre_rm[321]: 4^J4: syntax error
    Failure occurred during pre_rm.
    Failure occurred during rminstal.
    Finished processing all filesets. (Total time: 1 secs).

    +-----------------------------------------------------------------------------+
    Summaries:
    +-----------------------------------------------------------------------------+

    Installation Summary
    --------------------
    Name Level Part Event Result
    -------------------------------------------------------------------------------
    rpm.rte 4.15.1.1 USR APPLY CANCELED


    # lppchk -v

    lppchk: The following filesets need to be installed or corrected to bring
    the system to a consistent state:

    rpm.rte 4.13.0.4 (usr: COMMITTED, root: BROKEN)



    Anyone got a handy way to get around this for future updates, or at least manually?


    ------------------------------
    Kevin Gee
    ------------------------------


  • 2.  RE: AIX 7200-05 update from 7200-03-02 - rpm.rte ends up BROKEN

    IBM Champion
    Posted Thu May 06, 2021 08:08 PM
    By the way, if I download 4.15.1.3 from http://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/INSTALLP/ppc/ and attempt to install it, I get the same errors, so it's definitely something with my host...

    Appreciate it...

    ------------------------------
    Kevin Gee
    Keller TX
    ------------------------------



  • 3.  RE: AIX 7200-05 update from 7200-03-02 - rpm.rte ends up BROKEN

    Posted Fri May 07, 2021 02:05 AM
    Edited by Chris Gibson Fri May 07, 2021 02:05 AM
    Hi, I think this error is the result of a duplicate rpmversion in the AIX ODM.
    What does this command return?

    # ODMDIR=/etc/objrepos /usr/bin/odmget -q lpp_name=rpm.rte product | grep ver | awk '{print $3}'

    If it returns more than one value, then there may be a need to remove one of the duplicate entries from the ODM.

    Anyway, let me know.

    Cheers,
    Chris


    ------------------------------
    CHRIS GIBSON
    ------------------------------



  • 4.  RE: AIX 7200-05 update from 7200-03-02 - rpm.rte ends up BROKEN

    IBM Champion
    Posted Fri May 07, 2021 09:37 AM
    Yeah, there are definitely two entries, which is strange.  And it may have been like this - I inherited this installation a couple of years ago.


    p18ksys:/ # odmget -q lpp_name=rpm.rte product

    (I know you wanted just a portion, but I gave you the whole thing).

    product:
            lpp_name = "rpm.rte"
            comp_id = ""
            update = 0
            cp_flag = 2359571
            fesn = ""
            name = "rpm.rte"
            state = 10
            ver = 4
            rel = 13
            mod = 0
            fix = 3
            ptf = ""
            media = 3
            sceded_by = ""
            fixinfo = ""
            prereq = "*prereq bos.rte 5.2.0.0\n\
    *prereq perl.rte\n\
    "
            description = "RPM Package Manager"
            supersedes = ""

    product:
            lpp_name = "rpm.rte"
            comp_id = ""
            update = 0
            cp_flag = 2097427
            fesn = ""
            name = "rpm.rte"
            state = 7
            ver = 4
            rel = 13
            mod = 0
            fix = 4
            ptf = ""
            media = 3
            sceded_by = ""
            fixinfo = ""
            prereq = "*prereq bos.rte 5.2.0.0\n\
    *prereq perl.rte\n\
    "
            description = "RPM Package Manager"
            supersedes = ""


    p18ksys:/ # odmget -q lpp_name=rpm.rte product

    product:
            lpp_name = "rpm.rte"
            comp_id = ""
            update = 0
            cp_flag = 2359571
            fesn = ""
            name = "rpm.rte"
            state = 10
            ver = 4
            rel = 13
            mod = 0
            fix = 3
            ptf = ""
            media = 3
            sceded_by = ""
            fixinfo = ""
            prereq = "*prereq bos.rte 5.2.0.0\n\
    *prereq perl.rte\n\
    "
            description = "RPM Package Manager"
            supersedes = ""

    product:
            lpp_name = "rpm.rte"
            comp_id = ""
            update = 0
            cp_flag = 2097427
            fesn = ""
            name = "rpm.rte"
            state = 7
            ver = 4
            rel = 13
            mod = 0
            fix = 4
            ptf = ""
            media = 3
            sceded_by = ""
            fixinfo = ""
            prereq = "*prereq bos.rte 5.2.0.0\n\
    *prereq perl.rte\n\
    "
            description = "RPM Package Manager"
            supersedes = ""



    Also interesting to note -



      Fileset         Level     Action       Status       Date         Time
      ----------------------------------------------------------------------------
    Path: /usr/lib/objrepos
      rpm.rte
                     4.13.0.3   COMMIT       COMPLETE     12/21/18     11:16:12
                     4.13.0.4   COMMIT       COMPLETE     12/21/18     11:19:42

    Path: /etc/objrepos
      rpm.rte
                     4.13.0.3   COMMIT       COMPLETE     12/21/18     11:16:17
                     4.13.0.4   APPLY        BROKEN       12/21/18     11:19:49



    Now I feel really stupid, because it may have been broken all along.


    (Bernard - by the way, the rpm script is fine - I've been trying to debug in my spare time what's going on with it...)


    rpm.rte is a non-deinstallable fileset.  Should I just remove the 4.13.0.4 entry from the product ODM database and try this again?  


    Kevin R.Gee 






  • 5.  RE: AIX 7200-05 update from 7200-03-02 - rpm.rte ends up BROKEN

    Posted Fri May 07, 2021 01:37 PM
    Hi, Kevin

    I could not tell if you were checking ROOT or USR, but you definitely have an old version in the ODM.
    I have seen this once or twice, with WPARs, or alt_disk installations.

    Here are some instructions that should cleanup the issue.

    1. Backup the ODM using the following command:
    # /usr/lib/instl/saveodms rpm.fix.backup --> this saves the VPD to /u/rpm.fix.backup.odm

    2. Prepare to examine the USR part of the ODM.
    # export ODMDIR=/usr/lib/objrepos

    3. Determine the lpp_id for the fileset that could not be removed with installp.
    # odmget -q name=rpm.rte lpp
    • Take note of the the USR part lpp_id for reference while doing other steps.
    EXAMPLE:
    # odmget -q name=rpm.rte lpp

    lpp:
            name = "rpm.rte"
            size = 0
            state = 5
            cp_flag = 2097427
            group = ""
            magic_letter = "I"
            ver = 4
            rel = 13
            mod = 0
            fix = 11
            description = "RPM Package Manager"
            lpp_id = 1043
    4. Delete the filesets from  the USR part of the ODM.
    # odmdelete -q name=rpm.rte -o lpp
    # odmdelete -q lpp_name=rpm.rte -o product
    # odmdelete -q lpp_id=<lpp_id from command above> -o history
    # odmdelete -q lpp_id=<lpp_id from command above> -o inventory

    5. Prepare to examine the ROOT part of the ODM
    # export ODMDIR=/etc/objrepos

    6. Determine the lpp_id for the fileset.
    # odmget -q name=rpm.rte lpp
    • Take note of the ROOT part lpp_id for reference while doing other steps. 
    • If the command does not return data, there is no ODM information present in the ROOT part /etc/objrepos. Proceed to step #8.
    7. Delete the filesets from the ROOT part of the ODM.
    # odmdelete -q name=rpm.rte -o lpp
    # odmdelete -q lpp_name=rpm.rte -o product
    # odmdelete -q lpp_id=<lpp_id from command above> -o history
    # odmdelete -q lpp_id=<lpp_id from command above> -o inventory

    8. Check the SWVPD for remaining filesets.
    # lslpp -l rpm.rte

    9. Check the SWVPD for errors.
    # lppchk -v

    Then you should be able to update as needed.

    If you still have issues, run the following script, and open an AIX Support case. Upload the /tmp/odmcheck.out file against your new case.

    #!/bin/sh

    if [[ -z "$1" ]]; then
        echo "$0: usage: $0 fileset name"
        exit 1
    fi
    OODMDIR=$ODMDIR
    LPP=$1
    LOGFILE=/tmp/odmcheck.out
      if [[ -e $LOGFILE ]]; then
       /usr/bin/mv $LOGFILE $LOGFILE.`date +%m%d%y-%H%M%S`
      fi


    printf "Collecting ODM Data for %s:\n" $LPP > $LOGFILE

    # CHECK USR PART
    ODMDIR=/usr/lib/objrepos
    printf "\n### Checking USR part.... \n" >> $LOGFILE


    printf "\nLPP_CHECK:\n" >> $LOGFILE
    odmget -q name=$LPP lpp >> $LOGFILE


    ULPPID=`odmget -q name=$LPP lpp | grep lpp_id | cut -f2 -d"=" | tr -d " "`

    printf "\nPRODUCT_CHECK:\n" >> $LOGFILE
    odmget -q "name=$LPP" product   >> $LOGFILE


    printf "\nINVENTORY_CHECK:\n"  >> $LOGFILE
    odmget -q "lpp_id=$ULPPID" inventory   >> $LOGFILE


    printf "\nHISTORY_CHECK:\n" >> odmcheck.out
    odmget -q "lpp_id=$ULPPID" history >> $LOGFILE


    # CHECK ROOT PART
    ODMDIR=/etc/objrepos
    printf "\n### Checking ROOT part.... \n" >> $LOGFILE


    printf "\nLPP_CHECK:\n"  >> $LOGFILE
    odmget -q name=$LPP lpp >> $LOGFILE


    ULPPID=`odmget -q name=$LPP lpp | grep lpp_id | cut -f2 -d"=" | tr -d " "`

    printf "\nPRODUCT_CHECK:\n"  >> $LOGFILE
    odmget -q "name=$LPP" product   >> $LOGFILE


    printf "\nINVENTORY_CHECK:\n"  >> $LOGFILE
    odmget -q "lpp_id=$ULPPID" inventory   >> $LOGFILE


    printf "\nHISTORY_CHECK:\n" >> odmcheck.out
    odmget -q "lpp_id=$ULPPID" history   >> $LOGFILE


    ODMDIR=$OODMDIR
    printf "Data collection complete: %s\n" $LOGFILE


    exit 0



    ------------------------------
    Jan Harris
    ------------------------------



  • 6.  RE: AIX 7200-05 update from 7200-03-02 - rpm.rte ends up BROKEN

    IBM Champion
    Posted Sun May 09, 2021 12:36 PM
    Update after playing around with a few things:

    1. I removed the two entries from the product ODM database.
    2. I replaced the script with the one from another system, after comparing them to the one Bernhard posted.

    A forced overwrite installation of rpm.rte works now and I was able to get everything else cleaned up.  It's now on 7200-05-02.

    Thanks, all.  This system does get touched by various people from time to time, and I should probably just make a flashcopy and restore it in between uses.

    ------------------------------
    Kevin Gee
    ------------------------------



  • 7.  RE: AIX 7200-05 update from 7200-03-02 - rpm.rte ends up BROKEN

    Posted Fri May 07, 2021 01:15 PM

    After installing rpm.rte, try running:

    /usr/sbin/updtvpkg



    ------------------------------
    Barry Williams
    ------------------------------



  • 8.  RE: AIX 7200-05 update from 7200-03-02 - rpm.rte ends up BROKEN

    Posted Fri May 07, 2021 06:48 AM
    You can examine 
    /usr/lpp/rpm.rte/inst_root/rpm.rte.pre_rm
    if it is truncated, damaged or contains wrong characters, e.g. near line 321 (however line number maybe does not match due to functions etc.)

    Thanks
    Bernhard
    --
    Mit freundlichen Grüßen / Kind regards
    Bernhard Zeller
    Lab Services Senior Consultant Power Systems, IBM Technology Sales, DACH

    ------------------------------
    Bernhard Zeller
    ------------------------------



  • 9.  RE: AIX 7200-05 update from 7200-03-02 - rpm.rte ends up BROKEN

    Posted Fri May 07, 2021 06:52 AM
      |   view attached
    Here one from rpm.rte 4.13.0.3

    ------------------------------
    Bernhard Zeller
    ------------------------------

    Attachment(s)

    tar
    rpm.rte.pre_rm.tar   20 KB 1 version