Page MenuHomeFreeBSD

ctld: Add a dedicated conf method for shutting down
ClosedPublic

Authored by jhb on Apr 20 2026, 4:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 13, 1:59 AM
Unknown Object (File)
Thu, Jun 4, 4:12 AM
Unknown Object (File)
Mon, May 25, 7:04 AM
Unknown Object (File)
May 15 2026, 4:45 AM
Unknown Object (File)
May 14 2026, 1:15 PM
Unknown Object (File)
May 14 2026, 1:14 PM
Unknown Object (File)
May 13 2026, 4:27 PM
Unknown Object (File)
May 12 2026, 2:14 AM
Subscribers

Details

Summary

Currently the main loop creates an empty config and applies it to
force a shutdown of all of the existing configuration. While this is
functional and does avoid duplicating some code, it is also a bit
clunky and requires a special hack in the pidfile path handling
in the conf::apply method.

Instead, use a dedicated conf::shutdown method which tears down the
CTL ports and LUNs and closes the sockets.

Sponsored by: Chelsio Communications

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Apr 20 2026, 4:57 PM
usr.sbin/ctld/ctld.cc
2805

Even non-iSCSI "physical" ports are taken off line, so this log message could maybe just say "CTL ports"?

jhb added inline comments.
usr.sbin/ctld/ctld.cc
2218

Given that these are the second and third actions, maybe I should just remove the 'First' and 'Second' bits in these comments (which were copied from conf::apply above where they are also somewhat misnumbered)

This revision was not accepted when it landed; it landed in state Needs Review.Mon, May 18, 7:51 PM
This revision was automatically updated to reflect the committed changes.