[AI Generated] BugFix: support nfs-server.service unit name on SLES 16#4488
Conversation
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.
There was a problem hiding this comment.
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 probesnfs-serverfirst, then falls back tonfsserver. - Replace hard-coded
"nfsserver"increate_shared_dir,is_running,stop, and_check_existswith the helper.
✅ AI Test Selection — PASSED2 test case(s) selected (view run) Marketplace image: suse sles-15-sp6 gen2 latest
Test case details
|
|
Validation: PASSED.
Log shows |
|
Regression validation: PASSED on Redhat (no regression).
Redhat branch still uses |
Problem
On SLES 16,
perf_storage_over_nfs_sriov_tcp_4k(and any other test usingNFSServer) fails at the configure step with:Root cause: SLES 16 ships the upstream
nfs-utilssystemd unit (nfs-server.service) and no longer provides the legacy SUSEnfsserver.servicealias.lisa/tools/nfs_server.pyhard-codesnfsserveron theSusebranch, sosystemctl restart nfsserverreturns exit code 5 (Unit not found).Note:
_check_exists()already usednfs-serverfor Suse, butcreate_shared_dir,is_runningandstopstill usednfsserver— inconsistent.Fix
Add
_get_suse_service_name()which probesnfs-serverfirst, then falls back to legacynfsserverviaService.check_service_exists(). All four Suse branches now use the helper, so:nfsservernfs-serverValidation
suse sles-16-0-x86-64 gen1 2026.02.05/Standard_DS3_v2— caseperf_storage_over_nfs_sriov_tcp_4k. passedRelated