salt icon indicating copy to clipboard operation
salt copied to clipboard

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

Open amalaguti opened this issue 1 year ago • 2 comments

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.

amalaguti avatar Apr 15 '24 21:04 amalaguti

@amalaguti Please test this against 3006.8

dwoz avatar May 01 '24 22:05 dwoz

@dwoz I tried this one with a 3006.8 but could not see any message related to the ping function. https://github.com/saltstack/salt/blob/v3006.8/salt/minion.py#L3163C33-L3170C1 here it says that service.restart requires an init system. Does it mean it is not intended for Windows maybe ?

amalaguti avatar May 10 '24 03:05 amalaguti