simp_rsyslog::server uses rsyslog::rule::local instead of rsyslog::rule::drop for custom config

Description

All,

DISCLAIMER: Untested assertions below.

Putting this out here before creating a ticket. I attempted to specify a custom rsyslog config today on an old SIMP 4.2 server and it bombed with this error:

Error 400 on SERVER: "" is not an absolute path. at /etc/puppet/environments/production/modules/rsyslog/manifests/rule/local.pp:80

It seems that the old simp::rsyslog::stock::log_server class calls the rsyslog::rule::local class without either the dyna_file or target_log_file parameters set... which fails the following logic:

if empty($dyna_file) {
validate_absolute_path($target_log_file)
}

Unfortunately, it seems that this logic persists in the current code on GitHub:

SNIPPET: simp_rsyslog::server

if $server_conf {
rsyslog::rule::local { '0_default':
rule => $server_conf,
stop_processing => $stop_processing
}
}

SNIPPET: rsyslog::rule::local

if !($dyna_file or $target_log_file) {
fail('You must specify one of $dyna_file or $target_log_file')
}

Can someone confirm that this bug exists? If so, I can create a ticket if that's preferable.

Thanks!

-Nick

Hi Nick,

This is confirmed.

In simp_rsyslog::server, this should be:

rsyslog::rule::drop { '0_default':
rule => $server_conf
}

If you could file a bug, that would be great!

Thanks,

Trevor

Acceptance Criteria

None

Activity

Show:
Nicholas Hughes
January 27, 2017, 7:42 PM
Liz Nemsick
February 10, 2017, 6:29 PM

Pull request was merged on 1/29/17

Labels

None

Epic Link

None

Story Points

None

Components

Priority

High
Configure