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

Set additional rules on replica when adding compiler #270

Merged
merged 3 commits into from
Jun 21, 2022

Conversation

ody
Copy link
Member

@ody ody commented Jun 15, 2022

Fix that ensures compiler is functional when deployed using add_compiler and a replica server is present

@ody ody requested a review from a team as a code owner June 15, 2022 23:47
@ody ody added the bugfix label Jun 15, 2022
ody added 2 commits June 16, 2022 22:09
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.
@ody ody force-pushed the add_compiler_run_puppet branch 3 times, most recently from aa27289 to 2419e2e Compare June 16, 2022 23:25
@@ -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"}
Copy link
Contributor

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?

Copy link
Member Author

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.


expect_plan('peadm::util::sync_global_hiera')
Copy link
Contributor

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?

Copy link
Member Author

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
@ody ody force-pushed the add_compiler_run_puppet branch from 2419e2e to f5ae8a8 Compare June 17, 2022 17:11
Copy link
Contributor

@timidri timidri left a comment

Choose a reason for hiding this comment

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

LGTM!

@ody ody merged commit ac05eb1 into puppetlabs:main Jun 21, 2022
@ody ody deleted the add_compiler_run_puppet branch June 21, 2022 15:17
@ody ody linked an issue Jun 21, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add_compiler plan not configuring puppedb allow list on secondary
2 participants