Skip to content

Also perform systemd daemon-reload on Puppet 6.1+ #1233

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

Merged
merged 3 commits into from
Feb 5, 2021

Conversation

ekohl
Copy link
Collaborator

@ekohl ekohl commented Feb 5, 2021

The way daemon-reload is implemented in Puppet 6.1 is by calling

systemctl show --property=NeedDaemonReload -- $SERVICE

If that returns yes then it performs systemctl daemon-reload. However, this
doesn't work reliable because of the particular case.

# systemctl show --property=NeedDaemonReload -- postgresql
Failed to get properties: Access denied

This is probably because the original unit file is removed.

ekohl added 2 commits February 5, 2021 15:15
The way daemon-reload is implemented in Puppet 6.1 is by calling

    systemctl show --property=NeedDaemonReload -- $SERVICE

If that returns yes then it performs systemctl daemon-reload. However,
this doesn't work reliable because of the particular case.

    # systemctl show --property=NeedDaemonReload -- postgresql
    Failed to get properties: Access denied

This is probably because the original unit file is removed.
This moves it so it's closer to the actual call to template()
@ekohl ekohl requested a review from a team as a code owner February 5, 2021 14:48
@puppet-community-rangefinder
Copy link

postgresql::server::config is a class

that may have no external impact to Forge modules.

This module is declared in 70 of 576 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@codecov-io
Copy link

codecov-io commented Feb 5, 2021

Codecov Report

Merging #1233 (18e7cf6) into main (08e3a51) will increase coverage by 0.37%.
The diff coverage is 54.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1233      +/-   ##
==========================================
+ Coverage   65.81%   66.18%   +0.37%     
==========================================
  Files          14       14              
  Lines         351      349       -2     
==========================================
  Hits          231      231              
+ Misses        120      118       -2     
Impacted Files Coverage Δ
...ns/postgresql/postgresql_acls_to_resources_hash.rb 0.00% <0.00%> (ø)
...b/puppet/functions/postgresql/postgresql_escape.rb 0.00% <0.00%> (ø)
...puppet/functions/postgresql/postgresql_password.rb 0.00% <ø> (ø)
lib/puppet/functions/postgresql_escape.rb 0.00% <ø> (ø)
lib/puppet/functions/postgresql_password.rb 0.00% <ø> (ø)
lib/puppet/provider/postgresql_conf/parsed.rb 100.00% <ø> (ø)
.../puppet/provider/postgresql_conn_validator/ruby.rb 80.00% <ø> (ø)
lib/puppet/type/postgresql_conf.rb 93.33% <ø> (ø)
lib/puppet/type/postgresql_conn_validator.rb 100.00% <ø> (ø)
lib/puppet/type/postgresql_replication_slot.rb 100.00% <ø> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c6e00e...18e7cf6. Read the comment docs.

Copy link
Contributor

@evgeni evgeni left a comment

Choose a reason for hiding this comment

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

wording nitpick on the explanation in the comment, ACK otherwise

this is in line with what we discussed on IRC regarding how and why we've been seeing this error on Puppet6 and how to avoid it.

Co-authored-by: Evgeni Golov <evgeni@golov.de>
@sheenaajay
Copy link
Contributor

Thank you @ekohl for your contribution.

@sheenaajay sheenaajay merged commit 8498326 into puppetlabs:main Feb 5, 2021
@sheenaajay sheenaajay self-assigned this Feb 8, 2021
@ekohl ekohl deleted the fix-systemd-reload branch February 16, 2021 12:44
@ekohl
Copy link
Collaborator Author

ekohl commented Feb 18, 2021

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.

4 participants