Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] HAProxy upgrade fails on re-run trying to remove haproxy_exporter #3049

Closed
7 of 18 tasks
przemyslavic opened this issue Mar 31, 2022 · 1 comment
Closed
7 of 18 tasks
Assignees
Labels

Comments

@przemyslavic
Copy link
Collaborator

przemyslavic commented Mar 31, 2022

Describe the bug
There is an issue with haproxy exporter removal when executing the upgrade command twice.
After the first upgrade, the service is already removed, but after executing the upgrade command again, it tries to remove the nonexistent service.

The condition used in task load_balancer | Remove haproxy-exporter is as follows:

  when: ansible_facts.services["prometheus-haproxy-exporter.service"] is defined

But after ansible update, prometheus-haproxy-exporter.service is still visible in ansible_facts.services but it's status is not-found, which causes some tasks to be re-executed.

14:58:56 INFO cli.src.ansible.AnsibleCommand -         "prometheus-haproxy-exporter.service": {
14:58:56 INFO cli.src.ansible.AnsibleCommand -             "name": "prometheus-haproxy-exporter.service",
14:58:56 INFO cli.src.ansible.AnsibleCommand -             "source": "systemd",
14:58:56 INFO cli.src.ansible.AnsibleCommand -             "state": "stopped",
14:58:56 INFO cli.src.ansible.AnsibleCommand -             "status": "not-found"
14:58:56 INFO cli.src.ansible.AnsibleCommand -         },

This means that the condition is insufficient and must be extended (similar to #2962).

How to reproduce
Steps to reproduce the behavior:

  1. deploy v1.0.x cluster with load balancer and montoring
  2. upgrade to 2.0.0dev
  3. upgrade to 2.0.0dev

Expected behavior
The upgrade should be successful.

Config files

Environment

  • Cloud provider: [all]
  • OS: [all]

epicli version: 2.0.0dev

Additional context
Add any other context about the problem here.


DoD checklist

  • Changelog
    • updated
    • not needed
  • COMPONENTS.md
    • updated
    • not needed
  • Schema
    • updated
    • not needed
  • Backport tasks
    • created
    • not needed
  • Documentation
    • added
    • updated
    • not needed
  • Feature has automated tests
  • Automated tests passed (QA pipelines)
    • apply
    • upgrade
    • backup/restore
  • Idempotency tested
  • All conversations in PR resolved
@atsikham
Copy link
Contributor

#2940 (comment)

@przemyslavic przemyslavic self-assigned this Mar 31, 2022
@seriva seriva closed this as completed Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants