Opened on 06/07/2016 at 08:24:22 AM

Closed on 12/07/2016 at 08:55:55 AM

#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.

Attachments (0)

Change History (3)

comment:1 Changed on 06/07/2016 at 10:04:48 AM by matze

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

comment:2 Changed on 06/07/2016 at 12:04:45 PM by abpbot

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

comment:3 Changed on 12/07/2016 at 08:55:55 AM by matze

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from matze.
 
Note: See TracTickets for help on using tickets.