Hey Diego , Does VC commands run fine on nimserver when you do it there seems lslpp failing there
On Wed, 10 Jul 2019 at 10:10 pm, Diego Cappri <[email protected]> wrote: > Hi! > This is my first post. I'm having some issues when running FLRTVC on AIX > through NIM. Here's some info of my test lab: > > Ansible Engine: RHEL / Python 2.7.5 > AIX NIM Master: AIX 7.2 / Python 2.7.16 / NIM 7.2.2.0 > AIX NIM Client: AIX 7.2 / Python 2.7.16 > > This is the issue I have when trying to execute flrtvc from Ansible to NIM > Master then Client: > > TASK [FLRTVC] > ********************************************************************************************************************************************************************************************** > task path: /root/ansible-aix/aix_patch_flrtvc.yml:9 > ok: [nimserver] => { > "ansible_facts": { > "discovered_interpreter_python": "/usr/bin/python" > }, > "changed": false, > "invocation": { > "module_args": { > "apar": "sec", > "check_only": false, > "clean": false, > "csv": "/tmp/ansible", > "download_only": false, > "filesets": null, > "force": false, > "path": null, > "targets": "ALL", > "verbose": true > } > }, > "meta": { > "b01avi14553110": { > "0.report": "Failed to list filsets (lslpp) on b01avi14553110, > /tmp/ansible/work/lslpp_b01avi14553110.txt does not exist", > "messages": [ > "b01avi14553110: Failed to list fileset, command > "/usr/lpp/bos.sysmgt/nim/methods/c_rsh b01avi14553110 "/bin/lslpp -Lcq; > echo rc=$?"" failed: " 0042-006 c_rsh: (exec_nimsh_cmd) exec_cmd Error 0 > \n\npoll: setup failure\n"" > ] > }, > "master": { > "0.report": [ > "Fileset|Current Version|Type|EFix Installed|Abstract|Unsafe > Versions|APARs|Bulletin URL|Download URL|CVSS Base Score|Reboot > Required|Last Update|Fixed In" > ], > "1.parse": [], > "2.discover": [], > "3.download": [], > "4.1.reject": [], > "4.2.check": [], > "messages": [ > "Machine: b01avi14553110 will not be updated (flrtvc report failed)" > ] > } > }, > "msg": "FLRTVC completed successfully" > } > > TASK [debug] > *********************************************************************************************************************************************************************************************** > task path: /root/ansible-aix/aix_patch_flrtvc.yml:19 > ok: [nimserver] => { > "result": { > "ansible_facts": { > "discovered_interpreter_python": "/usr/bin/python" > }, > "changed": false, > "failed": false, > "meta": { > "b01avi14553110": { > "0.report": "Failed to list filsets (lslpp) on b01avi14553110, > /tmp/ansible/work/lslpp_b01avi14553110.txt does not exist", > "messages": [ > "b01avi14553110: Failed to list fileset, command > "/usr/lpp/bos.sysmgt/nim/methods/c_rsh b01avi14553110 "/bin/lslpp -Lcq; > echo rc=$?"" failed: " 0042-006 c_rsh: (exec_nimsh_cmd) exec_cmd Error 0 > \n\npoll: setup failure\n"" > ] > }, > "master": { > "0.report": [ > "Fileset|Current Version|Type|EFix Installed|Abstract|Unsafe > Versions|APARs|Bulletin URL|Download URL|CVSS Base Score|Reboot > Required|Last Update|Fixed In" > ], > "1.parse": [], > "2.discover": [], > "3.download": [], > "4.1.reject": [], > "4.2.check": [], > "messages": [ > "Machine: b01avi14553110 will not be updated (flrtvc report failed)" > ] > } > }, > "msg": "FLRTVC completed successfully" > } > } > META: ran handlers > META: ran handlers > > PLAY RECAP > ************************************************************************************************************************************************************************************************* > nimserver : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 > ignored=0 > ------------------------------ > > I was able to check on NIM Server that the command hangs, seems due a " > missing: root 18612692 8847780 0 14:52:37 pts/17 0:00 > /usr/lpp/bos.sysmgt/nim/methods/c_rsh b01avi14553110 "/bin/lslpp -Lcq; echo > rc=$? > I'm not a python expert, anyway I did some changes without luck. > > Here's the -vvv output when running the playbook: > ansible-playbook aix_patch_flrtvc.yml -vvv > ansible-playbook 2.8.0 > config file = /etc/ansible/ansible.cfg > configured module search path = [u'/root/.ansible/plugins/modules', > u'/usr/share/ansible/plugins/modules'] > ansible python module location = /usr/lib/python2.7/site-packages/ansible > executable location = /bin/ansible-playbook > python version = 2.7.5 (default, May 20 2019, 12:21:26) [GCC 4.8.5 > 20150623 (Red Hat 4.8.5-36)] > Using /etc/ansible/ansible.cfg as config file > host_list declined parsing /etc/ansible/hosts as it did not pass it's > verify_file() method > script declined parsing /etc/ansible/hosts as it did not pass it's > verify_file() method > auto declined parsing /etc/ansible/hosts as it did not pass it's > verify_file() method > Parsed /etc/ansible/hosts inventory source with ini plugin > > PLAYBOOK: aix_patch_flrtvc.yml > ***************************************************************************************************************************************************************************** > 1 plays in aix_patch_flrtvc.yml > > PLAY [FLRTVC on AIX playbook] > ****************************************************************************************************************************************************************************** > META: ran handlers > ESTABLISH SSH CONNECTION FOR USER: ansible > SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o > StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o > PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey > -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o > ControlPath=/root/.ansible/cp/972e828b47 nimserver '/bin/sh -c '"'"'echo > ~ansible && sleep 0'"'"'' > (0, '/home/ansible\n', '') > ESTABLISH SSH CONNECTION FOR USER: ansible > SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o > StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o > PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey > -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o > ControlPath=/root/.ansible/cp/972e828b47 nimserver '/bin/sh -c '"'"'( umask > 77 && mkdir -p "echo > /home/ansible/.ansible/tmp/ansible-tmp-1562597555.9-27347089795297" && > echo ansible-tmp-1562597555.9-27347089795297="echo > /home/ansible/.ansible/tmp/ansible-tmp-1562597555.9-27347089795297" ) && > sleep 0'"'"'' > (0, > 'ansible-tmp-1562597555.9-27347089795297=/home/ansible/.ansible/tmp/ansible-tmp-1562597555.9-27347089795297\n', > '') > Attempting python interpreter discovery > ESTABLISH SSH CONNECTION FOR USER: ansible > SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o > StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o > PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey > -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o > ControlPath=/root/.ansible/cp/972e828b47 nimserver '/bin/sh -c '"'"'echo > PLATFORM; uname; echo FOUND; command -v > '"'"'"'"'"'"'"'"'/usr/bin/python'"'"'"'"'"'"'"'"'; command -v > '"'"'"'"'"'"'"'"'python3.7'"'"'"'"'"'"'"'"'; command -v > '"'"'"'"'"'"'"'"'python3.6'"'"'"'"'"'"'"'"'; command -v > '"'"'"'"'"'"'"'"'python3.5'"'"'"'"'"'"'"'"'; command -v > '"'"'"'"'"'"'"'"'python2.7'"'"'"'"'"'"'"'"'; command -v > '"'"'"'"'"'"'"'"'python2.6'"'"'"'"'"'"'"'"'; command -v > '"'"'"'"'"'"'"'"'/usr/libexec/platform-python'"'"'"'"'"'"'"'"'; command -v > '"'"'"'"'"'"'"'"'/usr/bin/python3'"'"'"'"'"'"'"'"'; command -v > '"'"'"'"'"'"'"'"'python'"'"'"'"'"'"'"'"'; echo ENDFOUND && sleep 0'"'"'' > (0, > 'PLATFORM\nAIX\nFOUND\n/usr/bin/python\n/usr/bin/python2.7\n/usr/bin/python\nENDFOUND\n', > '') > Python interpreter discovery fallback (unsupported platform for extended > discovery: aix) > Using module file > /usr/lib/python2.7/site-packages/ansible/modules/system/aix_flrtvc.py > PUT /root/.ansible/tmp/ansible-local-30611qykm6l/tmplXZnZi TO > /home/ansible/.ansible/tmp/ansible-tmp-1562597555.9-27347089795297/AnsiballZ_aix_flrtvc.py > SSH: EXEC scp -C -o ControlMaster=auto -o ControlPersist=60s -o > StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o > PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey > -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o > ControlPath=/root/.ansible/cp/972e828b47 > /root/.ansible/tmp/ansible-local-30611qykm6l/tmplXZnZi > '[nimserver]:/home/ansible/.ansible/tmp/ansible-tmp-1562597555.9-27347089795297/AnsiballZ_aix_flrtvc.py' > (0, '', '') > ESTABLISH SSH CONNECTION FOR USER: ansible > SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o > StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o > PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey > -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o > ControlPath=/root/.ansible/cp/972e828b47 nimserver '/bin/sh -c '"'"'chmod > u+x /home/ansible/.ansible/tmp/ansible-tmp-1562597555.9-27347089795297/ > /home/ansible/.ansible/tmp/ansible-tmp-1562597555.9-27347089795297/AnsiballZ_aix_flrtvc.py > && sleep 0'"'"'' > (0, '', '') > ESTABLISH SSH CONNECTION FOR USER: ansible > SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o > StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o > PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey > -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o > ControlPath=/root/.ansible/cp/972e828b47 -tt nimserver '/bin/sh -c > '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo > BECOME-SUCCESS-ufbuggjlpfqznfeqkwortdszvjlaatdd ; /usr/bin/python > /home/ansible/.ansible/tmp/ansible-tmp-1562597555.9-27347089795297/AnsiballZ_aix_flrtvc.py'"'"'"'"'"'"'"'"' > && sleep 0'"'"'' > > (0, 'BECOME-SUCCESS-ufbuggjlpfqznfeqkwortdszvjlaatdd\r\n\r\n{"msg": > "FLRTVC completed successfully", "invocation": {"module_args": {"force": > false, "verbose": true, "check_only": false, "download_only": false, > "clean": false, "path": null, "csv": "/tmp/ansible", "targets": "ALL", > "apar": "sec", "filesets": null}}, "changed": false, "meta": > {"b01avi14553110": {"0.report": "Failed to list filsets (lslpp) on > b01avi14553110, /tmp/ansible/work/lslpp_b01avi14553110.txt does not exist", > "messages": ["b01avi14553110: Failed to list fileset, command > \"/usr/lpp/bos.sysmgt/nim/methods/c_rsh b01avi14553110 \"/bin/lslpp -Lcq; > echo rc=$?\"\" failed: \" 0042-006 c_rsh: (exec_nimsh_cmd) exec_cmd Error 0 > \n\npoll: setup failure\n\""]}, "master": {"0.report": ["Fileset|Current > Version|Type|EFix Installed|Abstract|Unsafe Versions|APARs|Bulletin > URL|Download URL|CVSS Base Score|Reboot Required|Last Update|Fixed In"], > "1.parse": [], "messages": ["Machine: b01avi14553110 will not be updated > (flrtvc report failed)"], "4.1.reject": [], "2.discover": [], "3.download": > [], "4.2.check": []}}}\r\n', 'Shared connection to nimserver closed.\r\n') > ESTABLISH SSH CONNECTION FOR USER: ansible > SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o > StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o > PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey > -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o > ControlPath=/root/.ansible/cp/972e828b47 nimserver '/bin/sh -c '"'"'rm -f > -r /home/ansible/.ansible/tmp/ansible-tmp-1562597555.9-27347089795297/ > > /dev/null 2>&1 && sleep 0'"'"'' > (0, '', '') > Here I break the command. > Any help/guidance will be very appreciated. > > Regards, > > Diego. > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/9cbbf14b-be31-4c77-8a70-559970fc9350%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/9cbbf14b-be31-4c77-8a70-559970fc9350%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Thank you & Best regards, Tom Ng email ID: [email protected] -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAMyQnJURNCm%3DB9kSCCRygQrhgOH03w-5UZX4aG3WLautKgMMxw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
