saltstack / saltstack/salt

[BUG] No message "Connecting to master" with ping_interval: 1 and auth_safemode: True

Open
#66,368 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage pending-discussion
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
On a Windows minion 3006.1 with the following settings

ping_interval: 1
auth_safemode: True
master: 
  - 172.21.0.10
  - 172.21.0.11

The minion log does not show the connection attempts to the master, when a master is not reachable the minion log shows the following

2024-04-15 21:06:02,059 [salt.channel.client                                                      :32  ][TRACE   ][2064] Failed to send msg SaltReqTimeoutError('Message timed out')
2024-04-15 21:06:02,059 [salt.crypt                                                               :764 ][WARNING ][2064] SaltReqTimeoutError: Message timed out
2024-04-15 21:06:02,059 [salt.crypt                                                               :675 ][INFO    ][2064] Waiting 10 seconds before retry.
2024-04-15 21:06:12,070 [salt.crypt                                                               :216 ][DEBUG   ][2064] salt.crypt.get_rsa_pub_key: Loading public key

The same minion without ping_interval and auth_safemode behaves this way:

2024-04-15 21:05:34,399 [salt.channel.client                                                      :32  ][TRACE   ][4608] Failed to send msg SaltReqTimeoutError('Message timed out')
2024-04-15 21:05:34,399 [salt.channel.client                                                      :313 ][DEBUG   ][4608] Closing AsyncReqChannel instance
2024-04-15 21:05:44,417 [salt.minion                                                              :794 ][DEBUG   ][4608] Connecting to master. Attempt 3 (infinite attempts)
2024-04-15 21:05:45,448 [salt.minion                                                              :232 ][DEBUG   ][4608] Master URI: tcp://172.21.0.10:4506
2024-04-15 21:05:45,448 [salt.crypt                                                               :514 ][DEBUG   ][4608] Re-using AsyncAuth for ('C:\\ProgramData\\Salt Project\\Salt\\conf\\pki\\minion', 'minion-win-1', 'tcp://172.21.0.10:4506')

Wondering it is just cosmetic, or an indication of something wrong going on

Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)

Please be as specific as possible and give set-up details.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Kubernetes, Docker, containerd, etc. please specify)
  • or a combination, please be explicit
  • jails if it is FreeBSD
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior
(Include debug logs if possible and relevant)

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
PASTE HERE

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Windows minion behavior with ping_interval: 1 and auth_safemode: True, then compare its logs with the configuration that reports "Connecting to master." Start by tracing the referenced salt.channel.client, salt.crypt, and salt.minion log entries. Done means establishing whether the missing message reflects a functional problem or is cosmetic, with the relevant behavior covered by a confirmed fix or clear documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
infrastructure, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.