ansible-aix / ansible-power-aix

Developer contributions for Ansible Automation on Power
GNU General Public License v3.0
3 stars 1 forks source link

nim_upgradeios module #26

Open robinvy opened 4 years ago

robinvy commented 4 years ago

Review the module against the Ansible guidelines:

The nim_upgradeios can use NIM operation mig_vios (backend, not documented) or the viosupgrade (frontend) command for remote use on VIOSes. The upgradeios endpoint module will be part of ibm.power-vios and will use the viosupgrade command (locally on the VIOS managed node).

robinvy commented 4 years ago

I'm running the following command on the NIM master: nim -Fo migvios -a ios_mksysb=castor_gdr_vios3_sysb -a ios_backup=demo_castor_gdr_vios3_iosb -a mk_image=yes -a boot_client=no -a set_bootlist=no -a skipcluster=no -a debug=yes castor_gdr_vios3

With existing castor_gdr_vios3_sysb NIM resource, no existing ios_backup. I get the error:

"stderr": "0042-001 nim: processing error encountered on \"master\":\n   0042-001 m_upgradeios: processing error encountered on \"master\":\n   0042-005 m_bos_inst: ODM error encountered; odmerrno = 0\n\n\n",
"stdout": "Backup of this node (castor_gdr_vios3.coopibm.frec.bull.fr) successful\n"

castor_gdr_vios3 (VIOS) # oslevel -s 7200-03-01-1838

root@castor8 (NIM) # oslevel -s 7200-04-02-2027

And running with DEBUG on the NIM master:

root@castor8 # NIM_DEBUG=1 nim -Fo migvios -a ios_mksysb=castor_gdr_vios3_sysb -a ios_backup=demo_castor_gdr_vios3_iosb  -a mk_image=yes -a boot_client=no -a set_bootlist=no -a skipcluster=no -a debug=yes castor_gdr_vios3
m_upgradeios: main: begin
m_upgradeios: parse_args: begin
m_upgradeios: parse_args: end
m_upgradeios: ck_attrs: begin
m_upgradeios: ck_attrs: ATTR_IOS_MKSYSB
m_upgradeios: ck_attrs: ATTR_IOS_BACKUP
m_upgradeios: ck_attrs: ATTR_MK_IMAGE
m_upgradeios: ck_attrs: ATTR_IOS_SKIPCLUSTER
m_upgradeios: ck_attrs: end
m_upgradeios: verify_args: begin
m_upgradeios: verify_args: end
m_upgradeios: verify_namerslv: begin
m_upgradeios: verify_namerslv: resolv_conf resource already allocated
m_upgradeios: verify_fileres: begin
m_upgradeios: verify_fileres: file_res resource already allocated
m_upgradeios: verify_backup: begin
m_upgradeios: verify_backup: end
m_upgradeios: begin_install_process: begin
m_upgradeios: begin_install_process: building command string for m_bos_inst
m_upgradeios: build_bos_inst_cmd: begin
m_upgradeios: build_bos_inst_cmd: end
m_upgradeios: begin_install_process: executing the required install method
m_upgradeios: undo: begin
m_upgradeios: undo: end
0042-001 nim: processing error encountered on "master":
   0042-001 m_upgradeios: processing error encountered on "master":
   0042-005 m_bos_inst: ODM error encountered; odmerrno = 0

And same error again when the ios_backup exists and I set mk_image=no.

Note that nim -o showlog -a full_log=yes -a log_type=script castor_gdr_vios3 does not show any new activity.

robinvy commented 4 years ago

The nim viosupgrade command is working. Switching to the nim_viosupgrade module task.