Skip to content

Commit

Permalink
test: Disable setroubleshootd for testAddDiskNFS
Browse files Browse the repository at this point in the history
NFS produces dozens of permissive=1 SELinux issues; setroubleshoot runs
massively parallel on them, and eats up too much RAM and I/O.
Avoid this by disabling setroubleshootd for this test.
  • Loading branch information
martinpitt committed Nov 15, 2024
1 parent 7751b94 commit c04152b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/check-machines-disks
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,12 @@ class TestMachinesDisks(machineslib.VirtualMachinesCase):

m.execute("if selinuxenabled 2>/dev/null; then setsebool -P virt_use_nfs 1; fi")

# HACK: NFS produces dozens of permissive=1 SELinux issues; setroubleshoot runs massively parallel
# on them, and eats up too much RAM and I/O
if m.execute("systemctl list-unit-files --no-legend setroubleshootd.service", check=False).strip():
m.execute("systemctl mask --runtime setroubleshootd")
self.addCleanup(m.execute, "systemctl unmask setroubleshootd")

# Prepare a local NFS pool
self.restore_file("/etc/exports")
nfs_pool = os.path.join(self.vm_tmpdir, "nfs_pool")
Expand Down

0 comments on commit c04152b

Please sign in to comment.