[Pike Only] Wrongly rendered namespace in docker images: <class 'jinja2.utils.Namespace'>/centos-binary-ceilometer-notification:current-tripleo"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
High
|
Jose Luis Franco |
Bug Description
In the upgrades job from Ocata to Pike it has been observed an error when rendering the container images during the upgrade step. The overcloud upgrade command fails with the following tasks failing:
...
2018-10-05 09:40:24 | "2018-10-05 09:39:38,539 WARNING: 144091 -- retrying pulling image: <class 'jinja2.
2018-10-05 09:40:24 | "2018-10-05 09:39:41,565 WARNING: 144091 -- docker pull failed: Error parsing reference: \"<class 'jinja2.
2018-10-05 09:40:24 | "2018-10-05 09:39:41,565 WARNING: 144091 -- retrying pulling image: <class 'jinja2.
2018-10-05 09:40:24 | "2018-10-05 09:39:41,565 ERROR: 144091 -- Failed to pull image: <class 'jinja2.
2018-10-05 09:40:24 | "2018-10-05 09:39:41,592 ERROR: 144091 -- Failed running docker-puppet.py for crond",
2018-10-05 09:40:24 | "2018-10-05 09:39:41,592 ERROR: 144091 -- /usr/bin/
2018-10-05 09:40:24 | "2018-10-05 09:39:41,592 INFO: 144091 -- Finished processing puppet configs",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,697 INFO: 144089 -- Removing container: docker-
2018-10-05 09:40:24 | "2018-10-05 09:39:51,756 INFO: 144089 -- Finished processing puppet configs",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,757 ERROR: 144088 -- ERROR configuring haproxy",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,757 ERROR: 144088 -- ERROR configuring nova_placement",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,757 ERROR: 144088 -- ERROR configuring clustercheck",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,757 ERROR: 144088 -- ERROR configuring mysql",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,757 ERROR: 144088 -- ERROR configuring rabbitmq",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,757 ERROR: 144088 -- ERROR configuring iscsid",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,757 ERROR: 144088 -- ERROR configuring heat",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,757 ERROR: 144088 -- ERROR configuring glance_api",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,758 ERROR: 144088 -- ERROR configuring keystone",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,758 ERROR: 144088 -- ERROR configuring nova",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,758 ERROR: 144088 -- ERROR configuring horizon",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,758 ERROR: 144088 -- ERROR configuring heat_api",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,758 ERROR: 144088 -- ERROR configuring heat_api_cfn",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,758 ERROR: 144088 -- ERROR configuring memcached",
2018-10-05 09:40:24 | "2018-10-05 09:39:51,758 ERROR: 144088 -- ERROR configuring crond"
2018-10-05 09:40:24 | ]
2018-10-05 09:40:24 | }
2018-10-05 09:40:24 | to retry, use: --limit @/var/lib/
2018-10-05 09:40:24 |
2018-10-05 09:40:24 | PLAY RECAP *******
2018-10-05 09:40:24 | localhost : ok=6 changed=2 unreachable=0 failed=1
2018-10-05 09:40:24 |
2018-10-05 09:40:24 | deploy_stderr: |
It can be seen that the namespace used to pull the images is unrecognized:
2018-10-05 09:40:24 | "2018-10-05 09:39:41,592 ERROR: 144091 -- Failed running docker-puppet.py for crond",
2018-10-05 09:40:24 | "2018-10-05 09:39:41,592 ERROR: 144091 -- /usr/bin/
When going to the mistral logs, we see in the result from the container_
https:/
Changed in tripleo: | |
status: | Triaged → Fix Released |
The cause is in the variable name used for the namespace in the container images jinja template: https:/ /github. com/openstack/ tripleo- common/ blob/stable/ pike/container- images/ overcloud_ containers. yaml.j2# L1 jinja.pocoo. org/docs/ 2.10/templates/ #namespace , so as the action container_ images_ prepare does not pass a value for the parameter namespace [0][1], then Jinja2 considers that the assignation utils.Namespace and makes the substitution.
This variable name matches with a newly added class in Jinja2, the built-in namespace class: http://
{% set namespace=namespace or "tripleopike" %} refers to the built-in class jinja2.
As a consequence, all namespaces for the images contain a reference to the built-in class instead of the default value for the namespace.
An easy solution is to change the variable from namespace to docker_namespace.
[0] - https:/ /github. com/openstack/ tripleo- common/ blob/stable/ pike/workbooks/ plan_management .yaml#L271 /github. com/openstack/ tripleo- common/ blob/stable/ pike/tripleo_ common/ actions/ container_ images. py#L54
[1] - https:/