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

Dynamic values #5

Merged
merged 7 commits into from Oct 20, 2015

Conversation

Projects
None yet
2 participants
@thenoid
Copy link
Collaborator

commented Sep 24, 2015

When setting values of node['rhn'] at execution time instead of compile time, such as determining rhn hostname, generating activation keys, etc the providers would fail to reflect those changes and proceed with the compile time defaults.. This should fix some, not all, of those issues.

Found several cases where the current method of checking for the systemid in a file would incorrectly reflect the actual registration status of the server. Switched to calling out to satellite and trapping the failure/success to determine it the host is registered.

Additionally by not using shell_out! it was possible for the shell commands to fail silently and then the recipe would die later in the run, obfuscating the real issue. Instead of writing an entire exit code trapping mechanism, simply changing from shell_out -> shell_out! provents the code from failing silently.

Rocky Olsen and others added some commits Aug 31, 2015

Rocky Olsen
Revert "bleh"
This reverts commit 5c66efb.
Should always use shell_out! unless trapping exit codes!
You are expected to trap the exit status and take action when using shell_out(),
without the !, other wise it is possible for the shell command to fail silently.
Failing silently is bad for many reasons, biggest of all it masks the real
issue.  The shell_out fails, but the recipe dies later.
The systemid value read from a file isn't accurate way to determine r…
…egistration

There are numerous ways that a server could have a systemid file, but not be
registered.  Changing satellite servers, the server being deleted, etc.  It is
better to actually verify the communication to satellite.  Most commands preform
to much, however rhn-profile-sysnc is just the right amount.
Becaues the resource defaults are set at compile time, modifying duri…
…ng the

converge phase, such as generating activation keys or picking a satellite host,
wouldn't be triggered upon.
Again compile time vs converge it is possible that rhn_action would b…
…e empty.

Reading it from the resource is more accurate
@bflad

This comment has been minimized.

Copy link
Owner

commented Sep 29, 2015

I like this PR a lot. Thanks for fixing these things. I'll cut a release real shortly. Note: I don't have my own infrastructure to test this cookbook anymore.

@thenoid

This comment has been minimized.

Copy link
Collaborator Author

commented Oct 3, 2015

Cool - any update on when that release will be cut?

Also i work at a big 5.x shop (and run spacewalk at home) if you need a co-maintainer let me know. I plan on adding a bunch of features to this cookbook in the coming months.

bflad added a commit that referenced this pull request Oct 20, 2015

@bflad bflad merged commit d5416c0 into bflad:master Oct 20, 2015

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
@bflad

This comment has been minimized.

Copy link
Owner

commented Oct 20, 2015

Released in 0.3.0 -- I've also added you as a collaborator on the repository. If you provide me with your SuperMarket username, I'll give you permissions there as well to publish. Thanks!

@thenoid

This comment has been minimized.

Copy link
Collaborator Author

commented Oct 20, 2015

:D 'thenoid' on supermarket as well, and thanks!

@bflad

This comment has been minimized.

Copy link
Owner

commented Oct 21, 2015

All set. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.