Skip to content

[Bug]: Residual shutdown-time ERROR log sites after #70733 — audit salt/master.py, salt/minion.py, salt/transport/, salt/cluster/consensus/ #70736

Closed

Description

@dwoz

Description

Follow-up to #70730 / PR #70733 (commit 7128c04a406).

That PR fixed four shutdown-time ERROR / CRITICAL sites that fired during cluster SIGTERM or docker compose down:

  • SaltPeer._send — peer-unreachable traceback flood
  • SaltPeer._publish — cached-client reuse after send failure
  • PubServer.close — Task was destroyed but it is pending!
  • ZeroMQSocketMonitor.stop — ditto

Gamma explicitly deferred the broader audit (see PR body: "Shutdown-only ERROR audit: no other shutdown-only CRITICAL/ERROR signatures surfaced by a git grep scan within salt/cluster/consensus/ and salt/transport/; deferred any additional discovery to follow-up.").

A targeted audit across salt/master.py, salt/minion.py, salt/transport/ (recursive), and salt/cluster/consensus/ (recursive) turns up six additional log sites that fire at ERROR/CRITICAL during expected shutdown paths and match the same "expected unreachable peer / closed stream / cancelled future" pattern:

# Path Signature
1 salt/cluster/consensus/peer.py:377 RaftDispatcher._reply logs traceback when replying to a departing peer (same pattern as SaltPeer._send)
2 salt/transport/tcp.py:740 RequestServer.close log.exception for EBADF (errno 9) — fd already closed under us at shutdown
3 salt/transport/zeromq.py:855 RequestServer.close log.error("IOLoop closed when trying to cancel task") — loop already torn down
4 salt/transport/zeromq.py:1702-1707 ZeroMQSocketMonitor.consume ERROR on ENOTSOCK/ETERM — socket/context already closed
5 salt/transport/zeromq.py:1602 log.error("Master is unavailable (Connection Cancelled).") on CancelledError — log.trace already covers it
6 salt/transport/tcp.py:1274, 3124 log.error("Exception parsing response") fires even when _closing/_closed is already set

Setup

  • 3008.x
  • Salt version: head-of-branch 2026-11-07 (96d84d172d6)
  • Transport: zmq/tcp (both affected)

Steps to reproduce

  1. Bring up a multi-master cluster (see tests/monitoring/cluster-5node/)
  2. docker compose down
  3. Observe master logs for shutdown ERROR floods — notably RaftDispatcher: failed to send …, IOLoop closed when trying to cancel task, ZmqMonitor, …, Master is unavailable (Connection Cancelled)., Exception parsing response

Expected behavior

Expected shutdown signatures are DEBUG. Only unexpected failures log at ERROR.

Actual behavior

Up to hundreds of ERROR lines per master during a clean shutdown, obscuring real errors.

Versions report

3008.x head (96d84d172d6)

Activity

  1. added
    bug
    test:full
    on Nov 7, 2026
  2. added this to the Argon v3008.7 milestone on Nov 7, 2026
  3. added a commit that references this issue on Nov 10, 2026
    a40f817
  4. dwoz commented on Nov 10, 2026

    @dwoz
    ContributorAuthor

    Resolved by #70756 (merge commit a40f817 on 3008.x).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtest:full

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions