Skip to content

Commit

Permalink
[microshift] Add initial support for backup info
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Acevedo Montserrat <[email protected]>
  • Loading branch information
pacevedom committed Jul 4, 2023
1 parent fc1489a commit d883ba0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions sos/report/plugins/microshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from sos.report.plugins import Plugin, RedHatPlugin, PluginOpt
import re
import os


class Microshift(Plugin, RedHatPlugin):
Expand All @@ -26,7 +27,7 @@ class Microshift(Plugin, RedHatPlugin):
short_desc = 'Microshift'
plugin_name = 'microshift'
plugin_timeout = 900
packages = ('microshift', 'microshift-selinux', 'microshift-networking')
packages = ('microshift', 'microshift-selinux', 'microshift-networking', 'microshift-greenboot')
services = (plugin_name,)
profiles = (plugin_name,)
localhost_kubeconfig = '/var/lib/microshift/resources/kubeadmin/kubeconfig'
Expand Down Expand Up @@ -146,7 +147,13 @@ def setup(self):
Output format for this function is based on `oc adm inspect` command,
which is used to retrieve all API resources from the cluster.
"""
self.add_forbidden_path('/var/lib/microshift')
self.add_service_status('greenboot-healthcheck')
self.add_journal('greenboot-healthcheck')

if os.path.exists('/var/lib/microshift-backups'):
self.add_copy_spec(['/var/lib/microshift/version',
'/var/lib/microshift-backups/health.json'])

self.add_cmd_output([
'microshift version',
'microshift show-config -m effective'
Expand Down

0 comments on commit d883ba0

Please sign in to comment.