Skip to content

[AI Generated] BugFix: support nfs-server.service unit name on SLES 16#4488

Merged
LiliDeng merged 1 commit into
mainfrom
bugfix/nfs-server-sles16_180526
May 21, 2026
Merged

[AI Generated] BugFix: support nfs-server.service unit name on SLES 16#4488
LiliDeng merged 1 commit into
mainfrom
bugfix/nfs-server-sles16_180526

Conversation

@LiliDeng
Copy link
Copy Markdown
Collaborator

@LiliDeng LiliDeng commented May 18, 2026

Problem

On SLES 16, perf_storage_over_nfs_sriov_tcp_4k (and any other test using NFSServer) fails at the configure step with:

Failed to restart nfsserver.service: Unit nfsserver.service not found.
AssertionError: [Get unexpected exit code on cmd ['sudo', 'sh', '-c', 'systemctl restart nfsserver']] Expected <[0, 0]> to contain item <5>, but did not.

Root cause: SLES 16 ships the upstream nfs-utils systemd unit (nfs-server.service) and no longer provides the legacy SUSE nfsserver.service alias. lisa/tools/nfs_server.py hard-codes nfsserver on the Suse branch, so systemctl restart nfsserver returns exit code 5 (Unit not found).

Note: _check_exists() already used nfs-server for Suse, but create_shared_dir, is_running and stop still used nfsserver — inconsistent.

Fix

Add _get_suse_service_name() which probes nfs-server first, then falls back to legacy nfsserver via Service.check_service_exists(). All four Suse branches now use the helper, so:

  • SLES 12 / 15 → resolves to nfsserver
  • SLES 16+ → resolves to nfs-server

Validation

suse sles-16-0-x86-64 gen1 2026.02.05 / Standard_DS3_v2 — case perf_storage_over_nfs_sriov_tcp_4k. passed

Related

SLES 16 ships the upstream nfs-utils unit (nfs-server.service) and
no longer provides the legacy SUSE nfsserver.service alias. The
Suse branch of NFSServer hard-coded 'nfsserver', causing
'systemctl restart nfsserver' to exit 5 ('Unit nfsserver.service
not found') and storage-over-NFS performance tests to fail at the
configure step.

Probe both service names at runtime and use whichever exists, so
SLES 12/15 ('nfsserver') and SLES 16+ ('nfs-server') both work.
@LiliDeng LiliDeng requested a review from johnsongeorge-w as a code owner May 18, 2026 03:05
Copilot AI review requested due to automatic review settings May 18, 2026 03:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes NFS server tool to support SLES 16, which renamed the systemd unit from nfsserver.service to nfs-server.service. Introduces a helper that probes both names and routes all Suse branches through it, eliminating the prior inconsistency between _check_exists() (already using nfs-server) and the other methods.

Changes:

  • Add _get_suse_service_name() helper that probes nfs-server first, then falls back to nfsserver.
  • Replace hard-coded "nfsserver" in create_shared_dir, is_running, stop, and _check_exists with the helper.

@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

2 test case(s) selected (view run)

Marketplace image: suse sles-15-sp6 gen2 latest

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 1
Total 2
Test case details
Test Case Status Time (s) Message
perf_storage_over_nfs_synthetic_udp_4k (lisa_0_1) ⏭️ SKIPPED 162.351 skipped: NFS server does not support UDP. Server portlist: tcp 2049
tcp 2049
perf_storage_over_nfs_sriov_tcp_4k (lisa_0_0) ✅ PASSED 3024.576

@LiliDeng
Copy link
Copy Markdown
Collaborator Author

Validation: PASSED.

  • Image: suse sles-16-0-x86-64 gen1 2026.02.05
  • VM size: Standard_DS3_v2
  • Test: perf_storage_over_nfs_sriov_tcp_4k
  • Elapsed: 3183.948 sec
  • Result: PASSED

Log shows systemctl restart nfs-server succeeded; NFS share mounted; all 40 fio iterations (4K randread/randwrite/read/write at iodepths 1..1024) completed without error.

@LiliDeng
Copy link
Copy Markdown
Collaborator Author

Regression validation: PASSED on Redhat (no regression).

  • Image: redhat rhel 10_1 10.1.2026022409
  • VM size: Standard_DS3_v2
  • Test: perf_storage_over_nfs_sriov_tcp_4k
  • Elapsed: 2446.025 sec
  • Result: PASSED

Redhat branch still uses nfs-server.service unchanged; helper is Suse-only, so other distros are unaffected.

@LiliDeng LiliDeng merged commit 8132e13 into main May 21, 2026
65 checks passed
@LiliDeng LiliDeng deleted the bugfix/nfs-server-sles16_180526 branch May 21, 2026 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants