Skip to content

cephadm: Support custom alertmanager container#36477

Merged
sebastian-philipp merged 2 commits intoceph:masterfrom
p-se:fix-downstream-alertmanager
Aug 20, 2020
Merged

cephadm: Support custom alertmanager container#36477
sebastian-philipp merged 2 commits intoceph:masterfrom
p-se:fix-downstream-alertmanager

Conversation

@p-se
Copy link
Contributor

@p-se p-se commented Aug 5, 2020

Alertmanager container images derived from a different distribution than the upstream container image can contain an alertmanager binary which,

  • is named differently and
  • expects a configuration file in a different location.

Furthermore the uid/gid of the container can be different.

These adaptations make cephadm compatible with container images that either use /etc/prometheus or /etc/alertmanager as their default configuration directory, by extracting the uid/gid of those directories. The cephadm configuration file will always be placed in the same directory (/etc/alertmanager/alertmanager.yml) and the container is instructed with arguments to load it, so that different container images won't have any issues.

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

When alertmanager image has been customized and does not have a
/etc/alertmanager directory, the uid/gid extraction fails. This change
assumes that instead the /etc/prometheus directory exists and can be
used to extract the uid and gid.

Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
@p-se p-se requested a review from a team as a code owner August 5, 2020 15:16
@p-se p-se changed the title Support custom alertmanager container cephadm: Support custom alertmanager container Aug 5, 2020
Fixes other alertmanager containers which do not default to look for a
configuration file in `/etc/alertmanager/alertmanager.yml`.

Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
@p-se p-se force-pushed the fix-downstream-alertmanager branch from 7b5e0db to cdd0ba1 Compare August 18, 2020 06:48
@sebastian-philipp sebastian-philipp added the wip-swagner-testing My Teuthology tests label Aug 18, 2020
@sebastian-philipp
Copy link
Contributor

@sebastian-philipp
Copy link
Contributor

jenkins test make check

@sebastian-philipp sebastian-philipp added ready-to-merge and removed wip-swagner-testing My Teuthology tests labels Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants