View Issue Details

IDProjectCategoryView StatusLast Update
0007757Rocky-Linux-9systemdpublic2024-08-29 14:05
ReporterAndrew K Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platformx64OSRocky LinuxOS Version9.4
Summary0007757: NFS reexport causes systemd ordering cycle
DescriptionAdding an NFS mount to /etc/fstab and then re-exporting it via /etc/exports causes an ordering cycle in systemd where both the mount and nfs-server think they depend on each other.

Instead, nfs-server should depend on the mount, and not the other way around.
Steps To ReproduceAdd to /etc/fstab:

server:/export /reexport nfs ro,vers=3,proto=tcp 0 0

Add to /etc/exports:

/reexport 127.0.0.1/32(ro,no_root_squash,insecure,fsid=5f6e56bd-ac3d-4031-b516-e2a658f3fc98)

Reload systemd:

systemd daemon-reload

View the circular dependency:

systemd-analyze dot reexport.mount
digraph systemd {
        "reexport.mount"->"nfs-server.service" [color="green"]; ########## The mount is depending on nfs-server, which it shouldn't
        "reexport.mount"->"systemd-journald.socket" [color="green"];
        "reexport.mount"->"-.mount" [color="green"];
        "reexport.mount"->"network-online.target" [color="green"];
        "reexport.mount"->"remote-fs-pre.target" [color="green"];
        "reexport.mount"->"network.target" [color="green"];
        "reexport.mount"->"system.slice" [color="green"];
        "reexport.mount"->"system.slice" [color="black"];
        "reexport.mount"->"-.mount" [color="black"];
        "reexport.mount"->"network-online.target" [color="grey66"];
        "reexport.mount"->"umount.target" [color="red"];
        "nfs-server.service"->"reexport.mount" [color="green"]; ####### nfs-server is depending on the mount, which is correct
        "nfs-server.service"->"reexport.mount" [color="black"];
        "umount.target"->"reexport.mount" [color="green"];
        "remote-fs.target"->"reexport.mount" [color="green"];
        "remote-fs.target"->"reexport.mount" [color="black"];
}

Reboot, and see that nfs-server has failed with:

reexport.mount: Found ordering cycle on nfs-server.service/start
reexport.mount: Found dependency on mnt-software_reexport.mount/start
reexport.mount: Job nfs-server.service/start deleted to break ordering cycle starting with reexport.mount/start
Tagsnfs, systemd

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2024-08-29 14:05 Andrew K New Issue
2024-08-29 14:05 Andrew K Tag Attached: nfs
2024-08-29 14:05 Andrew K Tag Attached: systemd