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

[develop] salt.modules.at was hopelessly broken on Solaris-like platforms #36873

Merged
merged 8 commits into from
Oct 11, 2016
Merged

[develop] salt.modules.at was hopelessly broken on Solaris-like platforms #36873

merged 8 commits into from
Oct 11, 2016

Conversation

sjorge
Copy link
Contributor

@sjorge sjorge commented Oct 9, 2016

What does this PR do?

  • update salt.modules.at to use virtualname
  • update salt.modules.at virtual() to return false on SunOS platform
  • improve salt.modules.at to only compute the regex once in atq
  • create salt.modules.at_solaris with virtualname of at
  • update salt.states.at to use new salt.module.at calls
  • cleanup salt.states.at
  • added unique_tag property to at.present*
  • added mod_watch to salt.states.at, because I really want this*

salt.modules.at_solaris is compatible in output with salt.modules.at

Some cleanup happened along the way, that could probably also happen to salt.modules.at

What issues does this PR fix or reference?

N/A

Previous Behavior

All at.* calls would raise exceptions on Solaris-like platforms.

New Behavior

All at.* calls now work fine on Solaris-like platforms (tested on Solaris 10, OmniOS and SmartOS)

Although the Solaris 10 box got minimal testing, it was a prod box from work down for maintenance -- why I could test in the first place.

Tests written?

Yes

  • this will be sweet in combination with watching the salt-minion config for changes and doing a delayed restart! Which to be honest was the whole reason for me taking a look at this.

@sjorge
Copy link
Contributor Author

sjorge commented Oct 9, 2016

@cachedout

Is it acceptable to do a 2nd PR to clean up salt.modules.at and use the jenkins pipeline for testing?
As I lack Linux minions, I only have one that is using lx branded emulation.

@sjorge
Copy link
Contributor Author

sjorge commented Oct 9, 2016

Unfortunately salt.states.at is still broken, will fix this to use at.* in all cases.

@sjorge sjorge changed the title salt.modules.at was hopelessly broken on Solaris-like platforms [WIP] salt.modules.at was hopelessly broken on Solaris-like platforms Oct 9, 2016
@sjorge sjorge changed the title [WIP] salt.modules.at was hopelessly broken on Solaris-like platforms salt.modules.at was hopelessly broken on Solaris-like platforms Oct 9, 2016
@sjorge
Copy link
Contributor Author

sjorge commented Oct 9, 2016

salt.states.at was actually pretty horrible :(

  • changed all cmd_run calls to at.* module calls
  • code cleanup
  • improved docs
  • implemented jobid (was mentioned but not done)

Changes to the return of the state were unavoidable. If tests break I will fix after jenkins run.

@sjorge
Copy link
Contributor Author

sjorge commented Oct 9, 2016

Updated the checks for the at state, now mock data is injected for the at.at, at.jobcheck, at.atrm module functions. The result was also updated to reflect the new result data.

@sjorge sjorge changed the title salt.modules.at was hopelessly broken on Solaris-like platforms [develop] salt.modules.at was hopelessly broken on Solaris-like platforms Oct 11, 2016
@rallytime
Copy link
Contributor

Thank you very much @sjorge for this. Looks great!

@rallytime rallytime merged commit 8b9648c into saltstack:develop Oct 11, 2016
@sjorge sjorge deleted the develop-module-at branch October 11, 2016 16:34
gitebra pushed a commit to gitebra/salt that referenced this pull request Oct 11, 2016
* upstream/develop:
  [develop] salt.modules.at was hopelessly broken on Solaris-like platforms (saltstack#36873)
  Fix saltstack#36461, AttributeError because of .lower() (saltstack#36462)
  Add versionadded tag for new create_datacenter function (saltstack#36905)
  [fix] pkg.installed call on pkg.install (saltstack#36904)
  Create datacenter gh (saltstack#36826)
  Typos are not fun! (saltstack#36901)
  Add full SSE demo (saltstack#36878)
  Update tutorial.rst (saltstack#36892)
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