Skip to content

collectd fails to start as generated config includes empty config #806

@sammcj

Description

@sammcj

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.1 / PE 2018.1
  • Ruby: 2.4.3p205
  • Distribution: CentOS 7.5
  • Module version: v9.0.1

How to reproduce (e.g Puppet code you use)

include ::collectd

What are you seeing

collectd service fails to start using puppet generated config

What behaviour did you expect instead

collectd should start with minimal config.

/etc/collectd.conf should not contain Include "/etc/collectd.d/*.conf" unless there are files present in that directory.

/etc/collectd.conf:

# Generated by Puppet

#Hostname localhost
FQDNLookup true

#BaseDir "/var/lib/collectd"
#PluginDir "/usr/lib/collectd"
TypesDB "/usr/share/collectd/types.db"
Interval 10
Timeout 2
ReadThreads 5
WriteThreads 5
Include "/etc/collectd.d/*.conf"

/etc/collectd.d is empty by default:

~  # ls /etc/collectd.d/*.conf
ls: cannot access /etc/collectd.d/*.conf: No such file or directory

collectd cannot start:

~ # collectd
configfile: stat (/etc/collectd.d/*.conf) failed: No such file or directory

creating a blank conf file in /etc/collectd.d allows collectd to start:

~ # touch /etc/collectd.d/dummy.conf
~ # collectd

Metadata

Metadata

Assignees

No one assigned

    Labels

    backwards-incompatibleThis change will lead to a major version bump for the next releaseenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions