hitachienergy / epiphany

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

[BUG}we are facing this error we are using Rhel version 8.6 and it is saying syntax error for this particular Yaml file. please provide solution for this.We tried both 2.0.4 and 2.0.5 and also its and offline air gapped installation setup. #3344

Closed ravi8643 closed 1 year ago

ravi8643 commented 1 year ago

fatal: [hapg-master]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ _version_to_name_map[_version_to_name_map.keys() | max] }}: No aggregated item, sequence was empty.\n\nThe error appears to be in '/shared/build/uat-cluster/ansible/roles/download/tasks/pick_newest.yml': line 14, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: \"Find and return the newest archive's name and version (using pattern: {{ archive_name_regexp }})\"\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"}

epierror

epiuser@58714307ea0a:/shared$ cat /shared/build/uat-cluster/ansible/roles/download/tasks/pick_newest.yml

Invoke with (example):

- set_fact:

archive_names:

- "haproxy_exporter-0.10.0.linux-amd64.tar.gz"

- "helm-v2.2.0-linux-amd64.tar.gz"

- "helm-v10.2.3-linux-amd64.tar.gz"

- "elasticsearch-curator_5.5.4_amd64.deb"

- "helm-v3.2.0-linux-amd64.tar.gz"

- "prometheus-2.10.0.linux-amd64.tar.gz"

archive_name_regexp: '^helm-v([0-9.]+)-linux-amd64.tar.gz$'

archive_version_format: '{:0>4s}.{:0>4s}.{:0>4s}' # OPTIONAL

seriva commented 1 year ago

Hi, can you attach full log and the deployment yaml you are trying to use?

ravi8643 commented 1 year ago

dump-1.yaml.txt pick_newest.txt rise-epi-2.0.txt

Hi Seriva I have provided dump file with logs and the error yaml file that is pick newest where we can see syntax error and also provided the yaml file which we are using for deploying the epiphany cluster that is rise -epi 2.0 (I used both versions 2.0.4 and 2.0.5 both were showing the same results )Please make a note that we are doing this in air gapped environment as offline installer.You require any more details please comment.

przemyslavic commented 1 year ago

@ravi8643 One thing I can see is that you have specified the machine with the same IP address twice:

---
kind: infrastructure/machine
provider: any
name: default-loadbalancer
specification:
  hostname: hapg-loadbalancer
  ip: 10.62.33.225
version: 2.0.5
---
kind: infrastructure/machine
provider: any
name: default-repository
specification:
  hostname: hapg-loadbalancer
  ip: 10.62.33.225
version: 2.0.5

Could you also check what you have in offline requirements directory (/shared-ii/files) and on the repository host (/var/www/html/epirepo/files).

ravi8643 commented 1 year ago

Hi for the same ip address we were using single machine for both repository and load balancer that wont be any issue there.

przemyslavic commented 1 year ago

@ravi8643 From what I have been able to investigate, this error may occur if there is no helm package in the repository matching the following pattern ^helm-v([0-9.]+)-linux-amd64.tar.gz$. Make sure you downloaded helm package. image https://github.com/epiphany-platform/epiphany/blob/v2.0/ansible/playbooks/roles/repository/files/download-requirements/requirements/x86_64/files.yml#L53

przemyslavic commented 1 year ago

Closing as per no response.