Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysv, armv6/7 fixes #270

Merged
merged 12 commits into from
Feb 4, 2019
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