Skip to content

Missing dependency from amtool symlink to extracted binary. #1059

Description

@alext

I'm seeing errors on initial deploy because the module creates alertmanager.yml, and attempts to validate it with amtool before the alertmanager tarball has been unpacked, which leads to the following error:

Notice: /Stage[main]/Prometheus::Alertmanager/File[/etc/alertmanager]/ensure: created
Notice: /Stage[main]/Prometheus::Alertmanager/File[/usr/local/bin/amtool]/ensure: created
Error: Execution of '/usr/local/bin/amtool check-config --alertmanager.url='' /etc/alertmanager/alertmanager.yaml20260624-10023-117tvfr' returned 127: sh: 1: /usr/local/bin/amtool: not found
Error: /Stage[main]/Prometheus::Alertmanager/File[/etc/alertmanager/alertmanager.yaml]/ensure: change from 'absent' to 'file' failed: Execution of '/usr/local/bin/amtool check-config --alertmanager.url='' /etc/alertmanager/alertmanager.yaml20260624-10023-117tvfr' returned 127: sh: 1: /usr/local/bin/amtool: not found

Later in the same run, the alertmanager tarball is fetched and extracted. Re-running puppet then successfully applies.

I can work around the issue by adding the following to my manifests:

  File['/usr/local/bin/alertmanager'] -> File['/usr/local/bin/amtool']

This works because the alertmanager symlink does depend on the extracted binary.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions