+
    ˜qgjP  ã                   óò   a € R t0 t R t^ RIt^ RIt^ RIHtHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHt RR	R
].R]R. /t] ^ k RtRtRtRt]P*                  ! ]4      tRtR R ltR tR tR tR tR tR# )a›  Reset RMC: Reset rsct node id

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.
N)ÚsubpÚutil)ÚCloud)ÚConfig)Ú
MetaSchema)ÚALL_DISTROS)ÚPER_INSTANCEÚidÚcc_reset_rmcÚdistrosÚ	frequencyÚactivate_by_schema_keysÚ z/opt/rsct/install/binÚrmcctrlÚrecfgctz/etc/ct_node_idc          
      óL   € V ^8„  d   QhR\         R\        R\        R\        RR/# )é   ÚnameÚcfgÚcloudÚargsÚreturnN)Ústrr   r   Úlist)Úformats   "Ú?/usr/lib/python3/dist-packages/cloudinit/config/cc_reset_rmc.pyÚ__annotate__r   <   s/   € ÷ #ñ #”ð #œ6ð #¬%ð #´tð #Àñ #ó    c                 ó  € VP                   P                  R 8X  d   \        P                  R4       R# \        P
                  P                  \        4      '       g   \        P                  R4       R# \        P                  P                  R4      p \        V4       \        4        V'       d   V\        P                  R&   R# \        P                  R R#   T'       d   T\        P                  R&   i \        P                  R i ; i)Únonez(Skipping creation of new ct_node_id nodeNz&module disabled, RSCT_PATH not presentÚPATH)Ú
datasourceÚplatform_typeÚLOGÚdebugÚosÚpathÚisdirÚ	RSCT_PATHÚenvironÚgetÚadd_pathÚ	reset_rmc)r   r   r   r   Ú	orig_paths   &&&& r   Úhandler.   <   s«   € à×Ñ×%Ñ%¨Ô/Ü�	‰	Ð<Ô=Ùä�7‰7�=‰=œ×#Ò#Ü�	‰	Ð:Ô;Ùä—
‘
—‘˜vÓ&€Ið#Ü�ÔÜŒçØ!*ŒB�J‰J�vÓä—
‘
˜6Ò"ø÷ Ø!*ŒB�J‰J�vÒä—
‘
˜6Ñ"ús   ÂC Ã/Dc                  óü   €  \         P                   ! \        .4      ^ ,          p \        P                  V P	                  4       4       V #   \         P
                   d    \        P                  ! \        R4       h i ; i)é    z*Failed to reconfigure the RSCT subsystems.)r   ÚRECFGCTr#   r$   ÚstripÚProcessExecutionErrorr   Úlogexc)Úouts    r   Úreconfigure_rsct_subsystemsr6   Q   sZ   € ðÜ�iŠiœ˜	Ó" 1Õ%ˆÜ�	‰	�#—)‘)“+ÔØˆ
øÜ×%Ñ%ô Ü�Š”CÐEÔFØðús   ‚AA	 Á	2A;c                  óØ   €  \         P                  ! \        4      p V P                  R 4      ^ ,          pV#   \         d)    \         P
                  ! \        R\        ,          4       h i ; i)Ú
z#Failed to get node ID from file %s.)r   Úload_text_fileÚNODE_ID_FILEÚsplitÚ	Exceptionr4   r#   )ÚfpÚnode_ids     r   Úget_node_idr?   ^   sT   € ðÜ× Ò ¤Ó.ˆØ—(‘(˜4“. Õ#ˆØˆøÜô Ü�Š”CÐ>ÄÕMÔNØðús	   ‚36 ¶3A)c                 ó’   € V '       d
   R V ,           MRp\         V,           \        P                  R&   \        P                  R,          # )Ú:r   r    )r(   r%   r)   )r-   Úsuffs   & r   r+   r+   h   s3   € ÷ (ˆ3�Ž?¨R€DÜ" TÕ)„B‡J�JˆvÑÜ�:‰:�fÕÐr   c                  ó’   €  \         P                   ! \        R .4      #   \         d    \        P                  ! \
        R4       h i ; i)z-zz!Failed to stop the RMC subsystem.)r   ÚRMCCTRLr<   r   r4   r#   © r   r   r   r   q   s;   € ðÜ�yŠyœ' 4˜Ó)Ð)øÜô Ü�Š”CÐ<Ô=Øðús	   ‚ ž(Ac                  ó(  € \         P                  R 4       \        4       p \         P                  RV 4       \        4        \	        4        \        4       p\         P                  RV4       W8X  d#   Rp\         P                  V4       \        V4      hR# )zAttempting to reset RMC.z"Node ID at beginning of module: %szNode ID at end of module: %sz"New node ID did not get generated.N)r#   r$   r?   r   r6   ÚerrorÚRuntimeError)Únode_id_beforeÚnode_id_afterÚmsgs      r   r,   r,   {   sp   € Ü‡I�IÐ(Ô)ä “]€NÜ‡I�IÐ2°NÔCô „IÜÔ!ä“M€MÜ‡I�IÐ,¨mÔ<ð Ô&Ø2ˆÜ�	‰	�#ŒÜ˜3ÓÐñ 'r   c                ó@   € V ^8„  d   Qh/ ^ \         9   d
   \        ;R&   # )r   Úmeta)Ú__conditional_annotations__r   )r   s   "r   r   r      s"   € ÷ ñ ÷>ò „jñ ò?r   ) rN   Ú__doc__Úloggingr%   Ú	cloudinitr   r   Úcloudinit.cloudr   Úcloudinit.configr   Úcloudinit.config.schemar   Úcloudinit.distrosr   Úcloudinit.settingsr   rM   r(   rD   r1   Ú	getLoggerÚ__name__r#   r:   r.   r6   r?   r+   r   r,   r   )rN   s   @r   Ú<module>rY      s”   øðöó* Û 	ç  Ý !Ý #Ý .Ý )Ý +ð 	ˆ.Ø�ˆ}Ø�Ø˜rð	€ó ð €ð $€	Ø
€Ø
€à×Ò˜Ó!€à €õ#ò*
òòòô r   