--- Systemd::Service[thanos-compact].orig
+++ Systemd::Service[thanos-compact]
@@
- ensure => absent
+ ensure => present
@@
- service_params => {'enable': False, 'hasrestart': True}
+ service_params => {'enable': True, 'hasrestart': True}
File[/etc/systemd/system/thanos-compact.service.d/puppet-override.conf]
- Parameters differences:
--- File[/etc/systemd/system/thanos-compact.service.d/puppet-override.conf].orig
+++ File[/etc/systemd/system/thanos-compact.service.d/puppet-override.conf]
@@
- ensure => absent
+ ensure => present
- Content differences:
--- /etc/systemd/system/thanos-compact.service.d/puppet-override.conf.orig
+++ /etc/systemd/system/thanos-compact.service.d/puppet-override.conf
@@ -1,7 +1,15 @@
[Service]
+
+# Local restart is blocked if a new relabel-config-file is pending deployment via the cookbook.
+# In this case, the restart must be performed using the sre.o11y.thanos-compact-restart cookbook.
+
Slice=thanos.slice
# force sigkill due to https://github.com/thanos-io/thanos/issues/6398
SendSIGKILL=yes
+ExecReload=
+ExecReload=/bin/bash -c "/usr/bin/cmp -s /etc/thanos-compact/relabel.yaml.unreferenced /etc/thanos-compact/relabel.yaml && /bin/kill -HUP $MAINPID || (echo 'New relabel config file pending deployment. Restart must be performed using the sre.o11y.thanos-compact-restart cookbook.'; exit 1)"
+ExecStartPre=
+ExecStartPre=/bin/bash -c "/usr/bin/cmp -s /etc/thanos-compact/relabel.yaml.unreferenced /etc/thanos-compact/relabel.yaml || (echo 'New relabel config file pending deployment. Restart must be performed using the sre.o11y.thanos-compact-restart cookbook.'; exit 1)"
ExecStart=
ExecStart=/usr/bin/thanos compact \
--http-address 0.0.0.0:12902 \
@@ -15,4 +23,5 @@
--compact.concurrency 2 \
--downsample.concurrency 2 \
--block-meta-fetch-concurrency 96 \
+ --selector.relabel-config-file /etc/thanos-compact/relabel.yaml \
--wait
- Class[Thanos::Compact]
- Parameters differences:
--- Class[Thanos::Compact].orig
+++ Class[Thanos::Compact]
- run_on_host => titan2001.codfw.wmnet
- Systemd::Unit[thanos-compact]
- Parameters differences:
--- Systemd::Unit[thanos-compact].orig
+++ Systemd::Unit[thanos-compact]
@@
- ensure => absent
+ ensure => present
- Exec[systemd daemon-reload for thanos-compact.service (thanos-compact)]
- Parameters differences:
--- Exec[systemd daemon-reload for thanos-compact.service (thanos-compact)].orig
+++ Exec[systemd daemon-reload for thanos-compact.service (thanos-compact)]
+ notify => ['Service[thanos-compact]']
- Class[Profile::Thanos::Compact]
- Parameters differences:
--- Class[Profile::Thanos::Compact].orig
+++ Class[Profile::Thanos::Compact]
- thanos_compact_host => titan2001.codfw.wmnet