IBM / ansible-for-i

the tool is to provide several customized modules for Ansible to manage IBM i systems.
GNU General Public License v3.0
56 stars 55 forks source link

ibmi_fix_imgclg multiple IPLs #183

Open ceetonice opened 9 months ago

ceetonice commented 9 months ago

When installing PTFs with module ibmi_fix_imgclg. If a TR is apart of the install and requires and IPL for prerequisites. The process goes: run ansible script, installs ptf, requires IPL for prerequisites, run ansible script, then IPL again. If I do a normal install it only requires one IPL. Is there a way to correct this?

non-ansible way: CRTIMGCLG PTF2017MAY DIR('/IMGCAT/2017MAYPTF') CRTDIR(NO) ADDIMGCLGE PTF2017MAY FROMFILE('/imgcat/2017MAYPTF/C7068720_1.bin') TOFILE(C7068720_1.bin) Load Device INSPTF LICPGM((ALL)) DEV(OPTVRT01) INSTYP(DLYALL) PMTMED(MLTSRV)

With Ansible:

syahrul-aiman commented 9 months ago

If I'm not mistaken, you can make use of the ibmi_reboot module, example:

tasks:

- name: Reboot / IPL the machine before PTF Install
  ibm.power_ibmi.ibmi_reboot:

- name: Print PTF Install Start
  debug:
    msg: 'install start: {{ ptf_results.start }}'

- name: Install a list of PTFs from image catalog
  ibm.power_ibmi.ibmi_fix_imgclg:
    product_id:
    - '*ALL'
    src: "{{ fix_install_path }}"
    apply_type: "{{ apply_type }}"
    rollback: True
    register: ptf_results

- name: Print PTF Install End
  debug:
    msg: 'install end: {{ ptf_results.end }}'
ceetonice commented 9 months ago

That would still require 2 IPLs. is there a way in Ansible to have one IPL that will install the requisite PTFs, TR, etc. This can be done using normal green screen.

"At least one PTF requires an initial program load (IPL) to complete the PTF install processing. This includes one or both of the following: &P -- A technology refresh PTF or its requisite PTFs requires an IPL. A technology refresh PTF must be permanently applied before the remaining PTFs can be loaded and applied. &P -- One or more special handling PTFs or its requisite PTF requires an IPL. There are special handling PTFs defined in a PTF group being installed that must be applied before the remaining PTFs in the PTF group can be applied. &N Recovery . . . : Perform a normal mode IPL from the B IPL source to complete the PTF install. During the next unattended IPL, the remaining PTFs will be installed. If an IPL is required for a technology refresh PTF, device ANSIBOPT3 and image catalog ANSIBCLG1 will be used to load the additional PTFs during the next IPL."

robgjertsen1 commented 8 months ago

Will take a closer look at this as time permits.

ceetonice commented 8 months ago

Thanks!

egluszm commented 4 months ago

Hello, I am facing the very same issue. Using ibm.power_ibmi.ibmi_fix_imgclg for installing CUME (with TR) playbook goes into the "loop"...

and I believe it's the equivalent of this screen when installing CUME (with TR) manually: PTF_confirm here I press F12, and everything is handled at next IPL... (where system automatically does 2 IPL...

PTF installation process started.
Loading of PTFs started.
Loading of PTFs completed successfully.
Marking of PTFs for delayed application started.
PTFs are identified to be applied for product *ALL.
Marking of PTFs for delayed application completed successfully.
PTFs installed successfully.
PTFs applied or removed during IPL.
Apply PTF started.
Applying of PTFs for product 5770999 completed successfully.
Applying of PTFs for product 5770SS1 completed successfully.
Applying of PTFs for product 5733SC1 completed successfully.
Applying of PTFs for product 5770BR1 completed successfully.
Applying of PTFs for product 5770DG1 completed successfully.
Applying of PTFs for product 5770JV1 completed successfully.
Applying of PTFs for product 5770TC1 completed successfully.
Applying of PTFs for product 5770WDS completed successfully.
Applying of PTFs completed.
PTFs applied or removed during IPL.

it would be great, if that was addressed ;) thanks

robgjertsen1 commented 3 months ago

Thanks for letting us know that other folks are hitting this.