Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mpanwar2023 opened this issue Apr 19, 2024 · 17 comments
Open

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

mpanwar2023 opened this issue Apr 19, 2024 · 17 comments
Assignees

Comments

@mpanwar2023
Copy link

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

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

  • 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

Other playbook:


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

First, remove old e fixes before running service pack updates

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

  • name: calling efix removal task
    ansible.builtin.include_tasks:
    file: efix_removal.yml

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

Install the Service Pack Update materials to the client servers

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

  • name: Run AIX Service Pack updates
    ibm.power_aix.nim:
    action: update
    lpp_source: latest_sp
    targets: "{{ ansible_hostname }}"
    delegate_to: "{{ nim_master }}"

    ^ This will be the nim server that you ran nim_suma on

...

@mpanwar2023
Copy link
Author

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
Copy link
Contributor

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

1 similar comment
@schamola
Copy link
Contributor

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

@schamola schamola self-assigned this Apr 22, 2024
@mpanwar2023
Copy link
Author

Do we have any update on it?

@mpanwar2023
Copy link
Author

Do we have any further progress on it? Please respond

@schamola
Copy link
Contributor

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

@nitismis
Copy link
Member

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

tasks_from: 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
Copy link
Author

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

@schamola
Copy link
Contributor

schamola commented Apr 30, 2024

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

@mpanwar2023
Copy link
Author

@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
Copy link
Author

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

@nitismis
Copy link
Member

nitismis commented May 4, 2024

@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
Copy link
Author

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

@Rich-J-AIX
Copy link
Contributor

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:

  • VVVV-TT-SS-YYMM-lpp_source
    e.g. :
  • 7300-01-01-2246-lpp_source

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

  • lsnim -l dsmmnad01
  • lsnim -t lpp_source
  • lsnim -l <lpp source that will match "latest_sp">

Also from your target client (dsmmnad01):

  • oslevel -s

Hope this helps

@mpanwar2023
Copy link
Author

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

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

  • 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

...

Next playbook
nim.yml playbook which is under role aix_nim_suma


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

First, remove old e fixes before running service pack updates

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

  • name: calling efix removal task
    ansible.builtin.include_tasks:
    file: efix_removal.yml

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

Install the Service Pack Update materials to the client servers

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

  • name: Run AIX Service Pack updates
    ibm.power_aix.nim:
    action: update
    device: /export/nim/hbcbs_sw/AIX_UPDATES/
    lpp_source: "{{ lpp }}"
    targets: "{{ ansible_hostname }}"
    delegate_to: "{{ nim_master }}"

    ^ This will be the nim server that you ran nim_suma on

...

Next playbook
efix_removal.yml playbook which is also under aix_nim_suma

  • name: List interim fix on the system
    ibm.power_aix.emgr:
    action: list
    register: output

  • ansible.builtin.debug:
    msg: "Ifixes to be removed: {{ output.ifix_details }}"

  • name: parsing list of ifixes
    ansible.builtin.set_fact:
    ifix_labels: "{{ ifix_labels | default([]) + [item.LABEL] }}"
    loop: "{{ output.ifix_details }}"
    when: output.ifix_details is defined

  • name: remove all ifixes
    ibm.power_aix.emgr:
    action: remove
    ifix_label: "{{ item }}"
    loop: "{{ ifix_labels }}"
    when: ifix_labels is defined

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

@nitismis nitismis assigned nitismis and unassigned schamola May 13, 2024
@mpanwar2023
Copy link
Author

Hello Team,

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

@nitismis
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants