Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3007.x] transport: tcp check that pull_path exists before chmod #66931

Open
wants to merge 2 commits into
base: 3007.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/66931.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
transports.tcp: ensure pull path is being used before attempting chmod.
The fix prevents an unnecessary traceback when the TCP transport is
not using unix sockets. No functionaly has changed as the traceback
occurs when an async task was about to exit anyway.
3 changes: 2 additions & 1 deletion salt/transport/tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,8 @@ async def publisher(
# Securely create socket
with salt.utils.files.set_umask(0o177):
self.pull_sock.start()
os.chmod(self.pull_path, self.pull_path_perms)
if self.pull_path:
os.chmod(self.pull_path, self.pull_path_perms)

def pre_fork(self, process_manager):
"""
Expand Down
Loading