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

Add new section fstype section under hardware devices. #3538

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

lherbolt
Copy link
Contributor

@lherbolt lherbolt commented Feb 27, 2024

As discussed in the #3502 adding new section under _get_hardware_devices(). Please review it.

Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname [email protected]?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?

Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/sosreport-sos-3538
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

1 similar comment
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/sosreport-sos-3538
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

Copy link
Member

@jcastill jcastill left a comment

Choose a reason for hiding this comment

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

lgtm
just tested it as well and no issues with lots of fs and empty first FSTYPE, nicely dealt with

sos/report/__init__.py Outdated Show resolved Hide resolved
sos/report/__init__.py Outdated Show resolved Hide resolved
@pmoravec
Copy link
Contributor

In general, I am not against maintaining centrally a next type of devices. Keeping a dict per fstype - I dont see much use case for the "per FS type" in particular (which does not mean there is a legitimate use case for it).

@lherbolt
Copy link
Contributor Author

In general, I am not against maintaining centrally a next type of devices. Keeping a dict per fstype - I dont see much use case for the "per FS type" in particular (which does not mean there is a legitimate use case for it).

The fstype will not just enumerate the fstypes but also linux_raid_member or LVM2_member. The complete list can be obtained from blkid -k, not only the filesystems plugins could use this, but the md and lvm plugin as well and probably some others too. The fstype might be bit misleading but I kept the name to match the lsblk output.

@lherbolt lherbolt force-pushed the lhe-storage-by-fstype branch 2 times, most recently from 1705350 to 3ad9af4 Compare February 29, 2024 13:02
Copy link
Contributor

@pmoravec pmoravec left a comment

Choose a reason for hiding this comment

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

ACK, then. Thanks for explaining,

Not sure with the device key name (fstype) as I got confused by it, but if there wont be an objection from anybody else or no better name, I am OK with it.

Copy link
Member

@TurboTurtle TurboTurtle left a comment

Choose a reason for hiding this comment

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

Minor comments, code overall looks good.

sos/report/__init__.py Show resolved Hide resolved
Comment on lines 693 to 694
if "ext" in helper[0]:
helper[0] = 'ext2/3/4'
Copy link
Member

Choose a reason for hiding this comment

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

Can we not be more specific here? If not, I think we should just put ext rather than slashed version possibilities.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ACK will change it to ext there is no conflict with other blkid types

blkid -k | grep ext
xfs_external_log
ext4dev
ext4
ext3
ext2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Left it as ext4

Add new section fstype section under hardware devices which lists
devices by filesystem, based on lsbl -nrpo output. Devices with no
filesystem are placed into unknown section and Ext2/3/4 are put into
section called ext4.

Signed-off-by: Lukas Herbolt <[email protected]>
@TurboTurtle TurboTurtle merged commit 8cec607 into sosreport:main Mar 6, 2024
35 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants