Skip to content

Commit

Permalink
Merge pull request #270 from defenestration/master
Browse files Browse the repository at this point in the history
sysv, armv6/7 fixes
  • Loading branch information
bastelfreak authored Feb 4, 2019
2 parents 3ec269f + 0cc1d74 commit 492d18f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
fail('remote_write_configs requires prometheus 2.X')
}
$daemon_flags = [
'-log.format logger:stdout',
"-config.file=${prometheus::server::config_dir}/${prometheus::server::configname}",
"-storage.local.path=${prometheus::server::localstorage}",
"-storage.local.retention=${prometheus::server::storage_retention}",
Expand Down Expand Up @@ -71,7 +72,7 @@
content => template('prometheus/prometheus.systemd.erb'),
}
}
'sysv' : {
'sysv', 'redhat' : {
file { '/etc/init.d/prometheus':
mode => '0555',
owner => 'root',
Expand Down
3 changes: 3 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@
) {

case $arch {
# 'armv5',
'armv6l': { $real_arch = 'armv6' }
'armv7l': { $real_arch = 'armv7' }
'x86_64', 'amd64': { $real_arch = 'amd64' }
'i386': { $real_arch = '386' }
'armv7l': { $real_arch = 'armv7' }
Expand Down
1 change: 1 addition & 0 deletions manifests/service_reload.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'systemd' => "systemctl reload-or-restart ${init_selector}",
'upstart' => "service ${init_selector} reload",
'sysv' => "/etc/init.d/${init_selector} reload",
'redhat' => "/etc/init.d/${init_selector} reload",
'sles' => "/etc/init.d/${init_selector} reload",
'debian' => "/etc/init.d/${init_selector} reload",
'launchd' => "launchctl stop ${init_selector} && launchctl start ${init_selector}",
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/files/prometheus2.sysv
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ start() {
[ -f $PID_FILE ] && rm $PID_FILE
daemon --user=prometheus \
--pidfile="$PID_FILE" \
"$DAEMON" -log.format logger:stdout --config.file=/etc/prometheus/prometheus.yaml \
"$DAEMON" --config.file=/etc/prometheus/prometheus.yaml \
--storage.tsdb.path=/var/lib/prometheus \
--storage.tsdb.retention=360h \
--web.console.templates=/usr/local/share/prometheus/consoles \
Expand Down
2 changes: 1 addition & 1 deletion templates/prometheus.sysv.erb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ start() {
[ -f $PID_FILE ] && rm $PID_FILE
daemon --user=<%= scope.lookupvar('prometheus::server::user') %> \
--pidfile="$PID_FILE" \
"$DAEMON" -log.format logger:stdout <%= @daemon_flags.join(" \\\n ") %> \
"$DAEMON" <%= @daemon_flags.join(" \\\n ") %> \
<%= scope.lookupvar('prometheus::server::extra_options') %> >> "$LOG_FILE" &
retcode=$?
mkpidfile
Expand Down

0 comments on commit 492d18f

Please sign in to comment.