IBM / ansible-power-aix

Developer contributions for Ansible Automation on Power
https://ibm.github.io/ansible-power-aix/
GNU General Public License v3.0
81 stars 96 forks source link

Not able to update service pack on AIX client through NIM server #510

Closed mpanwar2023 closed 2 months ago

mpanwar2023 commented 7 months ago

We are installing service pack update on AIX LPAR using Ansible Automation Platform through NIM . We are using Ansible Playbook to install service pack but we are unable to do that as we are getting below error.

service pack update error:

"stderr": "0042-001 nim: processing error encountered on \"master\":\n 0042-001 m_cust: processing error encountered on \"dsmmnad01\":\n 0042-175 c_script: An unexpected result was returned by the \"dsmjcanim01:/export/nim/scripts/dsmmnad01.script\" command:\n\n0042-175 c_installp: An unexpected result was returned by the \"/usr/lib/instl/sm_inst\" command:\nInput device or directory does not exist.\n\n\n"

Also , Please find below the content under Playbook for which we are using to install service pack updates.


~~~~~~~~~~~~~~~~~

AIX_NIM_SERVICE_PACK_UPDATE

This playbook is the follow up work from running aix_nim_suma

This playbook will be run on what we determined were the targets of the

last playbook, and then service pack updates will be installed

~~~~~~~~~~~~~~~~~

#######################################################################

To do this, we use the nim module which is within the aix_nim_suma role

under the task nim.yml

#######################################################################

Other playbook:


#######################################################################

First, remove old e fixes before running service pack updates

#######################################################################

#######################################################################

Install the Service Pack Update materials to the client servers

#######################################################################

...

mpanwar2023 commented 7 months ago

Do we have any update here. We are using ansible automation platform and we are not able to update the service pack in aix.

schamola commented 7 months ago

Hi @mpanwar2023 , Thank you for reporting the issue. We will look into it, and let you know of any updates !

schamola commented 7 months ago

Hi @mpanwar2023 , Thank you for reporting the issue. We will look into it, and let you know of any updates !

mpanwar2023 commented 7 months ago

Do we have any update on it?

mpanwar2023 commented 7 months ago

Do we have any further progress on it? Please respond

schamola commented 7 months ago

Hi @mpanwar2023 We were stuck with other items and we are prioritising this. We will update you soon !

nitismis commented 7 months ago

Hi @mpanwar2023 I believe there is some mix up in your environment because: You are running this: _name: Apply Service Pack Update Patches from Nim Server hosts: all tasks: name: Run nim role ansible.builtin.include_role: name: aix_nim_suma tasksfrom: nim.yml we are not providing any role named aix_nim_suma. Have you written your own role for the purpose ?

Also, I believe the error is not coming from any of our module or role:

"stderr": "0042-001 nim: processing error encountered on "master":\n 0042-001 m_cust: processing error encountered on "dsmmnad01":\n 0042-175 c_script: An unexpected result was returned by the "dsmjcanim01:/export/nim/scripts/dsmmnad01.script" command:\n\n0042-175 c_installp: An unexpected result was returned by the "/usr/lib/instl/sm_inst" command:\nInput device or directory does not exist.\n\n\n"

I suspect this is an user error, and if you want us to help you in writing the playbook for your automation because you are new here, that's out of scope.

Thanks,

mpanwar2023 commented 7 months ago

Hi @schamola Please update on it. we have to update the service pack on all servers soon.

schamola commented 7 months ago

@mpanwar2023 Have a look at @nitismis 's comment.. It sums up the suspected issue.

mpanwar2023 commented 7 months ago

@nitismis We are working with Red hat support people to setup the Ansible automation platform and for that we purchase the AAP license. We already setup lot of things, as of now service pack update is failing. and they ask us to take help from this github community. Let me know in case you need additional information or want to connect with red hat representative on that.

We need your support to right the playbook for service now update via NIM servers. Currently latest service pack was downloaded on NIM server and we are using NIM server to update the service pack on client. But it is failing with that error.

mpanwar2023 commented 7 months ago

Do we have any update on it? or let me guide who can help.

nitismis commented 7 months ago

@mpanwar2023

I believe there is some mix up in your environment because: You are running this: name: Apply Service Pack Update Patches from Nim Server hosts: all tasks: name: Run nim role ansible.builtin.include_role: name: aix_nim_suma tasks_from: nim.yml we are not providing any role named aix_nim_suma. Have you written your own role for the purpose ?

mpanwar2023 commented 6 months ago

Red hat people written that role. During the engagement they setup this things. Please help.

Rich-J-AIX commented 6 months ago

Perhaps it would help if you labeled the code extracts with the names of the playbooks. I suspect the "nim.yml" tasks inside your aix_nim_suma role are the ones you shared calling the "ibm.power_aix.nim" module, but would be helpful to know for sure.

The LPP_Source resources must match a specific naming convention - although I have not seen it documented:

You should also provide some output from the NIM server. e.g. :

Also from your target client (dsmmnad01):

Hope this helps

mpanwar2023 commented 6 months ago

Please find the command's output below.

root@dsmjcanim01:/# lsnim -l dsmmnad01 dsmmnad01: class = machines type = standalone connect = nimsh platform = chrp netboot_kernel = 64 if1 = net_10_45_8 dsmmnad01 0 net_settings1 = auto auto cable_type1 = N/A Cstate = ready for a NIM operation prev_state = customization is being performed Mstate = currently running cpuid = 00C71E084C00 Cstate_result = failure root@dsmjcanim01:/# lsnim -t lpp_source AIX72TL4SP1 resources lpp_source AIX72TL5 resources lpp_source 7100-05-12-2320-lpp_source resources lpp_source 7200-05-07-2346-lpp_source resources lpp_source 7200-05-05-2246-lpp_source resources lpp_source root@dsmjcanim01:/# lsnim -l 7200-05-07-2346-lpp_source 7200-05-07-2346-lpp_source: class = resources type = lpp_source comments = "Updates from 7200-05 to 7200-05-07-2346" arch = power Rstate = ready for use prev_state = unavailable for use location = /export/nim/hbcbs_sw/AIX_UPDATES/7200-05-07-2346-lpp_source alloc_count = 0 server = master

root@dsmmnad01:/# oslevel -s 7200-05-06-2320

All the playbook and their role for service pack update here.

Playbook name: aix_nim_service_pack_update.yml


~~~~~~~~~~~~~~~~~

AIX_NIM_SERVICE_PACK_UPDATE

This playbook is the follow up work from running aix_nim_suma

This playbook will be run on what we determined were the targets of the

last playbook, and then service pack updates will be installed

~~~~~~~~~~~~~~~~~

#######################################################################

To do this, we use the nim module which is within the aix_nim_suma role

under the task nim.yml

#######################################################################

...

Next playbook nim.yml playbook which is under role aix_nim_suma


#######################################################################

First, remove old e fixes before running service pack updates

#######################################################################

#######################################################################

Install the Service Pack Update materials to the client servers

#######################################################################

...

Next playbook efix_removal.yml playbook which is also under aix_nim_suma

Next playbook under var main.yml content

oslevel: Latest

#######################################################################

The following variables are entered through the survey:

- targets: a comma separated list of targets to install on (needed for download only)

- nim_master: the NIM server that you will be installing updates from (needed for install only)

- lpp_source: name of the service pack update package located on the NIM server

to be installed on NIM clients (needed for install only)

#######################################################################

...

Next playbook Defaults under same role aix_nim_suma


defaults file for aix_nim_suma

lpp: 7200-05-07-2346-lpp_source nim_master: nim_server_name

mpanwar2023 commented 6 months ago

Hello Team,

Can anyone to write the playbook for us on service pack update in AIX through NIM.

nitismis commented 6 months ago

@mpanwar2023 , we are looking for someone who can help you. Give us sometime.

mpanwar2024 commented 5 months ago

Its been a month when we receive last update. Would you please update on this. Any help would be really appreciated.

cgibson-ibm commented 5 months ago

Sharing this blog with you, in case it helps: https://community.ibm.com/community/user/power/blogs/chris-gibson1/2024/05/30/automating-aix-updates-with-ansible

mpanwar2024 commented 5 months ago

We will review this however it seems this is more related to Ansible core, we are using ansible automation platform and we have playbook created for service pack but it is consistently not working. Like on few servers its complete and on few it get failed. then we run it on failed server and again few servers get success and few failed and it continue till it complete.

Once it failed service pack update it doesn't move to next workflow job.

nitismis commented 4 months ago

@mpanwar2023 , did you go through the blog ? Did it work for you or you still need help on this ?

mpanwar2023 commented 4 months ago

Hi Nitish,

As I already mention that above link is for Ansible core but we are using ansible automation platform. Would you please suggest?

nitismis commented 4 months ago

I will have a discussion with team who can help you on this today !

nitismis commented 4 months ago

I had discussion with SME and here is what they have to say: It seems that the issue may be triggered by NIM itself and not the Ansible code. Please share output of this: "tail -f /var/adm/ras/nim.log" The error suggests that the sm_inst command, which is part of the AIX installation utilities, is unable to find the specified input device or directory. Maybe you should try running the NIM command manually to apply the patch and see if you get the same error.

nitismis commented 2 months ago

This is issue has been idle for 2 months, so closing it now and moreover this is problem with writing ansible playbooks. I highly suggest to contact IBM expert labs for concrete solution.