prometheus-alertmanager: merge_yaml not doing recursive copy of properties

Bug #1786077 reported by Jorge Niedbalski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Fix Released
Medium
Jorge Niedbalski

Bug Description

[Environment]

Kolla-ansible master

[Description]

Change https://review.openstack.org/#/c/571826/4/ansible/roles/prometheus/tasks/config.yml
introduced the usage of merge_yaml for prometheus-alertmanager.yml configuration.

However the merge_yaml module doesn't do a deep copy of >= first level properties, so it doesn't works for most configurations.

Example config:

global:
  resolve_timeout: 5m
  smtp_require_tls: true
  pagerduty_url: https://events.pagerduty.com/v2/enqueue
route:
  receiver: default-receiver
  group_wait: 10s
  group_interval: 5m
  repeat_interval: 3h
  routes:
    - match:
        severity: 'page'
      receiver: xxx-dc-default-receiver

receivers:
  - name: default-receiver
  - name: xxx-dc-default-receiver
    pagerduty_configs:
      - service_key: xxxx

templates: []

Default template:

global:
  resolve_timeout: 5m
  smtp_require_tls: true
route:
  receiver: default-receiver
  group_wait: 10s
  group_interval: 5m
  repeat_interval: 3h
receivers:
  - name: default-receiver
templates: []

Changed in kolla-ansible:
status: New → In Progress
assignee: nobody → Jorge Niedbalski (niedbalski)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (master)

Fix proposed to branch: master
Review: https://review.openstack.org/589966

Revision history for this message
Eduardo Gonzalez (egonzalez90) wrote :

Jorge, opened a new bug for the merge_yaml issue so it gets fixed on the module in the future.

https://bugs.launchpad.net/kolla-ansible/+bug/1786741

Regards

Changed in kolla-ansible:
importance: Undecided → Medium
milestone: none → rocky-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.openstack.org/589966
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=19ec40170f254472f1def88fda14fc93f96d50bd
Submitter: Zuul
Branch: master

commit 19ec40170f254472f1def88fda14fc93f96d50bd
Author: Jorge Niedbalski <email address hidden>
Date: Wed Aug 8 12:30:38 2018 -0400

    [prometheus-alertmanager] use template/first_found instead of merge_yaml.

    Change https://review.openstack.org/#/c/571826/4/
    introduced the usage of merge_yaml for rendering the
    prometheus-alertmanager.yml configuration.

    However the merge_yaml module doesn't do a deep copy of >=
    second level properties, so it doesn't works for
    most configurations.

    Bug: #1786077
    Change-Id: I35297c6e2a3800582fb1fd3782a5d93558562b1d
    Signed-off-by: Jorge Niedbalski <email address hidden>

Changed in kolla-ansible:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.