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

Don't log debug messages during close #52012

Merged
merged 1 commit into from
Mar 7, 2019

Conversation

cachedout
Copy link
Contributor

@cachedout cachedout commented Mar 6, 2019

This can hit race conditions where we might not have a fully functional logger.

Prevents a stacktrace that looks like:

Exception ignored in: <bound method RemoteClient.__del__ of <salt.fileclient.RemoteClient object at 0x7f5e98add2b0>>
Traceback (most recent call last):
  File "/opt/behavox/.local/lib/python3.6/site-packages/salt/fileclient.py", line 1026, in __del__
  File "/opt/behavox/.local/lib/python3.6/site-packages/salt/fileclient.py", line 1033, in destroy
  File "/opt/behavox/.local/lib/python3.6/site-packages/salt/utils/asynchronous.py", line 62, in wrap
  File "/opt/behavox/.local/lib/python3.6/site-packages/salt/transport/zeromq.py", line 227, in close
  File "/usr/lib64/python3.6/logging/__init__.py", line 1295, in debug
  File "/opt/behavox/.local/lib/python3.6/site-packages/salt/log/setup.py", line 343, in _log
  File "/usr/lib64/python3.6/logging/__init__.py", line 1442, in _log
  File "/opt/behavox/.local/lib/python3.6/site-packages/salt/log/setup.py", line 363, in makeRecord
NameError: name '__salt_system_encoding__' is not defined

Credit to @Oloremo for finding this. :)

This can hit race conditions where we might not have a fully functional
logger.
@cachedout
Copy link
Contributor Author

This will need to be backported too.

@dwoz dwoz merged commit 522c7a1 into saltstack:develop Mar 7, 2019
@Ch3LL Ch3LL added the bugfix-bckport will be be back-ported to an older release branch by creating a PR against that branch label Mar 7, 2019
@Ch3LL Ch3LL added ZZZ[Done]-back-ported-bf RETIRED The pull request has been back-ported to an older branch. and removed bugfix-bckport will be be back-ported to an older release branch by creating a PR against that branch labels Mar 7, 2019
Ch3LL added a commit that referenced this pull request Mar 8, 2019
@Oloremo
Copy link
Contributor

Oloremo commented Sep 16, 2019

This fix looks trivial enough to be ported to 2019.2.1, could you please do this?

@Oloremo
Copy link
Contributor

Oloremo commented Sep 16, 2019

Sorry for the noise, looks like it's been already ported.

@Ch3LL
Copy link
Contributor

Ch3LL commented Sep 18, 2019

yep it will be in 2019.2.1 as you can see here: https://github.com/saltstack/salt/blob/v2019.2.1/salt/transport/zeromq.py#L236

@dawidmalina
Copy link

I have quite similar issue and unfortunately this fix will not address this:

Exception ignored in: <bound method AsyncZeroMQReqChannel.__del__ of <salt.transport.zeromq.AsyncZeroMQReqChannel object at 0x7f8717e2c5f8>>
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/salt/transport/zeromq.py", line 249, in __del__
  File "/usr/lib/python3/dist-packages/salt/transport/zeromq.py", line 227, in close
  File "/usr/lib/python3.6/logging/__init__.py", line 1296, in debug
  File "/usr/lib/python3/dist-packages/salt/log/setup.py", line 343, in _log
  File "/usr/lib/python3.6/logging/__init__.py", line 1443, in _log
  File "/usr/lib/python3/dist-packages/salt/log/setup.py", line 363, in makeRecord
NameError: name '__salt_system_encoding__' is not defined

@Ch3LL
Copy link
Contributor

Ch3LL commented Dec 3, 2019

@dawidmalina would you mind opening up an issue with details of when you are running into this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ZZZ[Done]-back-ported-bf RETIRED The pull request has been back-ported to an older branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants