AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  Ansible DNF module causes memory error

    Posted Thu November 16, 2023 09:14 AM

    Writing a playbook to configure an AIX 7.3 system and I'm getting a memory allocation error when using dnf module to install python3 or any other package for that matter (tried the same command with curl).  Running the module on its own produces the same error, see below. This is a fresh AIX install, I've upped the memory to 4GB. The dnf command on its own works fine. After curl is installed, the module doesn't error.

    aixtest01:/home/root/ansible# ansible -vv aix_test -i inventory.ini -m ansible.builtin.dnf -a "name=curl state=latest update_cache=true"
    ansible [core 2.14.2]
      config file = /home/root/ansible/ansible.cfg
      configured module search path = ['/home/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
      ansible python module location = /opt/freeware/lib/python3.9/site-packages/ansible
      ansible collection location = /home/root/.ansible/collections:/usr/share/ansible/collections
      executable location = /opt/freeware/bin/ansible
      python version = 3.9.18 (main, Sep 19 2023, 04:57:07) [GCC 10.3.0] (/opt/freeware/bin/python3.9)
      jinja version = 3.0.3
      libyaml = True
    Using /home/root/ansible/ansible.cfg as config file
    Skipping callback 'default', as we already have a stdout callback.
    Skipping callback 'minimal', as we already have a stdout callback.
    Skipping callback 'oneline', as we already have a stdout callback.
    aix_test | FAILED! => {
        "changed": false,
        "module_stderr": "Shared connection to aix_test closed.\r\n",
        "module_stdout": "Out of memory allocating 41943040 bytes!\r\n/bin/sh: 6816044 IOT/Abort trap(coredump)\r\n",
        "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
        "rc": 134
    }
    aixtest01:/home/root/ansible# ssh aix_test "oslevel -s ; lsattr -El sys0 | grep realmem ; lsps -a ; df"
    7300-02-01-2346
    realmem         4194304                              Amount of usable physical memory in Kbytes          False
    Page Space      Physical Volume   Volume Group    Size %Used   Active    Auto    Type   Chksum
    hd6             hdisk0            rootvg        3072MB     2     yes     yes      lv       0
    Filesystem    512-blocks      Free %Used    Iused %Iused Mounted on
    /dev/hd4          524288     76752   86%     6104    39% /
    /dev/hd2         6291456    947736   85%    56177    31% /usr
    /dev/hd9var     41943040  41773504    1%      967     1% /var
    /dev/hd3        41943040  33730120   20%      995     1% /tmp
    /dev/hd1          524288    523480    1%        7     1% /home
    /dev/hd11admin     524288    523488    1%        5     1% /admin
    /proc                  -         -    -        -      - /proc
    /dev/hd10opt    41943040  40967232    3%     7299     1% /opt
    /dev/livedump     524288    523552    1%        4     1% /var/adm/ras/livedump
    aixtest01:/home/root/ansible# ssh aix_test /opt/freeware/bin/dnf -y install curl
    AIX noarch repository                           759 kB/s | 3.0 MB     00:03
    AIX 7.3 specific repository                     158 kB/s | 401 kB     00:02
    Last metadata expiration check: 0:00:01 ago on Thu Nov 16 08:05:02 CST 2023.
    Dependencies resolved.
    ================================================================================
     Package             Arch       Version             Repository             Size
    ================================================================================
    Installing:
     curl                ppc        8.4.0-1             AIX_Toolbox           1.9 M
    ...
    Installed:
      curl-8.4.0-1.ppc           cyrus-sasl-2.1.28-1.ppc  db-1:5.3.28-1.ppc
    ...
    Complete!
    aixtest01:/home/root/ansible# ansible -vv aix_test -i inventory.ini -m ansible.builtin.dnf -a "name=curl state=latest update_cache=true"
    ansible [core 2.14.2]
      config file = /home/root/ansible/ansible.cfg
      configured module search path = ['/home/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
      ansible python module location = /opt/freeware/lib/python3.9/site-packages/ansible
      ansible collection location = /home/root/.ansible/collections:/usr/share/ansible/collections
      executable location = /opt/freeware/bin/ansible
      python version = 3.9.18 (main, Sep 19 2023, 04:57:07) [GCC 10.3.0] (/opt/freeware/bin/python3.9)
      jinja version = 3.0.3
      libyaml = True
    Using /home/root/ansible/ansible.cfg as config file
    Skipping callback 'default', as we already have a stdout callback.
    Skipping callback 'minimal', as we already have a stdout callback.
    Skipping callback 'oneline', as we already have a stdout callback.
    aix_test | SUCCESS => {
        "changed": false,
        "msg": "Nothing to do",
        "rc": 0,
        "results": []
    }



    ------------------------------
    Mark Steele
    ------------------------------


  • 2.  RE: Ansible DNF module causes memory error

    Posted Thu November 16, 2023 09:20 AM

    might be related -> https://community.ibm.com/community/user/power/discussion/ansible-and-dnf#bm3302df1b-9ade-46cc-8504-4df5bf0c1d1a



    ------------------------------
    I regret starting this entire conversation
    ------------------------------