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

Gate win_osinfo and winservice #39370

Merged
merged 10 commits into from Feb 17, 2017
Merged

Conversation

twangboy
Copy link
Contributor

What does this PR do?

Fixes stack trace caused by the loader trying to load windows specific utils in Non-Windows OSs.

What issues does this PR fix or reference?

#39314
#39323

Tests written?

`No

Copy link
Contributor

@cachedout cachedout left a comment

Choose a reason for hiding this comment

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

I do not think this is the right way to fix this. This sort of thing really makes for difficult to maintain and undercuts the functionality of the loader.

Instead, I think it would be better to place these classes into helper functions instead of gating them one by one.

@twangboy
Copy link
Contributor Author

@cachedout Is this one also good now?

@twangboy
Copy link
Contributor Author

This one probably should have gone into the latest release

@@ -15,7 +15,7 @@
import winerror
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not following the logic here. Why are we gating Windows-specific classes in functions but then leaving windows-specific imports at the global level? In my testing, Windows-specific exceptions are still thrown. I suspect we need to put these imports into a __virtual__ function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think this and winservice.py are even being used anymore. I think they were early attempts to create a Windows Service for the Salt-Minion. We should probably look at getting rid of them.

@cachedout cachedout merged commit e4c7168 into saltstack:2016.11 Feb 17, 2017
@twangboy twangboy deleted the gate_win_utils branch December 12, 2017 20:21
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