Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
  • 1.  salt-3001.1 still has the wrong init script

    Posted Fri August 06, 2021 06:04 AM
    Dear Team,

    last year in June I mentioned that the init script in the salt package is for Debian or Suse only and it's not working on AIX...
    Now with the new Version it is just the same. The init script in the rpm in for Linux only.

    But the bigger problem for us is the Requirement for yum-utils because it is installing python2 as dependency which is not supported in our environment anymore.
    As package maintaining is not possible with salt on AIX anyway, I tried to hash out this requirement.
    My problem now is, I can't build a rpm out of it on our system and environment.
    I've getting a lot of warnings and it stops with following error:

     /opt/freeware/bin/python3.7m setup.py install -O1 --root /export/standardbuild/tmp/salt-3001.1-1.ppc
    /opt/freeware/bin/python3.7m: can't open file 'setup.py': [Errno 2] No such file or directory
    error: Bad exit status from /export/standardbuild/tmp/rpm-tmp.8aS7ec (%install)
    
    
    RPM build errors:
        Macro expanded in comment on line 13: %global __inst_layout --install-layout=unix
    
        Macro expanded in comment on line 13: %global __inst_layout --install-layout=unix
    
        Macro expanded in comment on line 345: %{_sysconfdir}/salt/
    
        Macro expanded in comment on line 346: %{_sysconfdir}/salt/pki
    
        Macro expanded in comment on line 347: %{fish_dir}/salt*.fish​


    So, might it be possible for you to send me the salt rpms without having the requirement of yum-utils?
    That would be very kind of you...

    Many thanks in advance.

    best regards,

    Joerg



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------

    #AIXOpenSource


  • 2.  RE: salt-3001.1 still has the wrong init script

    Posted Sun August 08, 2021 08:02 AM
    Hi Joerg,

    We will look into it. I am not sure why salt has yum-utils dependency. 
    It may be wrong dependency we will check.

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 3.  RE: salt-3001.1 still has the wrong init script

    Posted Mon August 09, 2021 10:03 AM
    Hello Sanket,

    thanks for looking into it. "yum-utils" is a requirement on RedHat based systems for installing packages, but on AIX it is not working.

    best regards,
    Joerg

    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 4.  RE: salt-3001.1 still has the wrong init script

    Posted Wed November 10, 2021 08:51 AM
    Hello Sanket,

    may I come back to you regarding the init script for the salt-minion...
    The init script is still for Linux not for AIX. So we wrote our own star-stop script.
    Now we updated to the latest version 3003 and the upgrade has overwritten our init script with the linux init script.
    Might it be possible to deliver salt without the init script or alternatively with an AIX version of it???

    Many thanks in advance...

    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 5.  RE: salt-3001.1 still has the wrong init script

    Posted Wed November 10, 2021 09:21 AM
    Hi Joerg,

    Sorry to hear the issue.
    We will look into it.
    Is it possible for you to share your init scripts so that we can see if that can be integrated into salt package?

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 6.  RE: salt-3001.1 still has the wrong init script

    Posted Wed November 10, 2021 09:35 AM
      |   view attached

    Hello Sanket,

    thanks for your fast response.
    I attached our init file to this post.
    Also here in clear text:

    #!/usr/bin/ksh
    
    CONFIG_FILE=/etc/salt/minion
    PATH_TO_BINARY=/opt/freeware/bin/salt-minion
    SCRIPT_NAME=$0
    
    PROCESS_NAME=$(basename $PATH_TO_BINARY)
    
    function usage
    {
            echo "Usage: $SCRIPT_NAME [start|stop|status|forcestart]"
            exit 1
    }
    
    # we need one argument
    [[ $# -ne 1 ]] && usage
    
    #PID_FILE=$(grep -i ^PidFile $CONFIG_FILE|cut -d' ' -f2)
    PID_FILE=$(grep -i PidFile: $CONFIG_FILE|cut -d' ' -f2)
    
    case $1 in
            start)  if [[ -f $PID_FILE ]]
                    then
                            echo "$PROCESS_NAME seems to be already running, restart"
                            echo "stopping $PROCESS_NAME..."
                            kill $(cat $PID_FILE)
                            rm $PID_FILE
                            $PATH_TO_BINARY -d
                    else
                            echo "starting $PROCESS_NAME -d ..."
                            $PATH_TO_BINARY -d
                    fi
                    ;;
            stop)   if [[ -f $PID_FILE ]]
                    then
                            echo "stopping $PROCESS_NAME..."
                            kill $(cat $PID_FILE)
                            rm $PID_FILE
                    else
                            echo "$PROCESS_NAME seems not to be running"
                    fi
                    ;;
            status) if [[ -f $PID_FILE ]]
                    then
                            echo "$PROCESS_NAME is running with PID $(cat $PID_FILE)"
                    else
                            echo "$PROCESS_NAME seems not to be running"
                    fi
                    ;;
            forcestart)  # run script with this parameter during server boot to avoid leftover pid-files from incorrect shutdown
                    rm -f $PID_FILE
                    echo "starting $PROCESS_NAME -f $CONFIG_FILE ..."
                    $PATH_TO_BINARY -d
                    ;;
            *)      usage
                    ;;
    esac


    Thanks for following up on this...

    Best regards



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------

    Attachment(s)

    zip
    salt-minion.zip   701 B 1 version