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
F169346255: D56532.id.diff
Tue, Sep 1, 6:37 AM
Unknown Object (File)
Sun, Aug 30, 11:11 PM
Unknown Object (File)
Sun, Aug 30, 7:07 PM
Unknown Object (File)
Sun, Aug 30, 8:16 AM
Unknown Object (File)
Sun, Aug 30, 7:50 AM
Unknown Object (File)
Sun, Aug 30, 6:29 AM
Unknown Object (File)
Fri, Aug 28, 11:38 PM
Unknown Object (File)
Fri, Aug 28, 6:27 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.May 18 2026, 7:51 PM
This revision was automatically updated to reflect the committed changes.