hitachienergy / epiphany

Cloud and on-premises automation for Kubernetes centered industrial grade solutions.
Apache License 2.0
138 stars 107 forks source link

[BUG] epicli may fail on "Download image haproxy-2.2.2-alpine.tar" task #3231

Closed to-bar closed 2 years ago

to-bar commented 2 years ago

Describe the bug HAProxy image is not available when load_balancer component has count set to 0. The image is required for K8s in HA mode.

How to reproduce Steps to reproduce the behavior:

  1. edit config file to have:
    components:
    repository:
      count: 1
    kubernetes_master:
      count: 3
    kubernetes_node:
      count: 1
    load_balancer:
      count: 0

    and

    specification:
    use_ha_control_plane: True
  2. execute epicli apply

Deployment fails like below:

12:57:02 INFO cli.src.ansible.AnsibleCommand - TASK [download : Download image haproxy-2.2.2-alpine.tar] **********************
12:57:15 INFO cli.src.ansible.AnsibleCommand - fatal: [tobar-az-ub-kubernetes-master-vm-0]: FAILED! => {"attempts": 3, "changed": false, "dest": "/tmp", "elapsed": 0, "gid": 0, "group": "root", "mode": "01777", "msg": "Request failed", "owner": "root", "response": "HTTP Error 404: Not Found", "size": 4096, "state": "directory", "status_code": 404, "uid": 0, "url": "http://10.1.11.4/epirepo/images/haproxy-2.2.2-alpine.tar"}

Environment

epicli version: 2.0.1dev

Additional context Related to #3188


DoD checklist

przemyslavic commented 2 years ago

Good catch! ❤️