Bug 1755412 - Setting "oreg_url: registry.redhat.io" fails with error
Summary: Setting "oreg_url: registry.redhat.io" fails with error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-metrics
Version: 4.3.5
Hardware: All
OS: All
medium
medium
Target Milestone: ovirt-4.3.11
: ---
Assignee: Shirly Radco
QA Contact: Guilherme Santos
URL:
Whiteboard:
Depends On: 1827177
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-25 13:08 UTC by Gajanan
Modified: 2020-07-23 14:13 UTC (History)
4 users (show)

Fixed In Version: rhv-4.4.0-29
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-16 13:53:45 UTC
oVirt Team: Metrics
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 104267 0 master MERGED Fix oreg_url description and remove wrong default value 2020-07-20 12:02:41 UTC

Description Gajanan 2019-09-25 13:08:53 UTC
Description of problem:

In /etc/ovirt-engine-metrics/config.yml.d/metrics-store-config.yml on the RHV-M there is a below parameter, 

# URL of the container registry. Default is 'registry.redhat.io'
# oreg_url: registry.redhat.io

When I uncommented oreg_url and ran the playbook to install the metric store vm, it failed with error below:

 [this error is seen at Chapter 2.2 in the installation guide]

https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.3/html-single/metrics_store_installation_guide/index
 
~~~
Failure summary:
 
 
  1. Hosts:    master0.gsslab.pnq2.redhat.com
     Play:     OpenShift Health Checks
     Task:     Run health checks (install) - EL
 Message:  One or more checks failed
     Details:  check "docker_image_availability":
               An unhandled exception occurred while templating '{{ (l_host_is_master and l_host_is_etcd) | ternary([etcd_image], []) }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while templating '{{ osm_etcd_image }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while templating '{{ l_default_osm_etcd_image }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while templating '{{ etcd_image_dict[openshift_deployment_type] | lib_utils_oo_oreg_image((oreg_url | default('None'))) }}'. Error was a <class 'ansible.errors.AnsibleFilterError'>, original message: oreg_url malformed: registry.redhat.io
               Traceback (most recent call last):
                 File "/usr/share/ansible/openshift-ansible/roles/openshift_health_checker/action_plugins/openshift_health_check.py", line 225, in run_check
                   result = check.run()
                 File "/usr/share/ansible/openshift-ansible/roles/openshift_health_checker/openshift_checks/docker_image_availability.py", line 108, in run
                   self.get_var('openshift_health_check_required_images'))
                 File "/usr/share/ansible/openshift-ansible/roles/openshift_health_checker/openshift_checks/__init__.py", line 103, in template_var
                   return self._templar.template(var_to_template)
                 File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", line 479, in template
                   disable_lookups=disable_lookups,
                 File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", line 722, in do_template
                   res = j2_concat(rf)
                 File "<template>", line 9, in root
                 File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", line 220, in resolve
                   val = super(AnsibleContext, self).resolve(key)
                 File "/usr/lib/python2.7/site-packages/jinja2/runtime.py", line 153, in resolve
                   return self.parent[key]
                 File "/usr/lib/python2.7/site-packages/ansible/template/vars.py", line 113, in __getitem__
                   "Error was a %s, original message: %s" % (to_native(variable), type(e), msg))
               AnsibleError: An unhandled exception occurred while templating '{{ (l_host_is_master and l_host_is_etcd) | ternary([etcd_image], []) }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while templating '{{ osm_etcd_image }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while templating '{{ l_default_osm_etcd_image }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while templating '{{ etcd_image_dict[openshift_deployment_type] | lib_utils_oo_oreg_image((oreg_url | default('None'))) }}'. Error was a <class 'ansible.errors.AnsibleFilterError'>, original message: oreg_url malformed: registry.redhat.io
~~~

Workaround: 

To fix this, I added “oreg_url: registry.redhat.io/openshift3/ose-${component}:${version}” in “vars.yaml” on the metrics-store-installer vm. 

and installated successfully then.


Note You need to log in before you can comment on or make changes to this bug.