-
Notifications
You must be signed in to change notification settings - Fork 54
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
Set additional rules on replica when adding compiler #270
Conversation
When adding a compiler using the add_compiler plan and a replica is provisioned, it is necessary to add the new compiler's certificate name to the PuppetDB instance that will serve as replica for the compiler.
Ensure the global hiera.yaml is synced from primary so that data in console is enabled.
aa27289
to
2419e2e
Compare
spec/plans/add_compiler_spec.rb
Outdated
@@ -33,8 +47,9 @@ def allow_standard_non_returning_calls | |||
|
|||
# {"install_flags"=> | |||
# ["--puppet-service-ensure", "stopped", | |||
# "extension_requests:1.3.6.1.4.1.34380.1.3.13=pe_compiler", "extension_requests:1.3.6.1.4.1.34380.1.1.9813=A", "main:certname=compiler"], "server"=>"primary"} | |||
# "extenion_requests:1.3.6.1.4.1.34380.1.3.13=pe_compiler", "extension_requests:1.3.6.1.4.1.34380.1.1.9813=A", "main:certname=compiler"], "server"=>"primary"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ody Is there a typo here? Is this an inadvertent change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inadvertently deletion of the letter s in extension_requests.
spec/plans/add_compiler_spec.rb
Outdated
|
||
expect_plan('peadm::util::sync_global_hiera') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does expect_plan
with no further arguments do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it just ensures it is run but ignores any specifics like success, failure, or how many times it actually ran. To make is more specific, I'll add the number of times it is expected to run. The plan doesn't return anything and parameters are just source and target. Mocking it is simply required because if it isn't, the underlying tasks fail because they require reading a file off disk
Introduced new things that needed to be mocked to finish successfully
2419e2e
to
f5ae8a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Fix that ensures compiler is functional when deployed using
add_compiler
and a replica server is present