mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 01:30:20 +00:00
Disable FQDNs grains on macOS by default
This commit is contained in:
parent
f70bb96fb3
commit
f9737ea019
4 changed files with 10 additions and 2 deletions
1
changelog/62168.changed
Normal file
1
changelog/62168.changed
Normal file
|
@ -0,0 +1 @@
|
|||
Disabled FQDNs grains on macOS by default
|
|
@ -65,6 +65,12 @@ elif salt.utils.platform.is_proxy():
|
|||
_DFLT_FQDNS_GRAINS = False
|
||||
_MASTER_TRIES = 1
|
||||
_MASTER_USER = salt.utils.user.get_user()
|
||||
elif salt.utils.platform.is_darwin():
|
||||
_DFLT_IPC_MODE = "ipc"
|
||||
# fqdn resolution can be very slow on macOS, see issue #62168
|
||||
_DFLT_FQDNS_GRAINS = False
|
||||
_MASTER_TRIES = 1
|
||||
_MASTER_USER = salt.utils.user.get_user()
|
||||
else:
|
||||
_DFLT_IPC_MODE = "ipc"
|
||||
_DFLT_FQDNS_GRAINS = False
|
||||
|
|
|
@ -2806,6 +2806,7 @@ def fqdns():
|
|||
or salt.utils.platform.is_sunos()
|
||||
or salt.utils.platform.is_aix()
|
||||
or salt.utils.platform.is_junos()
|
||||
or salt.utils.platform.is_darwin()
|
||||
else True,
|
||||
):
|
||||
opt = __salt__["network.fqdns"]()
|
||||
|
|
|
@ -2144,8 +2144,8 @@ def test_enable_fqdns_without_patching():
|
|||
"salt.grains.core.__salt__",
|
||||
{"network.fqdns": MagicMock(return_value="my.fake.domain")},
|
||||
):
|
||||
# fqdns is disabled by default on Windows
|
||||
if salt.utils.platform.is_windows():
|
||||
# fqdns is disabled by default on Windows and macOS
|
||||
if salt.utils.platform.is_windows() or salt.utils.platform.is_darwin():
|
||||
assert core.fqdns() == {"fqdns": []}
|
||||
else:
|
||||
assert core.fqdns() == "my.fake.domain"
|
||||
|
|
Loading…
Add table
Reference in a new issue