• Sign in
  • Register
  • Puppet Labs Site
  • Documentation
  • Support
  • Contact Us
  • Download
  • Home
  • Projects
  • Help

The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #3299

spacer

owner of files created by nagios resource types

Added by Frederic Descamps over 4 years ago. Updated 10 months ago.

Status:In Topic Branch Pending ReviewStart date:02/25/2010
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:nagios
Target version:-
Affected Puppet version:3.1.1 Branch:https://github.com/puppetlabs/puppet/pull/2060
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket is now tracked at: https://tickets.puppetlabs.com/browse/PUP-1327


Description

Currently the files are created with the permission 600 and are owned by root

it will be nice to have the possibility to change the owner and/or the permissions of those resources

example :

nagios_host{ "korin": 
ensure          => "present",
use             => "linux-server",
alias           => "korin",
address         =>  "192.168.109.84",
hostgroups      => "linux-servers",
target          => "/etc/nagios/host_korin.cfg",
**owner           => "nagios"**;
}    

Related issues

Related to Puppet - Bug #2158: Nagios files are created mode 600 Accepted 04/14/2009
Duplicated by Puppet - Feature #14429: Naginator should provide a way to change mode, owner and ... Duplicate 05/11/2012

Issue # Cancel

History

#1 spacer Updated by Frederic Descamps over 4 years ago

I’ll check Override Exported Ressources in 0.25

#2 spacer Updated by James Turnbull over 4 years ago

  • Project changed from Naginator to Puppet
  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Luke Kanies
  • Affected Puppet version set to 0.25.4

#3 spacer Updated by Luke Kanies over 4 years ago

  • Assignee deleted (Luke Kanies)

Can’t you just manage the files separately using a ‘file’ resource in Puppet?

#4 spacer Updated by Karsten Elfenbein almost 4 years ago

the alternative is to ignore nagios_host and do this with templates but that defeats the hole thing

still present in Puppet 2.6.4

#5 spacer Updated by James Turnbull almost 4 years ago

  • Assignee set to Nigel Kersten

#6 spacer Updated by Nigel Kersten almost 4 years ago

  • Status changed from Needs Decision to Needs More Information

Why isn’t the workaround of using a file resource satisfactory?

#7 spacer Updated by Stefan Goethals almost 4 years ago

Just by the fact that it is a workaround, not a solution.

#8 spacer Updated by Nigel Kersten almost 4 years ago

ok. Given we have a workaround, this isn’t a high priority for us to do the development work, but we’d be more than happy to accept patches to get the desired functionality.

I’m concerned about parameter explosion, as once you add owner you’re going to want group, and probably mode as well.

#9 spacer Updated by Nigel Kersten almost 4 years ago

  • Status changed from Needs More Information to Unreviewed
  • Assignee deleted (Nigel Kersten)

#10 spacer Updated by James Turnbull almost 4 years ago

  • Category set to nagios
  • Status changed from Unreviewed to Accepted

#11 spacer Updated by Sam Pointer about 3 years ago

Nigel Kersten wrote:

ok. Given we have a workaround, this isn’t a high priority for us to do the development work, but we’d be more than happy to accept patches to get the desired functionality.

I’m concerned about parameter explosion, as once you add owner you’re going to want group, and probably mode as well.

If you’re worried about parameter explosion then perhaps a better default would be to create the files 0640 root:root and only offer the group parameter.

This would be backwards compatible with existing installations that expect only root to be able to read the files, but enable those with Nagios installs running under non-root users to amend the group to something more appropriate for reading the config files, such as ‘nagios’.

#12 spacer Updated by Alexander Swen almost 3 years ago

still a problem in 2.7.9

question about the workarround “Can’t you just manage the files separately using a ‘file’ resource in Puppet?” how do i do that? should I define files with ensure => present or so for each file that would be created by a puppet nagios_* resourse??? imho that is not very efficient.

I don’t understand why it’s not possible to create the files with mode 640, group nagios to make this resource work. please motivate the current setting 600-root:root.

#13 spacer Updated by Nigel Kersten almost 3 years ago

We’d take a patch for that Alexander.

#14 spacer Updated by Justin Honold almost 3 years ago

Here’s what I’m doing in order to have each resource change properly permissioned with service restart notification:

  • define configs using the nagios_* types as usual
  • set a global default on all of the used types to notify a refreshonly exec
  • have the refreshonly exec run a chown and notify the service class

This works, but it seems wonky to me and I was genuinely surprised with the root:root 600 thing.

#15 spacer Updated by Joshua Hoblitt almost 2 years ago

I feel that all of the nagios_* types should allow owner, group, & mode similar to the file type.

#16 spacer Updated by Andrew McNaughton over 1 year ago

If this bug is not going to be resolved, then the ‘target’ parameter is severely limited. At a minimum, this shortcoming should be documented in the notes on the ‘target’ parameter on each of puppet’s nagios types.

Either that or just fix the thing. If people don’t need the extra parameters, they won’t use them. I can’t see that having an extra file resource with those parameters is in any way preferable.

#17 spacer Updated by Klavs Klavsen over 1 year ago

  • Affected Puppet version changed from 0.25.4 to 3.1.1

Why is this ridiculous bug really still around?

If you don’t want to support the nagios_* types anymore – remove them, instead of rendering them unusable :(

#18 spacer Updated by Mark Ruys over 1 year ago

Klavs Klavsen wrote:

Why is this ridiculous bug really still around?

If you don’t want to support the nagios_* types anymore – remove them, instead of rendering them unusable :(

Can’t agree more…

#19 spacer Updated by Felix Frank 12 months ago

Guys, guys…less moping, more patching ;–)

Almost there.

#20 spacer Updated by Felix Frank 12 months ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Branch set to https://github.com/puppetlabs/puppet/pull/2060

Enjoy. It’s currently a little light on tests. Will rectify that soon-ish.

#21 Updated by Anonymous 10 months ago

Redmine Issue #3299 has been migrated to JIRA:

https://tickets.puppetlabs.com/browse/PUP-1327

Also available in: Atom PDF

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.