diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2020-04-16 09:36:04 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-04-22 10:01:01 -0400 |
commit | 29e6bba95e4cbdd23421a21ef35edeebe3237112 (patch) | |
tree | 20c1706d593fbebf69d146b5ef0dcebc433f08af | |
parent | fc9327371a361954a1a9cade5cb7f206c31c6ad4 (diff) | |
download | sos-29e6bba95e4cbdd23421a21ef35edeebe3237112.tar.gz |
[collector] Use jbon cluster is none is determined but we have nodes
If we end up with no cluster determination, but have a manual list of
nodes provided, then attempt to continue by setting the cluster type to
JBON (just a bunch of nodes - our 'none' cluster).
This will not address situations where a cluster type cannot be
determined, and the node strings are all regexes.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | sos/collector/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sos/collector/__init__.py b/sos/collector/__init__.py index 0cac4320..8a297423 100644 --- a/sos/collector/__init__.py +++ b/sos/collector/__init__.py @@ -667,6 +667,12 @@ class SoSCollector(SoSComponent): msg = ('Cluster type could not be determined and no nodes provided' '\nAborting...') self.exit(msg, 1) + elif self.cluster is None and self.opts.nodes: + self.log_info("Cluster type could not be determined, but --nodes " + "is provided. Attempting to continue using JBON " + "cluster type and the node list") + self.cluster = self.clusters['jbon'] + self.cluster_type = 'none' if self.cluster: self.master.cluster = self.cluster self.cluster.setup() |