Closed ravi8643 closed 1 year ago
Hi, can you attach full log and the deployment yaml you are trying to use?
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.
@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
).
Hi for the same ip address we were using single machine for both repository and load balancer that wont be any issue there.
@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.
https://github.com/epiphany-platform/epiphany/blob/v2.0/ansible/playbooks/roles/repository/files/download-requirements/requirements/x86_64/files.yml#L53
Closing as per no response.
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"}
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
name: "Find and return the newest archive's name and version (using pattern: {{ archive_name_regexp }})"
set_fact: newest_archive_name: >- {{ _newest_archive_name }}
newest_archive_version: >- {{ _newest_archive_name | regex_replace(archive_name_regexp, '\1') }}
vars:
Provide a default value for the version format (assuming 3 segments, left-padded up to 4 zeros).
_archive_version_format: >- {{ archive_version_format | default( '{:0>4s}.{:0>4s}.{:0>4s}' ) }}
Drop all archive names not matching the pattern.
_archive_names_filtered: >- {{ archive_names | select('match', archive_name_regexp) | list }}
Extract all archive version strings.
_archive_versions: >- {{ _archive_names_filtered | map('regex_replace', archive_name_regexp, '\1') | list }}
Zero-pad each segment of the version string (returns a list of strings).
_archive_versions_padded: >- {%- set output = [] -%} {%- for version in _archive_versions -%} {{- output.append( _archive_version_format.format(*version.split('.')) ) -}} {%- endfor -%} {{- output -}}
Create a version (padded) to archive name mapping.
_version_to_name_map: >- {{ dict(_archive_versions_padded | zip(_archive_names_filtered)) }}
Use map to get the newest archive's name.
_newest_archive_name: >- {{ _version_to_name_map[_version_to_name_map.keys() | max] }}