Managing Configurations and Deployments of Power AIX Systems
This document explains the process of managing configurations and deployments of Power AIX systems using the IBM Power Systems AIX Collection. The process involves building NIM node information, performing health checks on VIOS targets, and initializing VIOS health.
The flow starts with building the NIM node information, which includes gathering HMC, CEC, and VIOS information. This step sets up the necessary data structures and information required for subsequent health checks. Next, health checks are performed on the VIOS targets to ensure they can support a rolling update operation. This involves collecting VIOS UUIDs
UUIDs
Flow drill down
Building NIM Node Information
First, we build the NIM node information which includes gathering HMC, CEC, and VIOS information. This step is crucial as it sets up the necessary data structures and information required for subsequent health checks.
def build_nim_node(module):
"""
Build the nim node containing the nim vios and hmc info.
"""
# Build hmc info list
nim_hmc = get_hmc_info(module)
NIM_NODE['nim_hmc'] = nim_hmc
module.debug(f'NIM HMC: {nim_hmc}')
# Build CEC info list
nim_cec = get_nim_cecs_info(module)
# Build vios info list
nim_vios = get_nim_clients_info(module, 'vios')
# Complete the CEC serial in nim_vios dict
for key, nimvios in nim_vios.items():
mgmt_cec = nimvios['mgmt_cec']
if mgmt_cec in nim_cec:
nimvios['mgmt_cec_serial'] = nim_cec[mgmt_cec]['serial']
Performing Health Checks
Next, we perform health checks on the VIOS targets. This involves calling the roles/power_aix_vioshc/files/vioshc.py
script to collect VIOS UUIDs
def health_check(module, targets):
"""
Health assessment of the VIOS targets to ensure they can support
a rolling update operation.
For each VIOS tuple:
- call vioshc.py a first time to collect the VIOS UUIDs
- call vioshc.py a second time to check the healthiness
return: a dictionary with the state of each VIOS tuple
"""
module.debug(f'targets: {targets}')
health_tab = {}
vios_key = []
for target_tuple in targets:
OUTPUT.append(f'Checking: {target_tuple}')
module.debug(f'target_tuple: {target_tuple}')
tup_len = len(target_tuple)
Initializing VIOS Health
Then, we initialize the VIOS health by collecting CEC and VIOS UUIDs
roles/power_aix_vioshc/files/vioshc.py
script. This step ensures that we have the necessary UUIDs
def vios_health_init(module, hmc_id, hmc_ip):
"""
Collect CEC and VIOS UUIDs using vioshc.py script for a given HMC.
return: True if ok,
False otherwise
"""
module.debug(f'hmc_id: {hmc_id}, hmc_ip: {hmc_ip}')
# Call the vioshc.py script a first time to collect UUIDs
cmd = [vioshc_interpreter, vioshc_cmd, '-i', hmc_ip, '-l', 'a']
if module._verbosity > 0:
cmd.extend(['-' + 'v' * module._verbosity])
if module._verbosity >= 3:
cmd.extend(['-D'])
# path prefix is used here to ensure the dependent module paths are present.
# In this case, curl module.
ret, stdout, stderr = module.run_command(cmd, path_prefix=os.path.dirname(vioshc_interpreter))
if ret != 0:
OUTPUT.append(f' Failed to get the VIOS information, vioshc returned: {stderr}')
This is an auto-generated document by Swimm 🌊 and has not yet been verified by a human