[BUG] logs output different master address than what is actually being used
Description
When using file_client: local salt ignores the master: parameter and connects to 127.0.0.1. I don't know whether this is right or wrong, but the problem is, the logs output the master: address instead of 127.0.0.1, which is misleading.
[salt.minion :1141][ERROR ][2948] Error while bringing up minion for multi-master. Is master at 172.18.0.6 responding?
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.
- [x] container - Docker
- [x] onedir packaging
- [x] used cloudinit to install
Steps to Reproduce the behavior
- Configure minion with this config:
---
master: 172.18.0.6
file_client: local
...
- Observe debug logs.
Expected behavior Error log prints the ACTUAL address that salt-minion is attempting to connect to.
Screenshots
2023-08-10 03:22:06,571 [salt.minion :1286][INFO ][2948] Creating minion process manager
2023-08-10 03:22:06,571 [salt.utils.process:608 ][DEBUG ][2948] Process Manager starting!
2023-08-10 03:22:06,571 [salt.utils.process:608 ][DEBUG ][2948] Process Manager starting!
2023-08-10 03:22:06,578 [salt.minion :792 ][DEBUG ][2948] Connecting to master. Attempt 1 of 1
2023-08-10 03:22:06,579 [salt.minion :232 ][DEBUG ][2948] Master URI: tcp://127.0.0.1:4506
-----------------------------------------------------------------------------------^^^^^^^^^----- =(
2023-08-10 03:22:06,579 [salt.crypt :506 ][DEBUG ][2948] Initializing new AsyncAuth for ('/etc/salt/pki/minion', '56d32a6e4ec6', 'tcp://127.0.0.1:4506')
2023-08-10 03:22:06,581 [salt.transport.zeromq:156 ][DEBUG ][2948] Generated random reconnect delay between '1000ms' and '11000ms' (9921)
2023-08-10 03:22:06,581 [salt.transport.zeromq:163 ][DEBUG ][2948] Setting zmq_reconnect_ivl to '9921ms'
2023-08-10 03:22:06,582 [salt.transport.zeromq:167 ][DEBUG ][2948] Setting zmq_reconnect_ivl_max to '11000ms'
2023-08-10 03:22:06,582 [salt.crypt :208 ][DEBUG ][2948] salt.crypt.get_rsa_key: Loading private key
2023-08-10 03:22:06,582 [salt.crypt :188 ][DEBUG ][2948] salt.crypt._get_key_with_evict: Loading private key
2023-08-10 03:22:06,612 [salt.crypt :900 ][DEBUG ][2948] Loaded minion key: /etc/salt/pki/minion/minion.pem
2023-08-10 03:22:06,618 [salt.utils.event :315 ][DEBUG ][2948] SaltEvent PUB socket URI: /var/run/salt/minion/minion_event_a014286e47_pub.ipc
2023-08-10 03:22:06,618 [salt.utils.event :316 ][DEBUG ][2948] SaltEvent PULL socket URI: /var/run/salt/minion/minion_event_a014286e47_pull.ipc
2023-08-10 03:22:06,618 [salt.crypt :216 ][DEBUG ][2948] salt.crypt.get_rsa_pub_key: Loading public key
2023-08-10 03:22:41,686 [salt.channel.client:313 ][DEBUG ][2948] Closing AsyncReqChannel instance
2023-08-10 03:22:41,721 [salt.minion :1141][ERROR ][2948] Error while bringing up minion for multi-master. Is master at 172.18.0.6 responding?
Versions Report
salt-minion --versions
root@6737acfb7358:/# salt-minion --versions Salt Version: Salt: 3006.1
Python Version: Python: 3.10.11 (main, May 5 2023, 02:36:14) [GCC 11.2.0]
Dependency Versions: cffi: 1.14.6 cherrypy: 18.6.1 dateutil: 2.8.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 3.1.2 libgit2: Not Installed looseversion: 1.0.2 M2Crypto: Not Installed Mako: Not Installed msgpack: 1.0.2 msgpack-pure: Not Installed mysql-python: Not Installed packaging: 22.0 pycparser: 2.21 pycrypto: Not Installed pycryptodome: 3.9.8 pygit2: Not Installed python-gnupg: 0.4.8 PyYAML: 5.4.1 PyZMQ: 23.2.0 relenv: 0.12.3 smmap: Not Installed timelib: 0.2.4 Tornado: 4.5.3 ZMQ: 4.3.4
System Versions: dist: ubuntu 22.04.2 jammy locale: utf-8 machine: aarch64 release: 5.15.49-linuxkit-pr system: Linux version: Ubuntu 22.04.2 jammy
Additional context Add any other context about the problem here.
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
- Community Wiki
- Salt’s Contributor Guide
- Join our Community Slack
- IRC on LiberaChat
- Salt Project YouTube channel
- Salt Project Twitch channel
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!
Hi @jamest-pin, thanks for the report.
This is due to the minion still trying to connect to the master that is configured. Setting master_type: disable will stop the tracebacks and error messages you are seeing - this stops it from attempting to connect to the configured master.
Thanks for the tip. In my case, I did not want to disable the master.
On Fri, 18 Aug 2023, 12:27 am Caleb Beard, @.***> wrote:
Hi @jamest-pin https://github.com/jamest-pin, thanks for the report.
This is due to the minion still trying to connect to the master that is configured. Setting master_type: disable will stop the tracebacks and error messages you are seeing - this stops it from attempting to connect to the configured master.
— Reply to this email directly, view it on GitHub https://github.com/saltstack/salt/issues/64952#issuecomment-1682598590, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBBZEPSPO4PUBB5AAD4DM5TXVZA73ANCNFSM6AAAAAA3K4IIOE . You are receiving this because you were mentioned.Message ID: @.***>
Thanks for the tip. In my case, I did not want to disable the master.
In this case, I believe the logs you are seeing are expected behavior then. It is still trying to connect to the configured master.
Hi Caleb,
Thanks but please look at the logs again. The configured master is 172.
something (I'm replying by email so cannot remember), but the minion is
actually trying to connect to local host 127.0.0.1. this is seen in the
debug logs.
The error log then prints out the configured master address, which is not
what it was actually using to connect. This is a bug. The minion should
either a) properly try to connect to the configured master and not
127.0.0.1, OR b) properly print out 127.0.0.1 in the error message (so that
the operator can see the configured master: address is being ignored.
Thanks in advance James
On Fri, 18 Aug 2023, 1:43 am Caleb Beard, @.***> wrote:
Thanks for the tip. In my case, I did not want to disable the master.
In this case, I believe the logs you are seeing are expected behavior then. It is still trying to connect to the configured master.
— Reply to this email directly, view it on GitHub https://github.com/saltstack/salt/issues/64952#issuecomment-1682707899, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBBZEPQ6XO6CXJKRFVNLR7TXVZJ3XANCNFSM6AAAAAA3K4IIOE . You are receiving this because you were mentioned.Message ID: @.***>
Linking https://github.com/saltstack/salt/issues/57866 because it is related.