[BUG] On Windows minion, status.master used by master_alive polling does not work when default language is not en_US #60508
Labels
Bug
broken, incorrect, or confusing behavior
severity-medium
3rd level, incorrect or bad functionality, confusing and lacks a work around
Windows
Milestone
Description
We have our masters setup in multimaster mode with failover. Windows minions have master_alive_interval set to 60 seconds to detect failed masters. The master_alive pooling calls the status.master module to determine if the minion is connected to the master.
The status.master method calls Windows netstat to check for connections to the master with the "ESTABLISHED" state, but when the default language is not en_US, Windows translates "ESTABLISHED" into the local language. In our case, we have multiple Windows minions with de_DE set as the system default language.
The code in question:
salt/salt/modules/win_status.py
Line 542 in 527b0c1
Output of netstat with de_DE default language:
The net effect is that the master_alive polling thinks that the minion is not connected to the master and re-connects. We also have configured an orchestration to trigger the highstate on minion start event. Thus these systems will run a highstate every minute 24hrs per day due to status.master not working correctly
Setup
Relevant configs in minion.conf
Steps to Reproduce the behavior
Expected behavior
status.master should work correctly no matter what your default language is set to. Instead of status.master shelling out to run netstat, the same information is available from psutils and it's return data is not changed based on locale/language settings.
Versions Report
salt --versions-report
Our minions and masters running 3002.6
Additional context
Workaround: Instead of highstating every 60 seconds (master_alive_interval) we set the master_alive_interval to 12 hours on systems where the grain locale_info.defaultlanguage is not en_US.
The text was updated successfully, but these errors were encountered: