3 \¼meß ã @ sâ U d Z ddlZddlZddlmZmZ ddlmZ ddlm Z ddl mZ ddlm Z ddlmZ d Zd ddee geg g d œZedZ dZdZdZejeƒZdZee eeddœdd„Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Z dS )zReset RMC: Reset rsct node idé N)ÚsubpÚutil)ÚCloud)ÚConfig)Ú MetaSchema)ÚALL_DISTROS)ÚPER_INSTANCEa| Reset RMC module is IBM PowerVM Hypervisor specific Reliable Scalable Cluster Technology (RSCT) is a set of software components, that together provide a comprehensive clustering environment (RAS features) for IBM PowerVM based virtual machines. RSCT includes the Resource monitoring and control (RMC) subsystem. RMC is a generalized framework used for managing, monitoring, and manipulating resources. RMC runs as a daemon process on individual machines and needs creation of unique node id and restarts during VM boot. More details refer https://www.ibm.com/support/knowledgecenter/en/SGVKBA_3.2/admin/bl503_ovrv.htm This module handles - creation of the unique RSCT node id to every instance/virtual machine and ensure once set, it isn't changed subsequently by cloud-init. In order to do so, it restarts RSCT service. Prerequisite of using this module is to install RSCT packages. Zcc_reset_rmcz Reset RMCzreset rsct node id)ÚidÚnameÚtitleÚdescriptionZdistrosZ frequencyZexamplesZactivate_by_schema_keysÚ z/opt/rsct/install/binÚrmcctrlZrecfgctz/etc/ct_node_id)r ÚcfgÚcloudÚargsÚreturnc C sr |j jdkrtjdƒ d S tjjtƒs4tjdƒ d S tjj dƒ}zt |ƒ tƒ W d |rd|tjd<