Opened 3 years ago

Closed 3 years ago

#4120 closed defect (fixed)

Fix nagios-client / sudoers.d dependencies in Puppet

Reported by: matze Assignee: matze
Priority: P2 Milestone:
Module: Infrastructure Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29345615

Description

The /etc/sudoers.d directory does not necessarily exist already when Puppet class nagios::client is applied, which can lead to said class being unable to ensure it's sudo configuration file being present:

Error: Could not set 'file' on ensure: No such file or directory @ dir_s_rmdir - /etc/sudoers.d/nagios20160607-2895-n42t25.lock at 25:/etc/puppet/modules/nagios/manifests/client.pp
Error: Could not set 'file' on ensure: No such file or directory @ dir_s_rmdir - /etc/sudoers.d/nagios20160607-2895-n42t25.lock at 25:/etc/puppet/modules/nagios/manifests/client.pp
Wrapped exception:
No such file or directory @ dir_s_rmdir - /etc/sudoers.d/nagios20160607-2895-n42t25.lock
Error: /Stage[main]/Nagios::Client/File[/etc/sudoers.d/nagios]/ensure: change from absent to file failed: Could not set 'file' on ensure: No such file or directory @ dir_s_rmdir - /etc/sudoers.d/nagios20160607-28
95-n42t25.lock at 25:/etc/puppet/modules/nagios/manifests/client.pp

Thus we need to explicitly define order and relationship of these resources in Puppet.

Background

Our so far more or less homogeneous installations based on Ubuntu 12.04 have the sudo software available before the first Puppet run, hence this issue did not occur until we've recently started testing and incorporating more recent operating systems and -versions.

Change History (3)

comment:1 Changed 3 years ago by matze

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 3 years ago by abpbot

A commit referencing this issue has landed:
Issue 4120 - Fix nagios-client / sudo dependency

comment:3 Changed 3 years ago by matze

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.