Added new sosreport plugin
New sos report plugin added as separate RPM Signed-off-by: Stephen Simpson <ssimpson89@users.noreply.github.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
3b3851c6ca
commit
2852cd5e88
@@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
### Added
|
||||
|
||||
- Support Ubuntu-style dracut initrd images.
|
||||
- New sos plugin in `warewulf-sos` subpackage.
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
1
Makefile
1
Makefile
@@ -234,6 +234,7 @@ install: build docs ## Install Warewulf from source
|
||||
for f in docs/man/man5/*.5.gz; do install -m 0644 $$f $(DESTDIR)$(MANDIR)/man5/; done
|
||||
install -pd -m 0755 $(DESTDIR)$(DRACUTMODDIR)/90wwinit
|
||||
install -m 0644 dracut/modules.d/90wwinit/*.sh $(DESTDIR)$(DRACUTMODDIR)/90wwinit
|
||||
install -D -m 0644 include/sos/warewulf.py $(DESTDIR)$(SOSPLUGINS)/warewulf.py
|
||||
|
||||
.PHONY: installapi
|
||||
installapi:
|
||||
|
||||
@@ -51,6 +51,7 @@ BASHCOMPDIR ?= /etc/bash_completion.d
|
||||
FIREWALLDDIR ?= /usr/lib/firewalld/services
|
||||
LOGROTATEDIR ?= /etc/logrotate.d
|
||||
DRACUTMODDIR ?= /usr/lib/dracut/modules.d
|
||||
SOSPLUGINS ?= /usr/lib/python3.9/site-packages/sos/report/plugins
|
||||
ifeq ($(OS),suse)
|
||||
TFTPDIR ?= /srv/tftpboot
|
||||
endif
|
||||
|
||||
39
include/sos/warewulf.py
Normal file
39
include/sos/warewulf.py
Normal file
@@ -0,0 +1,39 @@
|
||||
from sos.report.plugins import Plugin, IndependentPlugin
|
||||
|
||||
class Warewulf(Plugin, IndependentPlugin):
|
||||
|
||||
short_desc = 'Warewulf provisioning server'
|
||||
|
||||
plugin_name = 'warewulf'
|
||||
services = ('warewulfd')
|
||||
packages = ('warewulf')
|
||||
|
||||
def setup(self):
|
||||
|
||||
self.add_copy_spec([
|
||||
"/var/lib/warewulf/overlays/",
|
||||
"/usr/share/warewulf/overlays/",
|
||||
"/var/log/warewulfd.log",
|
||||
"/etc/warewulf/",
|
||||
"/var/lib/dhcpd/",
|
||||
"/etc/dhcp/",
|
||||
"/etc/dnsmasq.d",
|
||||
"/var/lib/dnsmasq/dnsmasq.leases"
|
||||
])
|
||||
|
||||
self.add_forbidden_path([
|
||||
"/var/lib/warewulf/overlays/wwinit/rootfs/warewulf/wwclient",
|
||||
"/usr/share/warewulf/overlays/wwinit/rootfs/warewulf/wwclient"
|
||||
])
|
||||
|
||||
self.add_cmd_output([
|
||||
"wwctl node list",
|
||||
"wwctl node list -a",
|
||||
"wwctl container list",
|
||||
"wwctl profile list",
|
||||
"wwctl profile list -a",
|
||||
"wwctl image kernels",
|
||||
"wwctl version"
|
||||
])
|
||||
|
||||
self.add_journal(units="warewulfd.service")
|
||||
@@ -2,6 +2,21 @@
|
||||
Troubleshooting
|
||||
===============
|
||||
|
||||
sos
|
||||
===
|
||||
|
||||
The ``warewulf-sos`` package (new in v4.6.1) adds support for gathering Warewulf
|
||||
server configuration information in an sos report.
|
||||
|
||||
.. code-block::
|
||||
|
||||
dnf -y install warewulf-sos
|
||||
sos report # optionally, --enable-plugins=warewulf
|
||||
|
||||
.. note::
|
||||
|
||||
The ``warewulf-sos`` package is not currently built for SUSE.
|
||||
|
||||
warewulfd
|
||||
=========
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ Requires: dhcp
|
||||
BuildRequires: git
|
||||
BuildRequires: make
|
||||
BuildRequires: gpgme-devel
|
||||
BuildRequires: python3-devel
|
||||
%if %{api}
|
||||
BuildRequires: libassuan-devel
|
||||
%endif
|
||||
@@ -79,30 +80,11 @@ BuildRequires: libassuan-devel
|
||||
Recommends: logrotate
|
||||
Recommends: ipmitool
|
||||
|
||||
|
||||
%description
|
||||
Warewulf is a stateless and diskless provisioning
|
||||
system for large clusters of bare metal and/or virtual systems.
|
||||
|
||||
%package dracut
|
||||
Summary: dracut module for loading a Warewulf image
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: dracut
|
||||
%if 0%{?suse_version}
|
||||
%else
|
||||
Requires: dracut-network
|
||||
%endif
|
||||
Requires: curl
|
||||
Requires: cpio
|
||||
Requires: dmidecode
|
||||
|
||||
%description dracut
|
||||
Warewulf is a stateless and diskless provisioning
|
||||
system for large clusters of bare metal and/or virtual systems.
|
||||
|
||||
This subpackage contains a dracut module that can be used to generate
|
||||
an initramfs that can fetch and boot a Warewulf node image from a
|
||||
Warewulf server.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version} -b0 %if %{?with_offline:-a2}
|
||||
@@ -128,6 +110,7 @@ make defaults \
|
||||
WWCLIENTDIR=/warewulf \
|
||||
IPXESOURCE=/usr/share/ipxe \
|
||||
DRACUTMODDIR=/usr/lib/dracut/modules.d \
|
||||
SOSPLUGINS=%{python3_sitelib}/sos/report/plugins \
|
||||
CACHEDIR=%{_localstatedir}/cache
|
||||
make build
|
||||
%if %{api}
|
||||
@@ -231,12 +214,55 @@ getent group %{wwgroup} >/dev/null || groupadd -r %{wwgroup}
|
||||
%endif
|
||||
|
||||
|
||||
%package dracut
|
||||
Summary: dracut module for loading a Warewulf image
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: dracut
|
||||
%if 0%{?suse_version}
|
||||
%else
|
||||
Requires: dracut-network
|
||||
%endif
|
||||
Requires: curl
|
||||
Requires: cpio
|
||||
Requires: dmidecode
|
||||
|
||||
%description dracut
|
||||
Warewulf is a stateless and diskless provisioning system for large clusters of
|
||||
bare metal and/or virtual systems.
|
||||
|
||||
This subpackage contains a dracut module that can be used to generate an
|
||||
initramfs that can fetch and boot a Warewulf node image from a Warewulf server.
|
||||
|
||||
%files dracut
|
||||
%defattr(-, root, root)
|
||||
%{_prefix}/lib/dracut/modules.d/90wwinit
|
||||
|
||||
|
||||
%if 0%{?suse_version} || 0%{?sle_version}
|
||||
%else
|
||||
%package sos
|
||||
Summary: sos plugin for Warewulf
|
||||
BuildArch: noarch
|
||||
Requires: sos
|
||||
|
||||
%description sos
|
||||
Warewulf is a stateless and diskless provisioning system for large clusters of
|
||||
bare metal and/or virtual systems.
|
||||
|
||||
This subpackage contains an sos module that can be used to include information
|
||||
about Warewulf in an sos report.
|
||||
|
||||
%files sos
|
||||
%{python3_sitelib}/sos/report/plugins/warewulf.py
|
||||
%{python3_sitelib}/sos/report/plugins/__pycache__/warewulf.*.pyc
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Feb 20 2025 Stephen Simpson <ssimpson@ciq.com>
|
||||
- Added sos plugin
|
||||
|
||||
* Sat Feb 1 2025 Jonathon Anderson <janderson@ciq.com>
|
||||
- Add Recommends: ipmitool
|
||||
|
||||
|
||||
Reference in New Issue
Block a user