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
55 stars 52 forks source link

Role: change_server_state_via_powervc #96

Closed mad5bo closed 3 years ago

mad5bo commented 3 years ago

hi, running the role change_server_state_via_powervc on a playbook takes too long (15 min) to stop an IBM i VM on PowerVC, Is there a way to improve this role or at playbook level? Perhaps something to prioritize at PowerVC level or if cloud-init installed on IBM i plays any action to accomplish to stop the VM.

changlexc commented 3 years ago

The undernearth module that this role used is an openstack module os_server_action, for stop action, I didn't see options in this module like other options in PowerVC GUI or rest API, e.g. 'Immediate', it can only support the OS layer shutdown. So it actually uses the OS command PWRDWNSYS withe CNTRLD. It not related the PowerVC or cloud-init, it is just the IBMi CNTRLD power down behavior as design. Since the openstack os_server_action doesn't have other stop option for now, so we don't have other choices. We had already had a workaournd for this in our db2mirror_setup_via_powervc, which is, if the IBM i partition can have a network access, we use the cl command module to issue a PWRDWNSYS with *IMMED to shutdown the IBM i partition in the playbook.