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

Fixes 67185: Makes the correct pki_dir available for key_cache #67913

Open
wants to merge 1 commit into
base: 3007.x
Choose a base branch
from

Conversation

piterpunk
Copy link

What does this PR do?

Makes the correct PKI directory available for handle_key_cache function.

What issues does this PR fix or reference?

Fixes #67185

Previous Behavior

2025-01-22 08:19:16,192 [salt.utils.process:1000][ERROR   ][40178] An un-handled exception from the multiprocessing process 'Maintenance' was caught:
Traceback (most recent call last):
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/process.py", line 995, in wrapped_run_func
    return run_func()
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/master.py", line 312, in run
    self.handle_key_cache()
  File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/master.py", line 339, in handle_key_cache
    os.path.join(self.pki_dir, acc, ".key_cache"), mode="wb"
AttributeError: 'Maintenance' object has no attribute 'pki_dir'

New Behavior

No error

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

No

@piterpunk piterpunk requested a review from a team as a code owner March 23, 2025 02:53
@piterpunk piterpunk changed the title Makes the correct pki_dir available for key_cache Fixes 67185: Makes the correct pki_dir available for key_cache Mar 23, 2025
Copy link
Contributor

@dmurphy18 dmurphy18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to fix tests

@piterpunk
Copy link
Author

Need to fix tests

I don't think there is something to fix here. The tests seems to be totally unrelated to the change made in this PR.

They are the same failed tests of another PR to the 3007.x branch (#67884), some looks to be related to TestsHttpClient timeouts and the others with the wrong minion list, with four unexpected minions in the Assert.

Probably because the "async" behaviour, these test_minions_api_handler tests are happening after test_startup_states bring these minions up and the list doesn't match (as the unexpected minions are brought up)

@dmurphy18
Copy link
Contributor

@piterpunk The nightly build for the 3007.x branch is currently green, see https://github.com/saltstack/salt/actions/runs/14072468234, and the PR #67884, I just rebased it for the latest on the 3007.x branch and it is rerunning.

Hit rerun on the jobs to see if that helps, seen issues with ARM64 containers.

@piterpunk
Copy link
Author

Hit rerun on the jobs to see if that helps, seen issues with ARM64 containers.

Even in the nightly build the test_pillar_using_http_query is failling in its first run.

https://github.com/saltstack/salt/actions/runs/14072468234/job/39414670793#step:36:9424

It succeeds in a subsequent try, but it seems to work by cheer insistence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants