Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openshift] Capture ls long listing for /mnt #3910

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions sos/report/plugins/openshift_lso.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# openshift_lso.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this top header line, please

# Copyright (C) 2007-2025 Red Hat, Inc., Jon Magrini <[email protected]>

# This file is part of the sos project: https://github.com/sosreport/sos
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# version 2 of the GNU General Public License.
#
# See the LICENSE file in the source distribution for further information.

from sos.report.plugins import (Plugin, RedHatPlugin)

class OpenshiftLSO(Plugin, RedHatPlugin):
"""
This plugin is used to collect Openshift LSO details. This expands
the ceph_osd plugin since storage nodes by default are not setup for
ceph access. When gathering data from an OpenShift node when LSO is in use,
we currently do not collect the symlink data location for LSO,
which is always under /mnt (basically two layers lower,
but the names can change). This is useful in determining if LSO
is setup correctly when also having a must-gather output.
Many times the LSO directory has pointers to paths instead of devices.
This can cause issues with lost access to the OCP backend storage
used by OpenShift.
"""

short_desc = 'Openshift LSO'

plugin_name = "openshift_lso"
profiles = ('storage', 'openshift', 'ceph')
# Each node runs the ceph-osd daemon,
# which interacts with logical disks attached to the node.
files = '/run/ceph/**/ceph-osd*'

def setup(self):
self.add_cmd_output([
'ls -lanR /mnt'
])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a standardized wrapper for dir listings so that stuff those types of collections are consistent across plugins - add_dir_listing(path).