+
    Û1jÐý  ã                   ó  € ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
H
t
 ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHtHt ^ R
IHt ^ RIHt ^ RIHt ^ RIH t  Rt! ! R R]4      t"R# )é    N)Údatetime)ÚThreadPoolExecutor)Úgetpass)ÚPath)Úquote)Ú
SoSCleaner)ÚSosNode)ÚClusterOptionÚstr_to_bool)ÚSoSComponent)Úbold)Ú__version__)Ú	SoSUploadz/etc/sos/groups.dc                   ó.  a a€ ] tR t^(t oRtRt/ RRbRRbRRbRRbRRbR	R
bRRbR. bRRbRR
bR. bR. bR. bRRbRRbRRbRRb/ RRbRRbR. bR^bR^ bR. bRRbR RbR!RbR"RbR#^ bR$RbR%R&bR'RbR(RbR)RbR*. bC/ R+RbR,RbR-RbR.RbR/RbR0. bR1RbR2RbR3. bR4RbR5RbR6RbR7RbR8RbR9RbR:RbR;RbC/ R<. bR=. bR>. bR?RbR@^bRARBbRCRDbRERFbRGR
bRHRIbRJRbRK. bRLRbRMRbRNRbRORbRPRbCRQR
RRRRSR
RTRRURRVRRWRRXRRYRRZR/
CtV 3R[ ltR\ t]	R] 4       t
]	R^ 4       t]	R_ 4       tR` t]	Ra 4       t]	Rb 4       tR„Rc ltRd tRe tRf tRg tRh tRi tRj tRk tRl tRm tRn tRo tRp tRq tRr tRs t Rt t!Ru t"Rv t#Rw t$Rx t%Ry t&Rz t'R{ t(R| t)R} t*R~ t+R t,R€ t-R� t.R‚ t/Rƒt0Vt1V ;t2# )…ÚSoSCollectorat  
sos collect, or SoS Collector, is the formerly standalone sos-collector
project, brought into sos natively in 4.0 and later.

It is meant to collect sos reports from an arbitrary number of remote
nodes, as well as the localhost, at the same time. These nodes may be
either user defined, defined by some clustering software, or both.

For cluster defined lists of nodes, cluster profiles exist that not only
define how these node lists are generated but may also influence the
sos report command run on nodes depending upon their role within the
cluster.

Nodes are connected to via a 'transport' which defaults to the use of
OpenSSH's Control Persist feature. Other transport types are available, and
may be specifically linked to use with a certain cluster profile (or, at
minimum, a node within a certain cluster type even if that profile is not
used).

sos collect may be run from either a node within the cluster that is
capable of enumerating/discovering the other cluster nodes, or may be run
from a user's workstation and instructed to first connect to such a node
via the --primary option. If run in the latter manner, users will likely
want to use the --no-local option, as by default sos collect will also
collect an sos report locally.

Users should expect this command to result in a tarball containing one or
more sos report archives on the system that sos collect was executed on.
z8Collect an sos report from multiple nodes simultaneouslyÚall_logsFÚ
alloptionsÚallow_system_changesÚbecome_rootÚcase_idÚchrootÚautoÚcleanÚcluster_optionsÚcluster_typeNÚcontainer_runtimeÚdomainsÚdisable_parsersÚenable_pluginsÚencrypt_keyÚ Úencrypt_passÚgroupÚimageÚinherit_config_fileÚforce_pull_imageTÚskip_cleaning_filesÚjobsÚjournal_sizeÚkeywordsÚkeyword_fileÚkeep_binary_filesÚlabelÚlist_optionsÚlog_sizeÚlow_priorityÚmap_fileú /etc/sos/cleaner/default_mappingÚprimaryÚ
namespacesÚnode_config_fileÚnodesÚno_env_varsÚno_localÚnopasswd_sudoÚno_pkg_checkÚ	no_updateÚonly_pluginsÚpasswordÚpassword_per_nodeÚplugoptsÚplugin_timeoutÚcmd_timeoutÚpresetÚregistry_userÚregistry_passwordÚregistry_authfileÚ
save_groupÚsinceÚskip_commandsÚ
skip_filesÚskip_pluginsÚssh_keyÚssh_portÚssh_userÚrootÚsudo_binaryÚsudoÚtimeoutiX  Ú	transportÚtreat_certificatesÚ	obfuscateÚverifyÚ	usernamesÚuploadÚ
upload_urlÚupload_directoryÚupload_userÚupload_passÚupload_methodÚupload_no_ssl_verifyÚupload_protocolÚupload_s3_endpointÚupload_s3_regionÚupload_s3_bucketÚupload_s3_access_keyÚupload_s3_secret_keyÚupload_s3_object_prefixÚupload_targetc                ó  <€ \         SV `  WV4       \        P                  ! ^?4       . V n        . V n        RV n        ^ V n        RV n        RV n	        V P                  P                  P                  R4       V P                  P                  P                  V n        V P                  P                  RR4       V P                  P!                  R4       \#        V P$                  RR4       \&        P(                  ! 4       V n         \-        \&        P.                  ! \&        P(                  ! 4       R4       Uu0 uF  qD^,          ^ ,          kK  	  up4      V n        V P7                  4        V P9                  4       V n        V P$                  P<                  '       g˜    V P?                  4        V PA                  4        V PC                  R
RPE                  R \F        PH                   4       4       24       V PC                  RV P:                  PK                  4        24       V PM                  4        R# R# u upi   \2         d    T P5                  R4       R	.T n         ELi ; i  \N         d    T PQ                  R^‚4        R# i ; i)é?   NÚcollectr   ÚnoneÚ	node_listÚsudo_pwr!   zkCould not get a list of IP addresses from this hostnamne. This may indicate a DNS issue in your environmentz	127.0.0.1z
Executing Ú c              3   ó$   "  € T F  qx € K  	  R # 5i©N© )Ú.0Úss   & Ú8/usr/lib/python3/dist-packages/sos/collector/__init__.pyÚ	<genexpr>Ú(SoSCollector.__init__.<locals>.<genexpr>Ä   s   é € Ð4IÁ¸1´QÃùó   ‚zFound cluster profiles: úExiting on user cancel))ÚsuperÚ__init__ÚosÚumaskÚclient_listrj   r3   Ú	retrievedÚclusterr   ÚmanifestÚ
componentsÚadd_sectionrh   Ú
collect_mdÚ	add_fieldÚadd_listÚsetattrÚoptsÚsocketÚgethostnameÚhostnameÚlistÚgetaddrinfoÚip_addrsÚ	ExceptionÚ	log_errorÚ_parse_optionsÚload_clustersÚclustersr.   Úparse_node_stringsÚparse_cluster_optionsÚ	log_debugÚjoinÚsysÚargvÚkeysÚverify_cluster_optionsÚKeyboardInterruptÚexit)ÚselfÚparserÚparsed_argsÚcmdline_argsÚiÚ	__class__s   &&&& €rr   rx   ÚSoSCollector.__init__š   s  ø€ Ü‰Ñ˜¨lÔ;Ü
�Š�ŒØˆÔØˆŒØˆŒØˆŒØˆŒØ ˆÔð 	�‰× Ñ ×,Ñ,¨YÔ7àŸ-™-×2Ñ2×:Ñ:ˆŒà�‰×!Ñ! .°&Ô9Ø�‰× Ñ  Ô-ô 	�—	‘	˜9 bÔ)ä×*Ò*Ó,ˆŒð	*Ü Ü!'×!3Ò!3´F×4FÒ4FÓ4HÈ$Ô!Oó"Ù!O˜A�!•�Q—�Ñ!Oñ"ó ˆDŒMð 	×ÑÔØ×*Ñ*Ó,ˆŒà�y‰y×%×%Ð%ð	9Ø×'Ñ'Ô)Ø×*Ñ*Ô,Ø—‘ ¨C¯H©HÑ4IÄÇÂÓ4IÓ,IÐ+JÐKÔLØ—‘Ø.¨t¯}©}×/AÑ/AÓ/CÐ.DÐEôGà×+Ñ+Ö-ñ &ùò"øô ô 	*ð �N‰NðDôð )˜MˆD�Mð	*ûô* %ô 9Ø—	‘	Ð2°C×8ð9ús7   Ä1H9 Ä6H4ÅH9 ÆBI$ È4H9 È9$I!É I!É$JÊJc                ó¸   € ^ RI pVP                  P                  p/ pV P                  VR4      pV F%  pV^,          ! V P                  4      W5^ ,          &   K'  	  V# )z]Loads all cluster types supported by the local installation for
future comparison and/or use
Nr�   )Úsos.collector.clustersÚ	collectorr�   Ú_load_modulesÚcommons)r›   ÚsosÚpackageÚsupported_clustersr�   r}   s   &     rr   r�   ÚSoSCollector.load_clustersÌ   sX   € ó 	&Ø—-‘-×(Ñ(ˆØÐØ×%Ñ% g¨zÓ:ˆÛˆGØ-4°Q®Z¸¿¹Ó-EÐ q�zÓ*ñ  à!Ð!ó    c                ó¾   € . pVP                    FJ  p\        P                  P                  V4      '       g   K*  VP	                  V P                  WB4      4       KL  	  V# )z'Helper to import cluster and host types)Ú__path__ry   ÚpathÚisdirÚextendÚ_find_modules_in_path)Úclsr¨   ÚsubmodÚmodulesr®   s   &&&  rr   r¥   ÚSoSCollector._load_modulesØ   sJ   € ð ˆØ×$Ô$ˆDÜ�w‰w�}‰}˜T×"Ô"Ø—‘˜s×8Ñ8¸ÓFÖGñ %ð ˆr«   c                óv  € . p\         P                  P                  V4      '       d’   \        \         P                  ! V4      4       Fn  pVP                  R4      '       g   K  RV9   d   K%  \         P                  P                  V4      w  rVRV RV 2pVP                  V P                  V4      4       Kp  	  V# )a(  Given a path and a module name, find everything that can be imported
and then import it

    path - the filesystem path of the package
    modulename - the name of the module in the package

E.G. a path of 'clusters', and a modulename of 'ovirt' equates to
importing sos.collector.clusters.ovirt
z.pyÚ__zsos.collector.Ú.)	ry   r®   ÚexistsÚsortedÚlistdirÚendswithÚsplitextr°   Ú_import_modules)r²   r®   Ú
modulenamer´   ÚpyfileÚfnameÚ_Úmodnames   &&&     rr   r±   Ú"SoSCollector._find_modules_in_pathá   s–   € ð ˆÜ�7‰7�>‰>˜$×ÒÜ ¤§¢¨DÓ!1Ö2�Ø—‘ u×-Ò-ÙØ˜6”>ÙÜŸ7™7×+Ñ+¨FÓ3‘�Ø*¨:¨,°a¸°wÐ?�Ø—‘˜s×2Ñ2°7Ó;Ö<ñ 3ð ˆr«   c                ó¤  € VP                  R4      ^,          p \        V\        4       \        4       V.4      p\        P                  ! T\        P                  4      pTP                  4        F$  pT^ ,          R9   g   K  TP                  T4       K&  	  T#   \         d-   p\        RT RTP                  P                   24       ThRp?ii ; i)z/Import and return all found classes in a moduler¸   z"Error while trying to load module z:  N)ÚSosHostÚCluster)ÚsplitÚ
__import__ÚglobalsÚlocalsÚImportErrorÚprintr    Ú__name__ÚinspectÚ
getmembersÚisclassÚcopyÚremove)r²   rÃ   Úmod_short_nameÚmoduleÚer´   Úmods   &&     rr   r¾   ÚSoSCollector._import_modulesø   s¼   € ð !Ÿ™ sÓ+¨AÕ.ˆð	Ü ¬«´F³H¸~Ð>NÓOˆFô
 ×$Ò$ V¬W¯_©_Ó=ˆØ—<‘<–>ˆCØ�1�vÐ/Ö/Ø—‘˜sÖ#ñ "ð ˆøô ô 	ÜÐ6°w°ið @Ø—k‘k×*Ñ*Ð+ð-ô .àˆGûð	ús   šB ÂCÂ#'C
Ã
Cc                ó>  € V P                   P                  '       g   R# . p\        V P                   P                  \        4      '       g'   V P                   P                  .V P                   n        V P                   P                   Fà  p\	        V4       UUu. uF  w  r4VR8X  g   K  VNK  	  pppVP                  \        V4      4       ^ p^ pV Ff  p TpW&V p	\        P                  ! \        P                  ! V	4      4       RV	9   d
   RV	9  d   KD  VP                  V	P                  R4      4       TpKh  	  V\        V4      8w  g   KÆ  VP                  W'^,           R 4       Kâ  	  WP                   n        R# u uppi   \        P                   d     KÊ  i ; i)aJ  Parses the given --nodes option(s) to properly format the regex
list that we use. We cannot blindly split on ',' chars since it is a
valid regex character, so we need to scan along the given strings and
check at each comma if we should use the preceeding string by itself
or not, based on if there is a valid regex at that index.
NÚ,Ú[Ú])r…   r6   Ú
isinstancer‰   Ú	enumerateÚappendÚlenÚreÚcompileÚescapeÚlstripÚerror)
r›   r6   ÚnoderŸ   ÚmÚidxsÚstartÚposÚidxÚregs
   &         rr   r‘   ÚSoSCollector.parse_node_strings  s6  € ð �y‰y��ˆÙØˆÜ˜$Ÿ)™)Ÿ/™/¬4×0Ò0Ø#Ÿy™yŸ™Ð/ˆD�I‰IŒOØ—I‘I—O”OˆDÜ"+¨D¤/Ô>¡/™$˜!°Q¸#±X—A�A¡/ˆDÑ>Ø�K‰Kœ˜D›	Ô"ØˆEØˆCÛ�ð
Ø�CØ S˜/�CÜ—J’JœrŸyšy¨›~Ô.à˜c”z c°¤nÙ Ø—L‘L §¡¨C£Ô1Ø’Eñ ð ”c˜$“iÖØ—‘˜T a¥% &˜\Ö*ñ% $ð&  �	‰	Žùó% ?øô —x‘xô Úðús$   ÂE=Â(E=Ã>FÄ"FÆFÆFc           
     ó  € VP                  R R4      pVP                  RRRRR7       VP                  RRRR7       VP                  R	RR
RR7       VP                  RR. RÞORR7       VP                  RRRR7       VP                  RRRRR7       VP                  R\        ^ RR7       VP                  RRRRRR R!7       VP                  R"^ \        R#R$7       VP                  R%RR
R&R7       VP                  R'R(RR)R7       VP                  R*R+R. R,R7       VP                  R-R.R/R7       VP                  R0RR
R1R7       VP                  R2\        R.R3R7       VP                  R4\        R.R5R7       VP                  R6R.R7R7       VP                  R8. RR9R:R;7       VP                  R<. RR=R>R;7       VP                  R?RR@R7       VP                  RARB4      pVP                  RCRDRRERFR!7       VP                  RGRHRI7       VP                  RJR
RRKRL7       VP                  RM\        R.RNR7       VP                  RORPRI7       VP                  RQRRRSRTRURV7       VP                  RWR.RXR7       VP                  RYRRZR7       VP                  R[R\RI7       VP                  R]R^R_Rß\        R`Ra7       VP                  RbR.RcR7       VP                  RdR.ReR7       VP                  RfR.RgR7       VP                  RhRiRjRI7       VP                  RkRl^\        RmR$7       VP                  RnRoRRpR7       VP                  RqRrRI7       VP                  RsRtRuRvRRwRx7       VP                  RyRRzR7       VP                  R{RTR|R7       VP                  R}RR~R7       VP                  RRR€R7       VP                  R�R‚\        RƒR„7       VP                  R…RR
R†R7       VP                  R‡RR
RˆR7       VP                  R‰RR
RŠR‹7       VP                  RŒR�RI7       VP                  RŽR�\        R�R$7       VP                  R‘\        R
R’R“7       VP                  R”R\        R•R$7       VP                  R–RR
R—R7       VP                  R˜R.R™R7       VP                  RšR.R›R7       VP                  RœR.R�R7       VP                  RžR.RŸR7       VP                  R R. RàOR¡R7       VP                  R¢R
RR£RL7       VP                  R¤R.R¥R7       VP                  R¦R.R§R7       VP                  R¨R.R©R7       VP                  RªR.R«R7       VP                  R¬R.R­R7       VP                  R®R.R¯R7       VP                  R°R. RáOR±R7       VP                  R²R³4      pVP                  R´RµR¶R·R
RR¸R¹7       VP                  RºR
RR»R¼R;7       VP                  R½R¾. RR¿R¹7       VP                  RÀR. RÁRÂRÃ7       VP                  RÄRÅR. RÆRÇRÃ7       VP                  RÈR. RÉRÊRÃ7       VP                  RËR.RÌRÍRÎ7       VP                  RÏRR
RÐRÑRÃ7       VP                  RÒRÓRÔRÕRx7       VP                  RÖR×. RRØR¹7       VP                  RÙRÚ. RâORÛRÜRÝ7       R.# )ãzReport Passthru Optionsz0These options control how report is run on nodesz-az--alloptionsÚ
store_truezEnable all sos report options)ÚactionÚhelpz
--all-logszCollect logs regardless of sizez--allow-system-changesFz<Allow sos report to run commands that may alter system state)rð   Údefaultrñ   z--chrootr!   r   z#chroot executed commands to SYSROOT)rò   Úchoicesrñ   z--container-runtimezLDefault container runtime to use for collections. 'auto' for policy control.)rò   rñ   z-ez--enable-pluginsr°   z&Enable specific plugins for sos reportz--journal-sizez!Limit the size of journals in MiB)Útyperò   rñ   z-kz--plugin-optionz
--plugoptsr?   z&Plugin option as plugname.option=value)rð   Údestrñ   z
--log-sizez7Limit the size of individual logs (not journals) in MiB)rò   rô   rñ   z--low-priorityzRun reports as low priorityz-nz--skip-pluginszSkip these pluginsz-oz--only-pluginszRun these plugins onlyz--namespacesNzDlimit number of namespaces to collect output for - 0 means unlimitedz--no-env-varsz&Do not collect env vars in sos reportsz--plugin-timeoutz#Set the global plugin timeout valuez--cmd-timeoutz$Set the global command timeout valuez--sincezbEscapes archived files older than date. This will also affect --all-logs. Format: YYYYMMDD[HHMMSS]z--skip-commandsrH   zdo not execute these commands)rò   rð   rõ   rñ   z--skip-filesrI   zdo not collect these filesz--verifyz*perform pkg verification during collectionzCollector Optionsz.These options control how collect runs locallyz-bz--becomer   zBecome root on the remote nodesz	--case-idzSpecify case number)rñ   z--inherit-config-filezKUse the config file from the collector for all nodes to use with sos report)rò   rð   rñ   z--node-config-filezCPath to an existing config file on the nodes to use with sos reportz--cluster-typez!Specify a type of cluster profilez-cz--cluster-optionr   rß   zVSpecify a cluster options used by a profile and takes the form of cluster.option=value)rõ   rð   rñ   z--groupz Use a predefined group JSON filez--save-groupz%Save a resulting node list to a groupz--imagez;Specify the container image to use for containerized hosts.z--force-pull-imagez--pullTzDForce pull the container image even if it already exists on the host)rò   ró   rô   rñ   z--registry-userzBUsername to authenticate to the registry with for pulling an imagez--registry-passwordzBPassword to authenticate to the registry with for pulling an imagez--registry-authfilezJUse this authfile to provide registry authentication when pulling an imagez-iz	--ssh-keyzSpecify an ssh keyz-jz--jobsz%Number of concurrent nodes to collectz-lz--list-optionsz#List options available for profilesz--labelzAssign a label to the archivesz	--primaryz	--managerz--controllerr3   z.Specify a primary node for cluster enumeration)rõ   rò   rñ   z--nopasswd-sudozUse passwordless sudo on nodesz--nodeszDProvide a comma delimited list of nodes, or a regex to match againstz--no-pkg-checkz^Do not run package checks. Use this with --cluster-type if there are rpm or apt issues on nodez
--no-localz&Do not collect a report from localhostz-pz
--ssh-portzSpecify SSH port for all nodes)rô   rñ   z
--passwordz"Prompt for user password for nodesz--password-per-nodez!Prompt for password for each nodez--presetzSpecify a sos preset to use)rò   Úrequiredrñ   z
--ssh-userz!Specify an SSH user. Default rootz--sudo-binaryrP   z#Privilege escalation binary to use.z	--timeoutz$Timeout for sos report on each node.)rô   rö   rñ   z--transportz"Remote connection transport to usez--uploadz+Upload archive to a policy-default locationz--upload-urlz&Upload the archive to specified serverz--upload-directoryz$Specify upload directory for archivez--upload-userzUsername to authenticate withz--upload-passzPassword to authenticate withz--upload-methodz HTTP method to use for uploadingz--upload-no-ssl-verifyz'Disable SSL verification for upload urlz--upload-s3-endpointz#Endpoint to upload to for S3 bucketz--upload-s3-regionzRegion for the S3 bucketz--upload-s3-bucketz"Name of the S3 bucket to upload toz--upload-s3-access-keyzAccess key for the S3 bucketz--upload-s3-secret-keyzSecret key for the S3 bucketz--upload-s3-object-prefixzPrefix for the S3 object/keyz--upload-protocolz$Manually specify the upload protocolzCleaner/Masking Optionsz7These options control how data obfuscation is performedz--cleanz	--cleanerz--maskr   zObfuscate sensitive information)rõ   rò   rð   rñ   z--keep-binary-filesr,   zGKeep unprocessable binary files in the archive instead of removing themz	--domainsr   z$Additional domain names to obfuscatez--disable-parsersr   zCDisable specific parsers, so that those elements are not obfuscated)rð   rò   rõ   rñ   z--skip-cleaning-filesz--skip-masking-filesr'   zBList of files to skip/ignore during cleaning. Globs are supported.z
--keywordsr*   zList of keywords to obfuscatez--keyword-filer+   z&Provide a file a keywords to obfuscate)rò   rõ   rñ   z--no-updater;   z%Do not update the default cleaner mapz
--map-filer1   r2   z;Provide a previously generated mapping file for obfuscationz--usernamesrV   zList of usernames to obfuscatez--treat-certificatesrT   rS   z˜How to treat the certificate files [.csr .crt .pem]. Defaults to "obfuscate" after convert the file to text. "Key" certificate files are always removed.)rò   ró   rõ   rñ   )r   ÚalwaysÚnever)TF)r   ÚputÚpost)r   ÚhttpsÚftpÚsftpÚs3)rT   ÚkeeprÓ   )Úadd_argument_groupÚadd_argumentÚintÚstrr   )r²   rœ   Úsos_grpÚcollect_grpÚcleaner_grps   &&   rr   Úadd_parser_optionsÚSoSCollector.add_parser_options)  sx	  € ð
 ×+Ñ+Ø%Ø>ó
ˆð 	×Ñ˜T >¸,Ø"Að 	ô 	Cà×Ñ˜\°,Ø"Cð 	ô 	Eà×ÑÐ5¸lØ%*ð$8ð 	ô 	:ð 	×Ñ˜Z°Ú%@Ø"Gð 	ô 	Ið 	×ÑÐ2¸Fð#Lð 	ô 	Mð 	×Ñ˜TÐ#5¸hØ"Jð 	ô 	Là×ÑÐ-´CÀØ"Eð 	ô 	Gà×Ñ˜TÐ#4°lØ$,°:Ø"Jð 	ô 	Lð 	×Ñ˜\°1¼3ð#:ð 	ô 	;ð 	×ÑÐ-°lØ%*Ð1Nð 	ô 	Pà×Ñ˜TÐ#3¸HØ"6ð 	ô 	8à×Ñ˜TÐ#3¸HØ%'Ø":ð 	ô 	<ð 	×Ñ˜^°Tð#Cð 	ô 	Dð 	×Ñ˜_°\Ø%*Ø"Jð 	ô 	Lð 	×ÑÐ/´cÀ4Ø"Gð 	ô 	Ià×Ñ˜_´3ÀØ"Hð 	ô 	Jà×Ñ˜Y°ð$>ð 	ô 	@ð 	×ÑÐ.¸À8Ø"1Ø"Að 	ô 	Cð 	×Ñ˜^°RÀØ".Ø">ð 	ô 	@ð 	×Ñ˜Z°Ø"Nð 	ô 	Pð
 ×/Ñ/ØØ<ó
ˆð 	× Ñ   z¸,Ø&3Ø&Gð 	!ô 	Ið 	× Ñ  Ð3HÐ ÔIØ× Ñ Ð!8À%Ø(4ð'Mð 	!ô 	Nð 	× Ñ Ð!5¼CØ)-ð'@ð 	!ô 	Að 	× Ñ Ð!1Ø&Ið 	!ô 	Kà× Ñ  Ð'9Ø&7Àð(>ð 	!ô 	@ð
 	× Ñ  °DØ&Hð 	!ô 	Jà× Ñ  ¸Ø&Mð 	!ô 	Oà× Ñ  ð(?ð 	!ô 	Að 	× Ñ Ð!5°xØ)-°}Ü&1ð'Fð 	!ô 	Gð
 	× Ñ Ð!2¸Dð'Kð 	!ô 	Lð 	× Ñ Ð!6Àð'Kð 	!ô 	Lð 	× Ñ Ð!6Àð'Mð 	!ô 	Nð 	× Ñ   {Ð9MÐ ÔNØ× Ñ   x¸ÄØ&Mð 	!ô 	Oà× Ñ  Ð'7ÀØ&Kð 	!ô 	Mà× Ñ  Ø&Fð 	!ô 	Hà× Ñ  ¨k¸>Ø&/¸ð'4ð 	!ô 	5ð 	× Ñ Ð!2¸<Ø&Fð 	!ô 	Hà× Ñ  °8ð(Lð 	!ô 	Nð 	× Ñ Ð!1¸,ð(?ð 	!ô 	Að 	× Ñ  °lØ&Nð 	!ô 	Pà× Ñ   |¼#Ø&Fð 	!ô 	Hà× Ñ  °lØ).Ø&Jð 	!ô 	Lð 	× Ñ Ð!6¸|Ø).Ø&Ið 	!ô 	Kð 	× Ñ  °RÀ%Ø&Cð 	!ô 	Eà× Ñ  Ø&Ið 	!ô 	Kà× Ñ  ¸&ÄsØ&Kð 	!ô 	Mà× Ñ  ´3ÀØ&Lð 	!ô 	Nà× Ñ  ¸ÄSØ&Jð 	!ô 	Là× Ñ  °LØ).ð'1ð 	!ô 	2ð 	× Ñ  ¸Ø&Nð 	!ô 	Pà× Ñ Ð!5¸tØ&Lð 	!ô 	Nà× Ñ  ¸$Ø&Eð 	!ô 	Gà× Ñ  ¸$Ø&Eð 	!ô 	Gà× Ñ Ð!2¸FÚ)@Ø&Hð 	!ô 	Jð 	× Ñ Ð!9À5Ø(4Ø&Oð 	!ô 	#ð 	× Ñ Ð!7ÀØ&Kð 	!ô 	Mà× Ñ Ð!5¸tØ&@ð 	!ô 	Bà× Ñ Ð!5¸tØ&Jð 	!ô 	Là× Ñ Ð!9À4Ø&Dð 	!ô 	Fà× Ñ Ð!9À4Ø&Dð 	!ô 	Fà× Ñ Ð!<ÀdØ&Dð 	!ô 	Fà× Ñ Ð!4¸fò*0à&Lð 	!ô 	Nð ×/Ñ/Ø%ØEó
ˆð 	× Ñ  ¨K¸Ø&-Ø).°|Ø&Gð 	!ô 	Ið 	× Ñ Ð!6ÀØ(4Ð;Nð'Ið 	!ô 	Jð 	× Ñ  °9ÀbØ(0Ø&Lð 	!ô 	Nð 	× Ñ Ð!4¸XØ)+Ð2Cð(Kð 	!ô 	Mð 	× Ñ Ð!8Ø!7ÀØ)+Ð2Gð(Hð 	!ô 	Jð
 	× Ñ  °hÈØ&0Ø&Eð 	!ô 	Gð 	× Ñ Ð!1¸4Ø&4Ø&Nð 	!ô 	Pð 	× Ñ  °|Ø).°[Ø&Mð 	!ô 	Oð 	× Ñ  °JØ)Kð(?ð 	!ô 	Að 	× Ñ  °[È"Ø(0Ø&Fð 	!ô 	Hð 	× Ñ Ð!7ÀÚ)HØ&:ð%/ð	 	!ö 	1r«   c                ó  € VP                  R 4       VP                  V P                  4       RRRRRRRR/pVP                  R	4       VP                  4        F*  w  r4VP                  R
R \	        V4      R VR 2RR7       K,  	  R# )zSoS Collect Detailed Helpzcollect.clusterszInformation on cluster profileszcollect.clusters.$clusterzSpecific profile informationzcollect.transportsz'Information on how connections are madezcollect.transports.$transportzSpecific transport informationz8The following help sections may be of further interest:
rl   z>8z<40z<30F)ÚnewlineN)Ú	set_titleÚadd_textÚ__doc__Úitemsr   )r²   ÚsectionÚ	hsectionsÚhsecÚvalues   &&   rr   Údisplay_helpÚSoSCollector.display_help  s�   € à×ÑÐ5Ô6Ø×Ñ˜Ÿ™Ô%ð Ð AØ'Ð)GØ Ð"KØ+Ð-Mð	
ˆ	ð 	×ÑØGô	
ð %Ÿ?™?Ö,‰KˆDØ×ÑØ�r�(œ4 ›: cÐ*¨5°¨+Ð6Øð ö ó -r«   c                ó�  € V P                   '       d   V P                   P                  4        V'       d   V P                  V4        V P                  4        V^‚8w  d   V P                  4        V'       g   \        P                  ! V4       R# \        P                  ! V4       R#   \         d    T P                  R4        Lmi ; i)a`  Used to terminate and ensure all cleanup is done, setting the exit
code as specified if required.

:param msg:     Log the provided message as an error
:type msg:      ``str``

:param error:   The exit code to use when terminating
:type error:    ``int``

:param force:   Use os.exit() to break out of nested threads if needed
:type force:    ``bool``
z/Warning: Failed to close all remote connectionsN)
r}   Úcleanupr�   Úclose_all_connectionsrŒ   Úlog_warnr•   rš   ry   Ú_exit)r›   Úmsgrå   Úforces   &&&&rr   rš   ÚSoSCollector.exit)  s‹   € ð �<�<ˆ<Ø�L‰L× Ñ Ô"ßØ�N‰N˜3Ôð	MØ×&Ñ&Ô(ð �CŒ<ð �L‰LŒNßÜ�HŠH�UŽOä�HŠH�UŽOøô ô 	MØ�M‰MÐKÖLð	Mús   ÁB& Â&CÃCc                ó  € RV P                   RV P                   P                  R8g  RV P                  R\        \	        V P                   P
                  4      \	        V P                  4      4      RV P                  /V n        R# )zhFrom commandline options, defaults, etc... build a set of commons
to hand to other collector mechanisms
ÚcmdlineoptsÚ	need_sudorN   ÚtmpdirÚhostlenÚpolicyN)	r…   rM   r   Úmaxrà   r3   rˆ   r"  r¦   ©r›   s   &rr   rŽ   ÚSoSCollector._parse_optionsG  s`   € ð
 ˜4Ÿ9™9Ø˜Ÿ™×+Ñ+¨vÑ5Ø�d—k‘kØ”sœ3˜tŸy™y×0Ñ0Ó1´3°t·}±}Ó3EÓFØ�d—k‘kð
ˆŽr«   c           	     ó–  € . p\        V P                  P                  \        4      '       g'   V P                  P                  .V P                  n        V P                  P                  '       d¸   V P                  P                   F�  pVP	                  R 4      ^ ,          pVP	                  R 4      ^,          P	                  R4      ^ ,          p VP	                  R4      ^,          P	                  4       ^ ,          pVP                  \        WEVP                  V4      4       KŸ  	  WP                  n        R#   \
         d    Rp LKi ; i)r¸   Ú=ÚTrueN)	rÝ   r…   r   r‰   rÈ   Ú
IndexErrorrß   r
   r    )r›   r…   Úoptionr}   Únamer  s   &     rr   r’   Ú"SoSCollector.parse_cluster_optionsS  sù   € ØˆÜ˜$Ÿ)™)×3Ñ3´T×:Ò:Ø)-¯©×)BÑ)BÐ(CˆD�I‰IÔ%Ø�9‰9×$×$Ð$ØŸ)™)×3Ô3�Ø Ÿ,™, sÓ+¨AÕ.�Ø—|‘| CÓ(¨Õ+×1Ñ1°#Ó6°qÕ9�ð#ð #ŸL™L¨Ó-¨aÕ0×6Ñ6Ó8¸Õ;�Eð
 —‘Ü! $¨u¯©ÀÓHöñ 4ð %)�	‰	Ö!øô "ô #à"’Eð#ús   Ã-D8Ä8EÅEc                óê  € V P                   P                  '       d×   V P                   P                   F„  pRpV P                  P                  4        Fa  w  r4VP                   FL  pVP
                  VP
                  8X  g   K   VP                  V8X  g   K3  RpV P                  WQ4      Vn         K_  	  Kc  	  K†  	  X'       g/   V P                  RXP                   RVP
                   2^4       R# R# R# )z+Verify that requested cluster options existFTz!Unknown cluster option provided: r¸   N)
r…   r   r�   r  Úoptionsr+  r}   Ú_validate_optionr  rš   )r›   ÚoptÚmatchÚclustr  r*  s   &     rr   r˜   Ú#SoSCollector.verify_cluster_optionsh  sÀ   € à�9‰9×$×$Ð$Ø—y‘y×0Ô0�Ø�Ø$(§M¡M×$7Ñ$7Ö$9‘L�EØ"'§-¤-˜ØŸ8™8 v§{¡{Ö2°s·{±{ÀeÖ7KØ$(˜EØ(,×(=Ñ(=¸fÓ(J˜CœIÚ!ó	 #0ó %:ñ 1÷ Ø—	‘	Ð=Ø Ÿ[™[˜M¨¨3¯8©8¨*ð6Ø78ö:ñ ñ %r«   c                ó„  € VP                   \        8X  gc   VP                   VP                   8X  g<   RpV P                  W2P                  VP                   VP                   3,          ^4       VP                  # VP                  P                  4       pVR9  d%   RpV P                  W2P                  ,          ^4       VR9   # )a  Checks to make sure that the option given on the CLI is valid.
Valid in this sense means that the type of value given matches what a
cluster profile expects (str for str, bool for bool, etc).

For bool options, this will also convert the string equivalent to an
actual boolean value
z.Invalid option type for %s. Expected %s got %szUInvalid value for %s. Accepted values are: 'true', 'false', 'on', 'off', 'yes', 'no'.)ÚtrueÚonÚyesÚfalseÚoffÚno)r5  r6  r7  )Úopt_typeÚboolrš   r+  r  Úlower)r›   rò   Úclir  Úvals   &&&  rr   r/  ÚSoSCollector._validate_optionw  s™   € ð ×Ñ¤4Ô'Ø×#Ñ# s§|¡|Ô3ØF�Ø—	‘	˜#§¡¨7×+;Ñ+;¸S¿\¹\Ð JÕJÈAÔNØ—9‘9Ðà�i‰i�o‰oÓˆØÐAÔAð8ˆCà�I‰I�cŸH™H•n aÔ(ØÐ+Ñ+Ð+r«   c                ó<   € V P                   P                  V4       R# )z.Log info messages to both console and log fileN)ÚsoslogÚinfo©r›   r  s   &&rr   Úlog_infoÚSoSCollector.log_infoŒ  s   € à�‰×Ñ˜Ör«   c                ó<   € V P                   P                  V4       R# )z.Log warn messages to both console and log fileN)rB  ÚwarningrD  s   &&rr   r  ÚSoSCollector.log_warn�  s   € à�‰×Ñ˜CÖ r«   c                ó<   € V P                   P                  V4       R# )z/Log error messages to both console and log fileN)rB  rå   rD  s   &&rr   r�   ÚSoSCollector.log_error”  s   € à�‰×Ñ˜#Ör«   c                ó’   € \         P                  ! 4       ^,          ^,          pRV RV 2pV P                  P                  V4       R# )z.Log debug message to both console and log filez[sos_collector:z] N)rÏ   ÚstackrB  Údebug)r›   r  Úcallers   && rr   r“   ÚSoSCollector.log_debug˜  s;   € ä—’“ Õ# AÕ&ˆØ ˜x r¨#¨Ð/ˆØ�‰×Ñ˜#Ör«   c                ó  a€ \         P                  P                  R4       \         P                  P                  R4       \        V P                  4       FF  p\         P                  P                  RVR RV P                  V,          P
                  R R24       KH  	  / oV P                  P                  4        F�  w  r#VP                   Fˆ  pVP                  S9  d   VSVP                  &   K%  VP                   FS  pVSVP                  ,          P                  9  g   K'  SVP                  ,          P                  P                  V4       KU  	  KŠ  	  KŸ  	  \         P                  P                  R4       \         P                  P                  RRR	 RR
R RRR RRR RRR R24       \        SV3R lR7       F¦  pSV,          pRRP                  R \        VP                  4       4       4      R	 RVP                  R RVP                  P                  R R\        VP                  4      R RVP                   R R2p\         P                  P                  V4       K¨  	  \         P                  P                  R4       R# )z&Display options for available clustersz;
The following clusters are supported by this installation
z@Use the short name with --cluster-type or cluster options (-c)

rl   z<15Ú30Ú
z/
The following cluster options are available:

rÇ   Ú25zOption NameÚ15ÚTypez<10ÚDefaultÚ10ÚDescriptionÚ<c                 ó*   <€ SV ,          P                   # rn   )r}   )ÚxÚ_optss   &€rr   Ú<lambda>Ú+SoSCollector.list_options.<locals>.<lambda>º  s   ø€ °°aµ×0@Ò0@r«   ©Úkeyz  z, c              3   ó$   "  € T F  qx € K  	  R # 5irn   ro   )rp   Úcs   & rr   rs   Ú,SoSCollector.list_options.<locals>.<genexpr>½  s   é € Ð>Ñ*= QœqÓ*=ùru   zh
Options take the form of cluster.name=value
E.G. "ovirt.no-database=True" or "pacemaker.offline=False"
N)r•   ÚstdoutÚwriterº   r�   Úcluster_namer  r.  r+  r}   rß   r”   r;  rÎ   r  r  Údescription)	r›   r}   rÂ   r  r0  r2  Ú_optÚoptlnr]  s	   &       @rr   r.   ÚSoSCollector.list_optionsž  s  ø€ ô 	�
‰
×Ñð *ô 	+ä�
‰
×Ñð ,ô 	-ä˜dŸm™mÖ,ˆGÜ�J‰J×ÑØ�G˜C�=  $§-¡-°Õ"8×"EÑ"EÀbÐ!IÈÐLöñ -ð
 ˆØŸ™×+Ñ+Ö-‰HˆAØ—}”}�Ø—8‘8 5Ô(Ø&)�E˜#Ÿ(™(“Oà!$§¤˜Ø ¨¨c¯h©h­×(?Ñ(?Ö?Ø! #§(¡(�O×3Ñ3×:Ñ:¸5ÖAó "-ó	 %ñ .ô 	�
‰
×ÑÐMÔNÜ�
‰
×ÑØ�	˜"ˆ~˜Q˜}¨RÐ0°°&¸°¸Q¸yÈ¸nÈAØ˜QÐ˜rð#ô	
ô
 ˜5Ô&@×AˆDØ˜•+ˆCà�T—Y‘YÑ>¬&°·±Ô*=Ó>Ó>¸rÐBÀ!Ø—8‘8˜B�-˜q §¡×!6Ñ!6°sÐ ;¸1Ü�s—y‘y“> #Ð& a¨¯©¸Ð'<¸Bð@ð ô
 �J‰J×Ñ˜UÖ#ñ Bô 	�
‰
×Ñð 7ö 	8r«   c                óF   € \         P                  ! V P                  4       R# )z8Removes the temp directory and all collected sos reportsN)ÚshutilÚrmtreer   r$  s   &rr   Údelete_tmp_dirÚSoSCollector.delete_tmp_dirÆ  s   € ä�Š�d—k‘kÖ"r«   c                ó,  € RpV P                   P                  '       d!   VRV P                   P                   2,          pV P                   P                  '       d!   VRV P                   P                   2,          p\        P                  ! \        P
                  ! 4       R4      p \        P                  \        n        RP                  R \        ^4       4       4      pV RV RV 2#   \         d   pT P                  RT 24        Rp?LORp?ii ; i)z(Generates a name for the tarball archivezsos-collectorÚ-z%Y-%m-%dz#Could not cast to ascii_lowercase: Nr!   c              3   ój   "  € T F)  p\         P                  ! \        P                  4      x € K+  	  R # 5irn   )ÚrandomÚchoiceÚstringÚ	lowercase)rp   r\  s   & rr   rs   Ú1SoSCollector._get_archive_name.<locals>.<genexpr>Ø  s"   é € ÐIÁ¸1”v—}’}¤V×%5Ñ%5×6Ð6Ãùs   ‚13)r…   r-   r   r   ÚstrftimeÚnowrv  Úascii_lowercaserw  Ú	NameErrorr“   r”   Úrange)r›   ÚnstrÚdtÚerrÚrands   &    rr   Ú_get_archive_nameÚSoSCollector._get_archive_nameÊ  sâ   € àˆØ�9‰9�?�?ˆ?Ø�a˜Ÿ	™	Ÿ™Ð(Ð)Õ)ˆDØ�9‰9××ÐØ�a˜Ÿ	™	×)Ñ)Ð*Ð+Õ+ˆDÜ×ÒœxŸ|š|›~¨zÓ:ˆð	HÜ%×5Ñ5ŒFÔð �w‰wÑIÄÀaÄÓIÓIˆØ��q˜˜˜A˜d˜VÐ$Ð$øô	 ô 	HØ�N‰NÐ@ÀÀÐF×GÑGûð	Hús   Â&C* Ã*DÃ5DÄDc                ó”   € V P                  4       V n        RpV P                  R,           V P                  ,           R,           V,           # )zfReturns the path, including filename, of the tarball we build
that contains the collected sos reports
ÚgzÚ/z.tar.)r‚  Úarc_namer   )r›   Úcomprs   & rr   Ú_get_archive_pathÚSoSCollector._get_archive_pathÛ  s;   € ð ×.Ñ.Ó0ˆŒØˆØ�{‰{˜SÕ  4§=¡=Õ0°7Õ:¸UÕBÐBr«   c           
     ó„  € V P                   P                  pV\        P                  P	                  \
        P                  ! 4       RV 24      \        P                  P	                  \        V4      .pRpV F,  p\        P                  P                  V4      '       g   K*  Tp M	  Vf   \        RV 24      hV P                  RV 24       \        VRRR7      ;_uu_ 4       p\        P                  ! V4      pR FN  pWg,          '       g   K  V P                  RV R	Wg,           R
24       \        V P                   WvV,          4       KP  	  VR,          '       dI   V P                  RVR,           R24       V P                   P                  P!                  VR,          4       RRR4       R#   + '       g   i     R# ; i)ah  
Attempts to load the host group specified on the command line.
Host groups are defined via JSON files, typically saved under
/etc/sos/groups.d/, although users can specify a full filepath
on the commandline to point to one existing anywhere on the system

Host groups define a list of nodes and/or regexes and optionally the
primary and cluster-type options.
z.config/sos/groups.d/Nzno group definition for zLoading host group Úrúutf-8©ÚencodingzSetting option 'z' to 'z'per host groupr6   zAdding ú to node list)r3   r   )r…   r#   ry   r®   r”   r   ÚhomeÚCOLLECTOR_CONFIG_DIRr¹   ÚOSErrorr“   ÚopenÚjsonÚloadr„   r6   r°   )r›   ÚgrpÚpathsrÁ   r®   ÚhfÚ_groupra  s   &       rr   Ú_load_group_configÚSoSCollector._load_group_configã  s]  € ð �i‰i�o‰oˆàÜ�G‰G�L‰LœŸš›Ð(=¸c¸UÐ&CÓDÜ�G‰G�L‰LÔ-¨sÓ3ð
ˆð ˆÛˆDÜ�w‰w�~‰~˜d×#Ô#Ø�Ùñ ð Š=ÜÐ4°S°EÐ:Ó;Ð;à�‰Ð,¨U¨GÐ4Ô5ä�%˜ w×/Õ/°2Ü—Y’Y˜r“]ˆFÛ2�Ø—;–;Ø—N‘NÐ%5°c°U¸&ÀÅÀð N4ð $4ô 5ä˜DŸI™I s°3­KÖ8ñ	 3ð
 �g�ŒØ—‘ ¨°­Ð(9¸ÐGÔHØ—	‘	—‘×&Ñ& v¨g¥Ô7÷ 0×/×/Ò/ús   Ã"'F.ÄAF.ÅAF.Æ.F?	c           
     ó¨  € RV P                   P                  RV P                   P                  RV P                  P                  ^ ,          R\        V P                  4      /p\        P                  ! 4       ^ 8w  dM   \        P                  P                  \        P                  ! 4       R4      p\        P                  ! VRR7       M\        p\        P                  P                  W!R,          4      p\        VRR	R
7      ;_uu_ 4       p\         P"                  ! W4       RRR4       \        P$                  ! VR4       V#   + '       g   i     L); i)zô
Saves the results of this run of sos collect to a host group file
on the system so it can be used later on.

The host group will save the options primary, cluster_type, and nodes
as determined by sos collect prior to execution of sos reports.
r+  r3   r   r6   z.config/sos/groups.dT)Úexist_okÚwr�  rŽ  Ni€  )r…   rF   r3   r}   r   r‰   rj   ry   Úgetuidr®   r”   r   r‘  Úmakedirsr’  r”  r•  ÚdumpÚchmod)r›   ÚcfgÚ
group_pathrÁ   r™  s   &    rr   Úwrite_host_groupÚSoSCollector.write_host_group	  sÝ   € ð �D—I‘I×(Ñ(Ø�t—y‘y×(Ñ(Ø˜DŸL™L×5Ñ5°aÕ8Ø”T˜$Ÿ.™.Ó)ð	
ˆô �9Š9‹;˜!ÔÜŸ™Ÿ™¤d§i¢i£kÐ3IÓJˆJä�KŠK˜
¨TÖ2ä-ˆJÜ—‘—‘˜Z¨V­Ó5ˆÜ�%˜ w×/Õ/°2Ü�IŠI�cÔ÷ 0ä
�Š�˜ÔØˆ÷ 0×/ús   Ä	EÅE	c                ó@  € V P                   P                  V P                  4       V P                  P                  '       gZ   V P                  P
                  '       g>   V P                  R 4       RpV P                  P                  V P                  V4      4        V P                  P                  '       g9   V P                  P
                  '       d   V P                  P                  '       dc   V P                  P                  '       gG   V P                  R4       RV P                  P                   R2p\        VR7      V P                  n        V P                  R,          '       dù   V P                  P                  '       gÝ   V P                  P                  '       gÁ   V P                  P                  '       gd   V P                  P
                  '       gH   V P                  R4       RV P                  P                   R	2p\        VR7      V P                  n        MAV P                  P                  '       g&   V P                  P                  V P                  n        V P                  P$                  '       dÄ   V P                  P                  R8X  g‡   V P                  P                  '       d   RpV P#                  V^4       V P                  R4       RV P                  P                   R2p\        VR7      V P                  n        RV P                  R&   M"V P)                  R4       RV P                  n        V P                  P*                  '       d    V P-                  4         V P                   P1                  4        V P                  P                  '       d$   V P3                  4        RV P                  n        EM RpRpRpV P                  P4                  '       gÆ   \6        P8                  ! 4       ^ 8w  d¬   V P                  P                  '       g�   V P                  P                  '       gF   Rp\        V4      pVR8X  d1   V P                  P                  V4       RpRV P                  n        RpM.V P                  P                  V4       RpRV P                  n        \;        RV P                  VVR7      V n
        V P<                  P?                  RV P                  P@                  4       V P<                  PC                  R4       V P<                  PD                  PC                  V P                  P@                  4       V P                  PG                  \I        V P<                  PD                  V P                  P@                  4      4       V P                  PJ                  '       d˜   V P                  PJ                  R8X  d   V PL                  R ,          V n'        MGV PL                  V P                  PJ                  ,          V n'        V P                  PJ                  V n%        V P                  V PN                  n
        MV PQ                  4        V PN                  f2   V P                  PD                  '       g   R!pV P#                  V^4       MZV PN                  fM   V P                  PD                  '       d1   V P)                  R"4       V PL                  R ,          V n'        RV n%        V P<                  P?                  R#V PJ                  4       V PN                  '       Ed    V PN                  V P                  n'        V P                  PR                  R$8X  d*   V PN                  PU                  4       V P                  n)        V PN                  PW                  4        V PN                  PX                  '       dk   V P                  PZ                  '       gO   V P                  R%V PN                  PX                   R&24       V PN                  PX                  V P                  n-        V P]                  4        V P                  P^                  '       dA   V P                  P^                  p V Pa                  4       pV P)                  R'V R(V 24       R# R#   \          d    T P#                  R
^‚4        EL_i ; i  \.         d:   pRT P                  P*                   RT 2pT P#                  T^4        Rp?EL–Rp?ii ; i  \          d    T P#                  R^‚4        EL£i ; i  \.         d2   pT P                  RT 24       T P#                  R^4        Rp?EL™Rp?ii ; i  \.         d#   pT Pc                  R)T RT 24        Rp?R# Rp?ii ; i)*z)password not specified, assuming SSH keyszgsos collect ASSUMES that SSH keys are installed on all nodes unless the --password option is provided.
z&password specified, not using SSH keysz"Provide the SSH password for user ú: )Úpromptr  z3non-root user specified, will request sudo passwordz=A non-root user has been provided. Provide sudo password for z on remote nodes: z
Exiting on user cancel
rN   zkCannot become root without obtaining root password. Do not use --batch if you need to become root remotely.z,non-root user asking to become root remotelyzUser z5 will attempt to become root. Provide root password: FzSOption to become root but ssh user is root. Ignoring request to change user on nodezCould not load specified group NúExiting on user cancel
Tz¸Local sos report generation forcibly skipped due to lack of root privileges.
Either use --nopasswd-sudo, run as root, or do not use --batch so that you will be prompted for a password
z8Enter local sudo password to generate local sos report: r!   Ú	localhost)Ú
local_sudoÚ
load_factsz(Unable to determine local installation: zsUnable to determine local installation. Use the --no-local option if localhost should not be included.
Aborting...
r3   r6   ri   ÚjbonzFCluster type could not be determined and no nodes provided
Aborting...zCluster type could not be determined, but --nodes is provided. Attempting to continue using JBON cluster type and the node listr   r   zUpdating SSH key to z per clusterzWrote group 'z' to zCould not save group )2r"  Úset_commonsr¦   r…   r=   r>   r“   Úui_logrC  Ú_fmt_msgr3   ÚbatchrM   r   r9   rk   r™   rš   r   Úroot_passwordrE  r#   r›  rŒ   Úpre_workÚconnect_to_primaryr8   ry   r   r	   r�   r‚   Úaddressr€   r6   Úset_node_manifestÚgetattrr   r�   r}   Údetermine_clusterrR   Úset_transport_typeÚsetupÚcluster_ssh_keyrK   Ú	get_nodesrF   r¦  r�   )r›   r  r€  Úcan_run_localr­  Úskip_local_msgÚgnamerÁ   s   &       rr   ÚprepÚSoSCollector.prep#  s  € Ø�‰×Ñ §¡Ô-Ø—	‘	×"×"Ð"Ø—	‘	×+×+Ð+Ø�N‰NÐFÔGðGˆCà�K‰K×Ñ˜TŸ]™]¨3Ó/Ô0ð	9Ø—‘×#×#Ð#¨¯	©	×(C×(CÐ(CØ(,¯	©	×(9×(9Ð(9Ø ŸI™IŸOŸO˜OØ—‘ÐGÔHØ;ØŸ)™)×,Ñ,Ð-¨Rð1�ä%,°CÔ%8�—	‘	Ô"à—‘˜k×*Ô*°4·9±9×3J×3JÐ3JØ ŸI™IŸOŸO˜OØ—y‘y×)×)Ð)°$·)±)×2M×2MÐ2MØ—N‘Nð $3ô 4ð+Ø+/¯9©9×+=Ñ+=Ð*>ð ?%ð%�Cô )0°sÔ(;�D—I‘IÕ%àŸ9™9×2×2Ð2Ø,0¯I©I×,>Ñ,>˜Ÿ	™	Ô)ð �9‰9× × Ð Ø—9‘9×%Ñ%¨Ô/Ø—9‘9—?—?�?ð6�Cð —I‘I˜c 1Ô%Ø—‘ÐMÔNØ˜tŸy™y×1Ñ1Ð2ð 37ð 7�ä*1¸Ô*=�—	‘	Ô'Ø,1�—‘˜[Ò)à—‘ð Iô Jà(-�—	‘	Ô%à�9‰9�?�?ˆ?ð"Ø×'Ñ'Ô)ð	7Ø�K‰K× Ñ Ô"ð �9‰9××ÐØ×#Ñ#Ô%Ø!%ˆD�I‰IÖð 9Ø $�Ø!�
ð0ð ð Ÿ	™	×*×*Ð*´·	²	³¸qÔ0@Ø04·	±	×0G×0GÐ0GØŸ9™9Ÿ?Ÿ?˜?ð .˜ä%,¨S£\˜
Ø%¨Ô+Ø ŸK™K×,Ñ,¨^Ô<Ø,1˜MØ15˜DŸI™IÔ.Ø)-˜JøàŸ™×(Ñ(¨Ô8Ø(-˜Ø-1˜Ÿ	™	Ô*Ü& {°D·L±LØ2<Ø2?ô A�”ð 	�‰×!Ñ! )¨T¯\©\×-AÑ-AÔBØ�‰×#Ñ# GÔ,Ø�‰×Ñ×)Ñ)¨$¯,©,×*>Ñ*>Ô?Ø�‰×&Ñ&¤w¨t¯©×/DÑ/DØ/3¯|©|×/CÑ/Có(Eô 	Fð �9‰9×!×!Ð!Ø�y‰y×%Ñ%¨Ô/Ø#Ÿ}™}¨VÕ4�•à#Ÿ}™}¨T¯Y©Y×-CÑ-CÕD�”Ø$(§I¡I×$:Ñ$:�Ô!Ø#'§<¡<ˆD�L‰LÕ ð ×"Ñ"Ô$Ø�<‰<Ò¨¯	©	¯¯¨ð#ˆCà�I‰I�c˜1ÕØ�\‰\Ò! d§i¡i§o§o oØ�M‰Mð ;ô <ð  Ÿ=™=¨Õ0ˆDŒLØ &ˆDÔØ�‰×!Ñ! .°$×2CÑ2CÔDØ�<�<‰<Ø#'§<¡<ˆD�L‰LÔ Ø�y‰y×"Ñ" fÔ,Ø&*§l¡l×&EÑ&EÓ&G�—	‘	Ô#Ø�L‰L×ÑÔ Ø�|‰|×+×+Ð+Ø—y‘y×(×(Ð(Ø—N‘NØ.¨t¯|©|×/KÑ/KÐ.Lð M&ð &ô'ð )-¯©×(DÑ(D�D—I‘IÔ%à�‰ÔØ�9‰9××ÐØ—I‘I×(Ñ(ˆEðGØ×-Ñ-Ó/�Ø—‘ ¨e¨W°E¸%¸ÐAÖBñ	  øô_ !ô 	9Ø�I‰IÐ2°C×8ð	9ûô. ô "Ø8¸¿¹¿¹Ð8IÈØ˜ð �à—	‘	˜#˜q×!Ò!ûð"ûô !ô 	7Ø�I‰IÐ0°#×6ð	7ûôD ô 9Ø—‘ÐIØ"% ð (ô )à—	‘	ð 5à67÷9ò 9ûð9ûôh ô GØ—‘Ð!6°u°g¸RÀ¸uÐE×FÒFûðGúsÃ   Âb" Â8b" Ãb" Ã0b" ÄAb" Å+b" Æb" Æ#b" Æ?b" ÇAb" È"b" È>%b" Íc Í0d Ï
!d1 Ï,5d1 Ð"d1 Ð>Bd1 á7'e0 â"cãcãd
ã.däd
äd.ä-d.ä1e-ä<&e(å(e-å0få;fæfc                ó”  € V P                   P                  R4       V P                  '       g/   V P                  P                  '       g   V P                  R^4       V P                   P                  R4       V P                  P                  '       d´   V P                  P                  eœ   V P                  P                  '       d   V P                  P                  '       gd   V P                  P                  '       gH   V P                   P                  RV P                  P                  RV P                  R,           2 24       \        V P                  4       F6  pV P                   P                  RVRV P                  R,           2 24       K8  	  V P                   P                  R4       V P                  P                  '       g*    \        R4       V P                   P                  R4       R# R#   \          d    T P                  R	^‚4        R# \"         d'   pT P                  \%        T4      ^4        Rp?R# Rp?ii ; i)
zePrints a list of nodes to collect from, if available. If no nodes
are discovered or provided, abort.
r!   zGNo nodes were detected, or nodes do not have sos installed.
Aborting...z1The following is a list of nodes to collect from:NÚ	rZ  r!  zC
Press ENTER to continue with these nodes, or press CTRL-C to quit
rv   )r±  rC  rj   r3   Ú	connectedrš   rˆ   Úlocalr…   r8   r}   Ústrict_node_listr¦   rº   r³  Úinputr™   rŒ   Úrepr)r›   ræ   rÖ   s   &  rr   Údisplay_nodesÚSoSCollector.display_nodes¸  s©  € ð 	�‰×Ñ˜Ôà�~�~ˆ~ d§l¡l×&<×&<Ð&<Ø�I‰Ið 0Ø12ô4ð 	�‰×ÑÐLÔMØ�<‰<×!×!Ð! d§l¡l×&;Ñ&;Ò&GØ—\‘\×'×'Ð'¨D¯I©I×,>×,>Ð,>Ø—|‘|×4×4Ð4Ø—‘× Ñ Ø˜Ÿ™×.Ñ.¨q°·±¸iÕ1HÐ0IÐ.IÐJÐKôô ˜4Ÿ>™>Ö*ˆDØ�K‰K×Ñ˜r $ q¨¯©°iÕ)@Ð(AÐ&AÐ!BÐCÖDñ +ð 	�‰×Ñ˜ÔØ�y‰y��ˆð&Üð )ô *à—‘× Ñ  Ö$ñ	 øô
 %ô 9Ø—	‘	Ð2°C×8Üô &Ø—	‘	œ$˜q›' 1×%Ò%ûð&ús$   Ç&G7 Ç7IÈIÈ IÈ!IÉIc                ó\  € Rp/ pV P                   P                  '       d#   \        V P                   P                  4      VR&   V P                   P                  '       d   RVR&   V P                   P                  '       d   RVR&   V P                   P
                  '       d   RVR&   V P                   P                  '       d,   \        \        V P                   P                  4      4      VR&   V P                   P                  '       d#   \        V P                   P                  4      VR&   V P                   P                  '       d#   \        V P                   P                  4      VR	&   V P                   P                  R
8w  d#   \        V P                   P                  4      VR&   VP                  4        F  w  r4VRV RV R2,          pK  	  VP                  4       pV P                  RV 24       RV P                  R&   W P                  R&   V P                  P!                  RV4       R# )z:Configures the sos report command that is run on the nodeszsosreport --batch zcase-idr!   r   zall-logsrU   zlog-sizeÚsysrootr   r   zcompression-typez--rl   zInitial sos cmd set to Úsos_cmdÚsos_optionsÚinitial_sos_cmdN)r…   r   r   r   r   rU   r/   r  rÎ  r   Úcompression_typer  Úrstripr“   r¦   r�   r‚   )r›   rÏ  rÐ  ÚkÚvs   &    rr   Úconfigure_sos_cmdÚSoSCollector.configure_sos_cmdØ  s«  € à&ˆàˆà�9‰9××ÐÜ%*¨4¯9©9×+<Ñ+<Ó%=ˆK˜	Ñ"Ø�9‰9××ÐØ(*ˆK˜Ñ%Ø�9‰9××ÐØ&(ˆK˜
Ñ#Ø�9‰9××ÐØ$&ˆK˜Ñ!Ø�9‰9××ÐÜ&+¬C°·	±	×0BÑ0BÓ,CÓ&DˆK˜
Ñ#Ø�9‰9××ÐÜ%*¨4¯9©9×+<Ñ+<Ó%=ˆK˜	Ñ"Ø�9‰9××ÐÜ$)¨$¯)©)×*:Ñ*:Ó$;ˆK˜Ñ!Ø�9‰9×%Ñ%¨Ô/Ü.3°D·I±I×4NÑ4NÓ.OˆKÐ*Ñ+à×%Ñ%Ö'‰DˆAØ˜˜A˜3˜a ˜s !�}Õ$ŠGñ (à—.‘.Ó"ˆØ�‰Ð0°°	Ð:Ô;Ø"6ˆ�‰�YÑØ&1�‰�]Ñ#Ø�‰×!Ñ!Ð"3°WÖ=r«   c                óJ  €  \        V P                  P                  V P                  4      V n        V P                  P                  RV P                  P                   R24       R#   \         d2   pT P                  RT 24       T P                  R^4        Rp?R# Rp?ii ; i)zWIf run with --primary, we will run cluster checks again that
instead of the localhost.
zConnected to z, determining cluster type...z#Failed to connect to primary node: z.Could not connect to primary node. Aborting...N)	r	   r…   r3   r¦   r±  rC  rŒ   r“   rš   )r›   rÖ   s   & rr   r¶  ÚSoSCollector.connect_to_primary÷  sŠ   € ð	KÜ" 4§9¡9×#4Ñ#4°d·l±lÓCˆDŒLØ�K‰K×Ñ˜}¨T¯Y©Y×->Ñ->Ð,?ð @/ð /ö 0øäô 	KØ�N‰NÐ@ÀÀÐDÔEØ�I‰IÐFÈ×JÒJûð	Kús   ‚A"A& Á&B"Á1&BÂB"c           	     óR  € \        V P                  P                  4       4      pV P                  P                  4        EFd  pVP                  V4       V P                  Vn        VP                  4       '       g   K>  VP                  P                  pV P                  RV R24       V F™  p\        VP                  VP                  4      '       g   K+  VP                  P                  pV P                  RV R24       V P                  Vn        VP                  4       '       g   K  V P                  RV RV R24       Tp M	  W n
        VP                  4       V n        V P                  V P                  R&   V P                  P                  R	V P                   24        R
# 	  R
# )a  This sets the cluster type and loads that cluster's cluster.

If no cluster type is matched and no list of nodes is provided by
the user, then we abort.

If a list of nodes is given, this is not run, however the cluster
can still be run if the user sets a --cluster-type manually
zInstallation matches z, checking for layered profileszLayered profile z found. Checking installationz*Installation matches both layered profile z and base profile z), setting cluster type to layered profiler}   zCluster type set to N)r‰   r�   ÚvaluesrÓ   r3   Úcheck_enabledr    rÎ   r“   Ú
issubclassr}   r+  r   r¦   r±  rC  )r›   Úchecksr}   ÚcnameÚ	remainingÚrnames   &     rr   rº  ÚSoSCollector.determine_cluster  st  € ô �d—m‘m×*Ñ*Ó,Ó-ˆØ—}‘}×+Ñ+×-ˆGØ�M‰M˜'Ô"Ø"Ÿl™lˆGŒOØ×$Ñ$×&Ô&Ø×)Ñ)×2Ñ2�Ø—‘Ð!6°u°gð >2ð  2ô 3ã!'�IÜ! )×"5Ñ"5°w×7HÑ7H×IÔIØ )× 3Ñ 3× <Ñ <˜ØŸ™Ð)9¸%¸ð A?ð (?ô @à,0¯L©L˜	Ô)Ø$×2Ñ2×4Ô4Ø ŸN™Nð ,6Ø6;°WÐ<NØ.3¨Wð 5=ð,=ô >ð '0˜GÙ!ñ "(ð  '”Ø$+§L¡L£N�Ô!Ø*.¯,©,�—‘˜YÑ'Ø—‘× Ñ Ø*¨4×+<Ñ+<Ð*=Ð>ô@âó3 .r«   c                óŠ   € V P                   '       d1   V P                  P                  4       pV P                  RV 24       V# . # )z>Collects the list of nodes from the determined cluster clusterzNode list: )r   r}   Ú
_get_nodesr“   )r›   r6   s   & rr   Úget_nodes_from_clusterÚ#SoSCollector.get_nodes_from_cluster(  s=   € à××ÐØ—L‘L×+Ñ+Ó-ˆEØ�N‰N˜[¨¨Ð0Ô1ØˆLØˆ	r«   c                óf  € V P                   V P                  9   dB   V P                  P                  '       d&   V P                  P	                  V P                   4       V P
                  P                  '       gA   V P                   F0  pWP                  9   g   K  V P                  P	                  V4       K2  	  V P                  e}   V P
                  P                  '       ga   V P                   FP  pW P                  P                   V P                  P                  39   g   K5  V P                  P	                  V4       KR  	  \        \        R V P                   4       4      4      V n        V P                  RV P                   24       V P                  P                  RV P                  4       R# )zKReduce duplicate entries of the localhost and/or primary node
if applicableNc              3   ó8   "  € T F  q'       g   K  Vx € K  	  R # 5irn   ro   )rp   Úns   & rr   rs   Ú0SoSCollector.reduce_node_list.<locals>.<genexpr>?  s   é € Ð!A©^¨»q§!¢!«^ùs   ‚	�
zNode list reduced to rj   )rˆ   rj   r…   r8   rÓ   r}   rÈ  r‹   r3   r‰   Úsetr“   r�   rƒ   )r›   rŸ   ré  s   &  rr   Úreduce_node_listÚSoSCollector.reduce_node_list0  s  € ð �M‰M˜TŸ^™^Ô+°·	±	×0B×0BÐ0BØ�N‰N×!Ñ! $§-¡-Ô0Ø�|‰|×,×,Ð,Ø—]”]�ØŸ™Ö&Ø—N‘N×)Ñ)¨!Ö,ñ #ð
 �<‰<Ò#¨D¯L©L×,I×,IÐ,IØ—^”^�ØŸ™×.Ñ.°·	±	×0AÑ0AÐBÖBØ—N‘N×)Ñ)¨!Ö,ñ $ô œcÑ!A¨T¯^ª^Ó!AÓAÓBˆŒØ�‰Ð.¨t¯~©~Ð.>Ð?Ô@Ø�‰× Ñ  ¨d¯n©nÖ=r«   c                ó(  € V P                   P                   F9  p \        P                  ! V4      p\        P
                  ! W!4      '       d    R# K;  	  R#   \        P                   d'   pRpT P                  YAY#3,          4        Rp?Ku  Rp?ii ; i)z…Compares a discovered node name to a provided list of nodes from
the user. If there is not a match, the node is removed from the listTz0Error comparing %s to provided node regex %s: %sNF)r…   r6   ÚfnmatchÚ	translaterá   r1  rå   r“   )r›   ræ   Úregexr€  r  s   &&   rr   Úcompare_node_to_regexÚ"SoSCollector.compare_node_to_regexC  sy   € ð —Y‘Y—_”_ˆEð9Ü×)Ò)¨%Ó0�Ü—8’8˜E×(Ò(Úñ )ñ %ñ øô —8‘8ô 9ØH�Ø—‘˜s¨EÐ%7Õ7×8Ò8ûð9ús   ›2AÁBÁ+BÂBc                ó  a€ V P                   '       g'   V P                  '       g   RpV P                  V^4        V P                  4       pV P                  P
                  '       d?   V F7  oV P                  S4      '       g   K  V P                  P                  S4       K9  	  MW n         V P                  P
                  '       d£   V P                  P
                   Fˆ  o\        ;QJ d    V3R lR	 4       F  '       g   K   RM	  RM! V3R lR	 4       4      '       d   KE  SV P                  9  g   KX  V P                  R
S R24       V P                  P                  S4       KŠ  	  V P                   '       g±   V P                  P                  R4      ^ ,          pV P                   F=  oVSP                  R4      ^ ,          8X  g   K"  V P                  P                  S4       K?  	  V P                  P                  '       g&   V P                  P                  V P                  4       V P!                  4         \#        \%        V P                  \"        R7      4      p\%        WPP&                  R,          4      V P&                  R&   R#   \         d¼   pT P                  RT 24       T P                  R4       T P                  P
                  T n        T P                   F`  o\        ;QJ d    T3R lR 4       F  '       g   K   RM	  RM! T3R lR 4       4      '       g   KE  T P                  P                  S4       Kb  	   Rp?EL¡Rp?ii ; i  \(        \*        3 d    pT P                  RT 24        Rp?R# Rp?ii ; i)z3Sets the list of nodes to collect sos reports from zaCould not determine a cluster type and no list of nodes or primary node was provided.
Aborting...zError parsing node list: z#Setting node list to --nodes optionc              3   ó,   <"  € T F	  qS9   x € K  	  R # 5irn   ro   ©rp   rŸ   ræ   s   & €rr   rs   Ú)SoSCollector.get_nodes.<locals>.<genexpr>e  s   øé € ÐJÑ*I Q˜D–yÓ*Iùó   ƒTFNc              3   ó,   <"  € T F	  qS9   x € K  	  R # 5irn   ro   rö  s   & €rr   rs   r÷  k  s   øé € Ð6©+ Q˜D–y«+ùrø  z*\?()/[]zForce adding r�  r¸   r`  r!  zCould not set UI spacing: )Ú*Ú\Ú?Ú(Ú)r†  )r3   r}   rš   rå  r…   r6   rò  rj   rß   rŒ   r“   ÚanyrÓ   rˆ   rÈ   rÈ  rì  rà   r#  r¦   Ú	TypeErrorÚ
ValueError)r›   r  r6   rÖ   ÚhostÚ	_node_maxr€  ræ   s   &      @rr   r¾  ÚSoSCollector.get_nodesP  sm  ø€ à�|�|ˆ| D§L§L LðFˆCð �I‰I�c˜1Ôð	0Ø×/Ñ/Ó1ˆEØ�y‰y��ˆÛ!�DØ×1Ñ1°$×7Ô7ØŸ™×-Ñ-¨dÖ3ò "ð "'•ð �9‰9�?�?ˆ?ØŸ	™	Ÿœ�ß“3Ô6©+Ó6—3—3’3Ô6©+Ó6×6Ò6ÙØ˜tŸ~™~Ö-Ø—N‘N ]°4°&¸Ð#FÔGØ—N‘N×)Ñ)¨$Ö/ñ (ð �|�|ˆ|Ø—=‘=×&Ñ& sÓ+¨AÕ.ˆDàŸœ�Ø˜4Ÿ:™: c›?¨1Õ-Ö-Ø—N‘N×)Ñ)¨$Ö/ñ 'ð —<‘<×0×0Ð0Ø—‘×%Ñ% d§m¡mÔ4Ø×ÑÔð	?ÜœC §¡´CÔ8Ó9ˆIÜ&)¨)·\±\À)Õ5LÓ&MˆD�L‰L˜Ó#øô9 ô 	0Ø�N‰NÐ6°q°cÐ:Ô;Ø�N‰NÐ@ÔAØ!ŸY™YŸ_™_ˆDŒNØŸœ�ß“3ÔJÑ*IÓJ—3—3’3ÔJÑ*IÓJ×JÔJØ—N‘N×)Ñ)¨$Ö/÷ 'ûð		0ûô: œ:Ð&ô 	?Ø�N‰NÐ7¸°uÐ=×>Ò>ûð	?úsO   »+J Á'J ÂJ Â%J È=AM ÊMÊA.MÌMÌ(MÍMÍNÍ&N Î Nc                óð  €  \        V^ ,          V P                  V^,          R7      pVP                  V P                  4       VP                  '       d€   V P
                  P                  V4       V P                  P                  P                  V^ ,          4       VP                  \        V P                  P                  V^ ,          4      4       R# VP                  4        R#   \         d     R# i ; i)zÆTry to connect to the node, and if we can add to the client list to
run sos report on

Positional arguments
    node - a tuple specifying (address, password). If no password, set
           to None
)r=   N)r	   r¦   Úset_clusterr}   rÆ  r{   rß   r�   r6   r€   r¸  r¹  Ú
disconnectrŒ   )r›   ræ   Úclients   && rr   Ú_connect_to_nodeÚSoSCollector._connect_to_node€  s·   € ð	Ü˜T !�W d§l¡l¸TÀ!½WÔEˆFØ×Ñ˜tŸ|™|Ô,Ø××ÐØ× Ñ ×'Ñ'¨Ô/Ø—‘×%Ñ%×1Ñ1°$°qµ'Ô:Ø×(Ñ(¬°·±×1FÑ1FØ15°aµó*:ö ;ð ×!Ñ!Ö#øÜô 	âð	ús   ‚CC& ÃC& Ã&C5Ã4C5c                óê  € RpV P                   P                  R\         R24       V P                  WP                  ,          4      pV P                   P                  V4       RpV P
                  P                  '       g*    \        V4       V P                   P                  R4       R# R#   \         d    T P                  R^‚4        R# \         d   pT P                  T^4        Rp?R# Rp?ii ; i)z]Print the intro message and prompts for a case ID if one is not
provided on the command line
ah  This utility is used to collect sos reports from multiple nodes simultaneously. Remote connections are made and/or maintained to those nodes via well-known transport protocols such as SSH.

An archive of sos report tarballs collected from the nodes will be generated in %s and may be provided to an appropriate support representative.

The generated archive may contain data considered sensitive and its content should be reviewed by the originating organization before being passed to any third party.

No configuration changes will be made to the system running this utility or remote systems that it connects to.
z
sos collect (version z)
z,
Press ENTER to continue, or CTRL-C to quit
r!   rv   N)r±  rC  r   r²  r   r…   r³  rÉ  r™   rš   rŒ   )r›   Ú
disclaimerÚ	intro_msgrª  rÖ   s   &    rr   ÚintroÚSoSCollector.intro–  s»   € ðˆ
ð 	�‰×ÑÐ2´;°-¸sÐCÔDØ—M‘M *¯{©{Õ":Ó;ˆ	Ø�‰×Ñ˜Ô#àAˆØ�y‰y��ˆð Ü�f”Ø—‘× Ñ  Ö$ñ øô %ô 9Ø—	‘	Ð2°C×8Üô  Ø—	‘	˜!˜Q—’ûð ús$   Â&B+ Â+C2ÃC2ÃC2ÃC-Ã-C2c                óª  € V P                   P                  '       d!   V P                  4        V P                  4        V P                  4        V P                   P                  '       d/   V P                   P
                  '       d   V P                  R ^4       V P                  4        V P                  4        V P                  4        V P                  4       V n
        V P                  V P                  R7       V P                  P                  4       V n        V P                  P                  RR4       V P!                  4        V P                  4        R# )zƒ
sos-collector was called with incompatible options --batch and --password.
If you need to use --password, please omit batch mode.
)r+  Úsos_logsií  N)r…   r.   rš   r  r³  r=   rÖ  rÂ  rË  r‚  Úarchive_nameÚsetup_archiveÚarchiveÚget_archive_pathÚarchive_pathr¡  rh   r$  s   &rr   ÚexecuteÚSoSCollector.execute·  sè   € Ø�9‰9×!×!Ð!Ø×ÑÔØ�I‰IŒKà�
‰
Œà�9‰9�?�?ˆ?˜tŸy™y×1×1Ð1Ø�I‰Ið-ð ô	ð 	×ÑÔ Ø�	‰	ŒØ×ÑÔà ×2Ñ2Ó4ˆÔØ×Ñ × 1Ñ 1ÐÔ2Ø ŸL™L×9Ñ9Ó;ˆÔØ�‰×Ñ˜j¨%Ô0à�‰ŒØ�	‰	Žr«   c           
     óÒ  € \        V P                  P                  V P                  P                  .4      pV P                  P                  '       dl   VP                  \        V P                  4      4      '       g   V P                  P                  '       g&   V P                  P                  V P                  4       V P                  P                  R4       V P                   Uu. uF  q"V9  g   K  VR3NK  	  ppV P                  P                  '       dW   . pV FL  pRV P                  P                   RV^ ,           R2p\!        V4      pVP                  V^ ,          V34       KN  	  Tp \#        V P                  P$                  4      pVP'                  V P(                  V^R7       VP+                  RR7       V P                  P,                  '       d>   V P                  ^ ,          P                  R	8X  d   V P                  P/                  ^ 4       \1        V P                  4      V n        V P2                  ^ 8X  d   V P5                  R
^4       MEV P2                  ^8X  d5   V P                  ^ ,          P                  R	8X  d   V P5                  R^4       V P                  P                  RV P2                   RV P                  P$                   R24       \#        V P                  P$                  4      p	V	P'                  V P6                  V P                  ^R7       V	P+                  RR7       \#        V P                  P$                  4      pVP'                  V P8                  V P                  ^R7       VP+                  RR7       \?        V P                  R4      '       dY   V P                  P                  R4       V P                  PA                  4       pV'       d   V P                  PC                  V4       RpV PE                  W`PF                  V P2                  3,          4       V PI                  4        V PF                  ^ 8”  d   V PK                  4       V n&        MRpV P5                  V^4       V P                  PN                  '       g   V P                  PP                  '       d¦    RV PR                  RV PT                  RV PV                  RV P                  RV PX                  /p\[        V P\                  V P^                  V P`                  RVV PL                  R7      pVPc                  4        V P                  P                  R4       R# R# u upi   \:         d    T P5                  R^‚RR7        ELô\<         d%   p
RT
 2pT P5                  T^RR7        Rp
?
ELRp
?
ii ; i  \<         d*   p
T P                  Pe                  RT
 24        Rp
?
R# Rp
?
ii ; i)zPFor each node, start a collection thread and then tar all
collected sos reports z
Connecting to nodes...NzPlease enter the password for Ú@r©  )Ú	chunksizeT)Úwaitr¬  zNo nodes connected. Aborting...z±Collection would only gather from localhost due to failure to either enumerate or connect to cluster nodes. Assuming single collection from localhost is not desired.
Aborting...z*
Beginning collection of sos reports from z  nodes, collecting a maximum of z concurrently
r«  )r  zCould not connect to nodes: Úrun_extra_cmdz/Collecting additional data from primary node...z+
Successfully captured %s of %s sos reportsz4No sos reports were collected, nothing to archive...r"  r   Úsys_tmpr.  r~   )rœ   ÚargsÚcmdlineÚin_placeÚhook_commonsr  zUploaded archive successfullyzUpload attempt failed: )3rë  r3   r·  rˆ   rÆ  Úintersectionrj   r}   rÈ  r{   rß   r±  rC  r…   r>   rM   r   r   r(   Úmapr	  Úshutdownr8   Úpoprà   Ú
report_numrš   Ú_finalize_sos_cmdÚ_collectr™   rŒ   ÚhasattrÚ_run_extra_cmdÚcollect_extra_cmdrE  r|   r  Úcreate_cluster_archiver‡  rW   r_   r"  r   r  r~   r   rœ   r  r   r  rå   )r›   Úfiltersré  r6   Ú_nodesræ   r  Únode_pwdÚpoolÚnpoolr€  Úfilesr"  Úuploaders   &             rr   rh   ÚSoSCollector.collectÒ  s”  € ô �t—|‘|×+Ñ+¨T¯\©\×-BÑ-BÐCÓDˆð �<‰<×!×!Ð!Ø×%Ñ%¤c¨$¯.©.Ó&9×:Ò:Ø—\‘\×2×2Ð2Ø×Ñ×#Ñ# D§L¡LÔ1à�‰×ÑÐ3Ô4Ø$(§N¢NÓG¡N˜q¸wÑ6F”�!�T“¡NˆÐGà�9‰9×&×&Ð&ØˆFÛ�Ø7¸¿	¹	×8JÑ8JÐ7KÈ1Ø˜q�'˜ "ð&�ä" 3›<�Ø—‘˜t A�w¨Ð1Ö2ñ	 ð
 ˆEð&	*Ü% d§i¡i§n¡nÓ5ˆDØ�H‰H�T×*Ñ*¨E¸QˆHÔ?Ø�M‰M˜tˆMÔ$à—	‘	×"×"Ð"Ø×$Ñ$ QÕ'×/Ñ/°;Ô>Ø× Ñ ×$Ñ$ QÔ'ä! $×"2Ñ"2Ó3ˆDŒOà�‰ !Ô#Ø—	‘	Ð;¸QÕ?Ø—‘ AÔ%Ø×#Ñ# AÕ&×.Ñ.°+Ô=Ø—I‘Ið&ð ()ôð �K‰K×ÑÐJØ $§¡Ð0ð 1#Ø#'§9¡9§>¡>Ð"2°/ðCô Dô ' t§y¡y§~¡~Ó6ˆEØ�I‰I�d×,Ñ,¨d×.>Ñ.>È!ˆIÔLØ�N‰N ˆNÔ%ä% d§i¡i§n¡nÓ5ˆDØ�H‰H�T—]‘] D×$4Ñ$4ÀˆHÔBØ�M‰M˜tˆMÔ$ô �4—<‘< ×1Ò1Ø�K‰K×ÑÐNÔOØ—L‘L×/Ñ/Ó1ˆEßØ—‘×.Ñ.¨uÔ5Ø<ˆØ�‰�cŸ^™^¨T¯_©_Ð=Õ=Ô>Ø×"Ñ"Ô$Ø�>‰>˜AÔØ ×7Ñ7Ó9ˆD�MàHˆCØ�I‰I�c˜1Ôà�9‰9××ÐØ—	‘	×,×,Ð,ðCà˜dŸk™kØ˜dŸk™kØ˜tŸ|™|Ø˜tŸy™yØ §¡ð �ô %¨D¯K©KØ*.¯)©)Ø-1¯\©\Ø.2Ø2>Ø-1¯]©]ô<�ð × Ñ Ô"Ø—‘× Ñ Ð!@ÖAñ! -ùòE HøôZ !ô 	CØ�I‰IÐ0°#¸TˆI×BÜô 	*Ø0°°Ð6ˆCØ�I‰I�c˜1 DˆI×)Ò)ûð	*ûôH ô CØ—‘×!Ñ!Ð$;¸C¸5Ð"A×BÒBûðCúsJ   Ã&UÃ3UÅ0HU Ò4B"V2 ÕV/ÖV/Ö
V/ÖV*Ö*V/Ö2W&Ö=W!×!W&c                óœ   €  VP                  4        R#   \         d-   pT P                  RTP                   RT 24        Rp?R# Rp?ii ; i)zyCalls finalize_sos_cmd() on each node so that we have the final
command before we thread out the actual execution of sos
z#Could not finalize sos command for r©  N)Úfinalize_sos_cmdrŒ   r�   r·  ©r›   r  r€  s   && rr   r(  ÚSoSCollector._finalize_sos_cmd7  sL   € ð	7Ø×#Ñ#Ö%øÜô 	7Ø�N‰NÐ@Ø$Ÿn™nÐ-¨R°¨uð6÷ 7ò 7ûð	7ús   ‚ ”AŸ!AÁAc                óZ  €  VP                   '       g   VP                  4        M,V P                  P                  '       g   VP                  4        VP                  '       d   V ;P                  ^,          un        R# R#   \
         d    pT P                  RT 24        Rp?R# Rp?ii ; i)zRuns sos report on each nodezError running sos report: N)rÇ  Ú	sosreportr…   r8   r|   rŒ   r�   r8  s   && rr   r)  ÚSoSCollector._collectA  s~   € ð		?Ø—<—<�<Ø× Ñ Õ"à—y‘y×)×)Ð)Ø×$Ñ$Ô&Ø××ÐØ—’ !Õ#—ñ  øäô 	?Ø�N‰NÐ7¸°uÐ=×>Ò>ûð	?ús(   ‚B  ”,B  Á!B  Á#B  Â B*ÂB%Â%B*c                ó°   € V P                    FE  pVP                  '       g   K  V P                  RVP                   24       VP	                  4        KG  	  R# )zClose all sessions for nodeszClosing connection to N)r{   rÆ  r“   r·  r  )r›   r  s   & rr   r  Ú"SoSCollector.close_all_connectionsN  sC   € à×&Ô&ˆFØ××ÒØ—‘Ð!7¸¿¹Ð7GÐHÔIØ×!Ñ!Ö#ó 'r«   c           
     ó@  € Rp. pV P                    F'  pVP                   F  pVP                  V4       K  	  K)  	  RpV P                  P                  '       d—   RV P
                  RV P                  RV P                  RV P                  RV P                  /p V P                  P                  R4       \        R	VR
7      pVP                  V P                  4       VP                  4       w  rR	p V P!                  R4       V Fù  pVP#                  R4      R",          p	V'       d   XP%                  V	4      p	\&        P(                  P+                  V P                  V4      p
V P,                  P/                  W©R7       V'       g   K„  XP1                  V4      pV'       g   KŸ  \&        P(                  P+                  RVP#                  R4      R",          4      p
V
R,          p
V P,                  P3                  Wº4       Kû  	  V P,                  P/                  V P4                  \&        P(                  P+                  RR4      R7       V P,                  P/                  V P6                  \&        P(                  P+                  RR4      R7       V P                  e0   V P,                  P9                  V P                  P:                  4       V P=                  4        V'       dÏ   \&        P(                  P+                  V P                  V P,                  P>                  4      pXPA                  \&        P(                  P+                  VRR4      4       VPA                  \&        P(                  P+                  VRR4      4       VPA                  \&        P(                  P+                  VRR4      4       V P,                  PC                  RR7      p\&        P(                  P+                  V P                  \&        P(                  PE                  V4      4      pV'       d"   XP%                  VPG                  RR4      4      p\&        PH                  ! WÞ4       V'       d{   XP%                  \&        P(                  P+                  V P                  V PJ                   R24      4      p\&        PH                  ! W4       V P                  P                  RV 24       V PL                  P                  RV 24       V P                  P                  R4       V P                  P                  RV R24       V#   \         d*   pT P                  P                  RT 24        Rp?ELkRp?ii ; i  \         d0   pRT R T PN                   2pT PQ                  T^4        Rp?R!# Rp?ii ; i)#z[Calls for creation of tar archive then cleans up the temporary
files created by sos collectNFr"  r   r  r.  r~   r!   T)r!  r"  z$ERROR: unable to obfuscate reports: z"Creating archive of sos reports...r†  )rõ   Ú	checksumsz.sha256r  zsos.logzui.logÚsos_reportszmanifest.json)Úmethodz.tarz-obfuscated.tarÚ_private_mapz2A mapping of obfuscated elements is available at
	zArchive created as zP
The following archive has been created. Please provide it to your support team.rÅ  rS  zCould not finalize archive: z.

Data may still be available uncompressed at zArchive erroréÿÿÿÿ))r{   Ú	file_listrß   r…   r   r"  r   r  r~   r±  rC  r   Úset_target_pathr  rŒ   rå   rE  rÈ   Úobfuscate_stringry   r®   r”   r  Úadd_fileÚget_new_checksumÚ
add_stringÚsos_log_fileÚsos_ui_log_fileÚadd_final_manifest_datarÒ  Ú_obfuscate_upload_passwordsÚ_nameÚobfuscate_fileÚfinalizeÚbasenameÚreplaceÚrenamer  rB  r  rš   )r›   r1   Ú	arc_pathsr  rÁ   Údo_cleanr"  Úcleanerr€  rõ   r+  ÚchecksumÚ_dirr‡  Ú
final_nameÚmap_namer  s   &                rr   r-  Ú#SoSCollector.create_cluster_archiveU  sp  € ð ˆØˆ	Ø×$Ô$ˆDØŸœ�Ø× Ñ  Ö'ó (ñ %ð ˆØ�9‰9�?�?ˆ?à˜$Ÿ+™+Ø˜$Ÿ+™+Ø˜4Ÿ<™<Ø˜4Ÿ9™9Ø˜DŸM™MðˆLðPØ—‘× Ñ  Ô$Ü$¨dØ2>ô@�à×'Ñ'¨¯©Ô4Ø&-§o¡oÓ&7Ñ#�Ø�ðB	#Ø�M‰MÐ>Ô?Û"�Ø—{‘{ 3Ó'¨Õ+�ßØ"×3Ñ3°DÓ9�DÜ—w‘w—|‘| D§K¡K°Ó7�Ø—‘×%Ñ% dÐ%Ô6ß‘8à&×7Ñ7¸Ó>�Hß‘xÜ!Ÿw™wŸ|™|¨K¸¿¹ÀSÓ9IÈ"Õ9MÓN˜Ø 	Õ)˜ØŸ™×/Ñ/°Ö?ñ #ð �L‰L×!Ñ! $×"3Ñ"3Ü')§w¡w§|¡|°JÀ	Ó'Jð "ô Là�L‰L×!Ñ! $×"6Ñ"6Ü')§w¡w§|¡|°JÀÓ'Ið "ô Kð �}‰}Ò(Ø—‘×4Ñ4Ø—I‘I×.Ñ.ôð ×,Ñ,Ô.ßÜ—w‘w—|‘| D§K¡K°·±×1CÑ1CÓD�Ø×&Ñ&ÜŸ™Ÿ™ T¨:°yÓAôð ×&Ñ&Ü—G‘G—L‘L  z°8Ó<ôð ×&Ñ&Ü—G‘G—L‘L  }°oÓFôð —|‘|×,Ñ,°DÐ,Ó9ˆHÜŸ™Ÿ™ d§l¡l´B·G±G×4DÑ4DÀXÓ4NÓOˆJßØ$×5Ñ5Ø×&Ñ& vÐ/@ÓAó�
ô �IŠI�hÔ+çð #×3Ñ3Ü—G‘G—L‘L §¡Ø$(×$5Ñ$5Ð#6°lÐ!CóEó�ô —	’	˜(Ô-Ø—‘× Ñ ð "4Ø4<°:ð"?ô @ð �K‰K×ÑÐ2°:°,Ð?Ô@Ø�K‰K×Ñð Gô Hà�K‰K×Ñ˜r * ¨RÐ0Ô1ØÐøô ô PØ—‘×!Ñ!Ð$HÈÈÐ"N×OÒOûðPûô@ ô 	#Ø1°#°ð 70Ø04×0AÑ0AÐ/BðDˆCà�I‰I�c˜1Ôå"ûð	#úsM   ÂAT, Ã1BU# ÆU# Æ#D<U# Ë D8U# ÐDU# Ô,U Ô7UÕU Õ#VÕ.$VÖV)r‡  r  r  r{   r}   r   r�   r�   r¦   rˆ   r‹   rj   r3   r'  r|   )Nr   F)3rÎ   Ú
__module__Ú__qualname__Ú__firstlineno__r  ÚdescÚarg_defaultsrx   r�   Úclassmethodr¥   r±   r¾   r‘   r  r  rš   rŽ   r’   r˜   r/  rE  r  r�   r“   r.   ro  r‚  r‰  r›  r¦  rÂ  rË  rÖ  r¶  rº  rå  rì  rò  r¾  r	  r  r  rh   r(  r)  r  r-  Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r    Ú__classdict__s   @@rr   r   r   (   s?  ù‡ € ñð< F€DðOØ�EðOà�eðOð 	 ðOð 	�uð	Oð
 	�5ðOð 	�&ðOð 	�ðOð 	˜2ðOð 	˜ðOð 	˜VðOð 	�2ðOð 	˜2ðOð 	˜"ðOð 	�rðOð 	˜ðOð  	�ð!Oð" 	�ñ#Oð$ 	˜uð%Oð& 	˜Dð'Oð( 	˜rð)Oð* 	�ð+Oð, 	˜ð-Oð. 	�Bð/Oð0 	˜ð1Oð2 	˜Uð3Oð4 	�ð5Oð6 	˜ð7Oð8 	�Að9Oð: 	˜ð;Oð< 	Ð6ð=Oð> 	�2ð?Oð@ 	�dðAOðB 	˜DðCOðD 	�òEOðF 	�uðGOðH 	�EðIOðJ 	˜ðKOðL 	˜ðMOðN 	�UðOOðP 	˜ðQOðR 	�EðSOðT 	˜UðUOðV 	�BðWOðX 	˜$ðYOðZ 	�tð[Oð\ 	�"ð]Oð^ 	˜ð_Oð` 	˜TðaOðb 	˜TðcOðd 	�bðeOðf 	�ògOðh 	˜ðiOðj 	�bðkOðl 	˜ðmOðn 	�2ðoOðp 	�BðqOðr 	�FðsOðt 	�vðuOðv 	�3ðwOðx 	�VðyOðz 	˜kð{Oð| 	�%ð}Oð~ 	�RðOð@ 	�%ðAOðB 	�dðCOðD 	˜DðEOðF 	�tðGOðH 	�tñIOðJ 	˜Ø Ø˜6Ø˜dØ˜DØ˜DØ Ø Ø! 4Ø˜ñ]O€Lõb09òd
"ð ñó ðð ñó ðð, ñó ðò ðB ñi1ó ði1ðV ñó ðô&ò<

ò)ò*:ò,ò*ò!òòò&8òP#ò%ò"Cò$8òLò4SGòj&ò@>ò>
Kò#òJò>ò&ò.?ò`ò, òBò6cCòJ7ò?ò$÷^#ò ^#r«   r   )#rï  rÏ   r•  ry   rt  rá   rv  r†   rm  r•   r   Úconcurrent.futuresr   r   Úpathlibr   Úshlexr   Úsos.cleanerr   Úsos.collector.sosnoder	   Úsos.optionsr
   r   Úsos.componentr   Úsos.utilitiesr   r§   r   Ú
sos.uploadr   r’  r   ro   r«   rr   Ú<module>rp     s]   ðó Û Û Û 	Û Û 	Û Û Û Û 
å Ý 1Ý Ý Ý Ý "Ý )ß 2Ý &Ý Ý Ý  à*Ð ôK#�<ö K#r«   