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

Allow runas env retrieval to not block. #63912

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

scott-sturdivant
Copy link

What does this PR do?

Add a timeout to subprocess call to retrieve runas user's environment.

IMO, this PR is incomplete for at least two reasons:

  • Timeout is hardcoded as 10. Does salt have a preferred way to make this configurable?
  • No tests. May need help mocking out the subprocess call.

What issues does this PR fix or reference?

Fixes: 63901

Previous Behavior

On certain systems, the subprocess call to retrieve the runas user's environment would hang indefinitely. By applying a timeout, this process can at least continue.

New Behavior

Timeout allows the execution flow to continue.

Merge requirements satisfied?

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

Commits signed with GPG?

Yes

@scott-sturdivant scott-sturdivant requested a review from a team as a code owner March 20, 2023 16:33
@scott-sturdivant scott-sturdivant requested review from garethgreenaway and removed request for a team March 20, 2023 16:33
@welcome
Copy link

welcome bot commented Mar 20, 2023

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:

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 saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!

salt/modules/cmdmod.py Show resolved Hide resolved
@dwoz dwoz temporarily deployed to ci May 26, 2023 22:14 — with GitHub Actions Inactive
@dwoz dwoz temporarily deployed to ci May 26, 2023 22:14 — with GitHub Actions Inactive
@dwoz dwoz temporarily deployed to ci May 26, 2023 22:14 — with GitHub Actions Inactive
@dwoz dwoz temporarily deployed to ci May 26, 2023 23:16 — with GitHub Actions Inactive
@dwoz dwoz temporarily deployed to ci May 26, 2023 23:16 — with GitHub Actions Inactive
@dwoz dwoz temporarily deployed to ci May 26, 2023 23:16 — with GitHub Actions Inactive
Copy link
Author

@scott-sturdivant scott-sturdivant left a comment

Choose a reason for hiding this comment

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

Been running this patch in our environment on 3005, 3006, and now 3006.1 with success.

salt/modules/cmdmod.py Show resolved Hide resolved
salt/modules/cmdmod.py Show resolved Hide resolved
@dwoz dwoz added this to the Argon v3008.0 milestone Dec 18, 2023
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.

None yet

2 participants