Skip to content

Manage ICP ports using a Runner#2365

Open
yadij wants to merge 1 commit intosquid-cache:masterfrom
yadij:arc-runner-3
Open

Manage ICP ports using a Runner#2365
yadij wants to merge 1 commit intosquid-cache:masterfrom
yadij:arc-runner-3

Conversation

@yadij
Copy link
Contributor

@yadij yadij commented Jan 31, 2026

No description provided.

@rousskov rousskov self-requested a review February 1, 2026 03:56
@rousskov rousskov added the S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box label Feb 1, 2026
Copy link
Contributor

@rousskov rousskov left a comment

Choose a reason for hiding this comment

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

I plan to come back to this PR after the backlog is cleared.


/// \ingroup ServerProtocolICPAPI
void icpClosePorts(void);
/// Perform a graceful shutdown of ICP listening and sending ports (if any)
Copy link
Contributor

Choose a reason for hiding this comment

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

It is not clear to me what "graceful shutdown" implies in this context. Moreover, I do not think this function actually shuts down any ports -- the ports may continue to be open after this function returns. If fixing existing icpClosePorts() problems is outside this PR scope, then I recommend not adding any description of this problematic function in this PR.

* to that specific interface. During shutdown, we must
* disable reading on the outgoing socket.
*/
assert(Comm::IsConnOpen(icpOutgoingConn));
Copy link
Contributor

Choose a reason for hiding this comment

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

AFAICT, the removed assert checked an invariant that this function still uses. The assert did not check everything it should have checked, but do we have to remove it in this PR?

void useConfig() override { icpOpenPorts(); }
void startReconfigure() override { icpClosePorts(); }
void syncConfig() override { icpOpenPorts(); }
void startShutdown() override { icpClosePorts(); }
Copy link
Contributor

Choose a reason for hiding this comment

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

Prior to this PR, SignalEngine::doShutdown() called icpConnectionShutdown() (via serverConnectionsClose()) but did not call icpClosePorts().

AFAICT, this PR changes the timing of Stop sending ICP from... event (i.e. icpOutgoingConn reset) during Squid shutdown. Resetting icpOutgoingConn at startShutdown() time makes it more difficult for still-active transactions to finish successfully during shutdown_lifetime. I do not think we should Stop sending ICP from... so early.

This alleged timing change was not disclosed in the PR description.

@rousskov rousskov removed the S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box label Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants