Files
troubleshoot/internal
Ricardo Maraschini 7ed2f4bff2 feat: Handle failure to load cluster specs gracefully in support-bundle command (#1660)
* feat: Handle failure to load cluster specs gracefully in support-bundle command

In some scenarios, we don't want to fail when unable to load specs from
the cluster. This is particularly useful when:

- A host support bundle is available on disk.
- There are specs defined in the cluster.
- The cluster is malfunctioning or inaccessible.
- We still need to generate a support bundle using only the host specs.
- This change allows users to generate a support bundle even if the
  embedded cluster is not functioning properly, making the process more
  resilient.

The primary motivation is to introduce a new command:

```
./embedded-cluster support-bundle
```

When executed, this command attempts to collect both host and cluster
specs. However, if the embedded cluster is broken or unavailable, the
command will skip loading the cluster specs and focus on the host,
ensuring that users can still gather critical information without
interruption.

* chore: use fmt printf instead of klog

* Update internal/specs/specs.go

Co-authored-by: Evans Mungai <evans@replicated.com>

---------

Co-authored-by: Evans Mungai <evans@replicated.com>
2024-10-23 11:43:56 +01:00
..