maxim-mityutko / borgmatic-exporter

Prometheus exporter for Borgmatic seamlessly integrated into official Borgmatic docker image
MIT License
2 stars 2 forks source link

Rework the `supervisord` approach and leverage `s6` from Borgmatic image #12

Closed maxim-mityutko closed 2 months ago

maxim-mityutko commented 2 months ago
/usr/lib/python3.11/site-packages/supervisor/options.py:474: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  self.warnings.warn(
2024-06-24 11:03:12,660 INFO Set uid to user 0 succeeded
2024-06-24 11:03:12,664 INFO supervisord started with pid 1
2024-06-24 11:03:13,667 INFO spawned: 'borgmatic' with pid 7
2024-06-24 11:03:13,669 INFO spawned: 'prometheus-exporter' with pid 8
s6-overlay-suexec: fatal: can only run as pid 1
2024-06-24 11:03:13,674 WARN exited: borgmatic (exit status 100; not expected)
2024-06-24 11:03:14.106 | INFO     | src.cli:run:54 - Exporter execution parameters set...
2024-06-24 11:03:14.107 | INFO     | src.cli:run:55 -   Borgmatic config path: ('/etc/borgmatic.d/k8s-db.yml', '/etc/borgmatic.d/k8s-fs.yml')
2024-06-24 11:03:14.107 | INFO     | src.cli:run:56 -   Port:'9996'
2024-06-24 11:03:14.110 | INFO     | src.http_server:start_http_server:46 - Started borgmatic-exporter at port='9996'
2024-06-24 11:03:15,112 INFO spawned: 'borgmatic' with pid 13
2024-06-24 11:03:15,113 INFO success: prometheus-exporter entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
s6-overlay-suexec: fatal: can only run as pid 1
2024-06-24 11:03:15,118 WARN exited: borgmatic (exit status 100; not expected)
2024-06-24 11:03:17,121 INFO spawned: 'borgmatic' with pid 14
s6-overlay-suexec: fatal: can only run as pid 1
2024-06-24 11:03:17,126 WARN exited: borgmatic (exit status 100; not expected)
2024-06-24 11:03:20,131 INFO spawned: 'borgmatic' with pid 15
s6-overlay-suexec: fatal: can only run as pid 1
2024-06-24 11:03:20,137 WARN exited: borgmatic (exit status 100; not expected)
2024-06-24 11:03:20,138 INFO gave up: borgmatic entered FATAL state, too many start retries too quickly
maxim-mityutko commented 2 months ago

This unlocks the possibility to upgrade to images 1.8.10 or higher

maxim-mityutko commented 2 months ago

https://github.com/borgmatic-collective/docker-borgmatic/blob/1.8.11/Dockerfile

maxim-mityutko commented 2 months ago

11