Third-party container image labels are not processed correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
High
|
Francesco Pantano |
Bug Description
During the evaluation of a third parties image that doesn't contain the expected metadata json, the image_uploader section fails with the following stacktrace:
=====
Exception: 'NoneType' object has no attribute 'keys'
Traceback (most recent call last):
File "/usr/lib/
parsed_args)
File "/usr/lib/
self.
File "/usr/lib/
env, roles_data, dry_run=True)
File "/usr/lib/
multi_
File "/usr/lib/
images, tag_from_label)
File "/usr/lib/
discover_args):
File "/usr/lib/
yield future.result()
File "/usr/lib/
return self.__get_result()
File "/usr/lib/
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/
i, image, tag_from_label, fallback_tag)
File "/usr/lib/
label_keys = ', '.join(
AttributeError: 'NoneType' object has no attribute 'keys'
==
An example is the default official grafana-server image that contains the following metadata:
{'Layers': [u'sha256:
bb9', u'sha256:
u'sha256:
itecture': u'amd64', 'Tag': 'latest', 'DockerVersion': u'18.06.0-ce', 'Name': 'docker.
ls': None, 'Os': u'linux', 'Digest': 'sha256:
.1.1', u'2.1.3', u'2.5.0', u'2.6.0', u'3.0.0-beta1', u'3.0.0-beta3', u'3.0.0-beta5', u'3.0.0-beta7', u'3.0.1', u'3.0.2', u'3.0.3-
4', u'3.1.0-beta1', u'3.1.0', u'3.1.1-
.0.2', u'4.1.0-beta1', u'4.1.0', u'4.1.1-
4.4.1', u'4.4.2', u'4.4.3', u'4.5.0-beta1', u'4.5.0', u'4.5.1', u'4.5.2', u'4.6.0-beta1', u'4.6.0-beta2', u'4.6.0-beta3', u'4.6.0', u'4.6.1', u'4.6.2', u'4.6.
3', u'4.6.4', u'4.6.5', u'5.0.0-beta1', u'5.0.0-beta2', u'5.0.0-beta3', u'5.0.0-beta4', u'5.0.0-beta5', u'5.0.0', u'5.0.1', u'5.0.2', u'5.0.3', u'5.0.4', u'5.
1.0-beta1', u'5.1.0', u'5.1.1', u'5.1.2', u'5.1.3', u'5.1.4', u'5.1.5', u'5.2.0-beta1', u'5.2.0-beta2', u'5.2.0-beta3', u'5.2.0', u'5.2.1', u'5.2.2', u'5.2.3'
, u'5.2.4', u'5.3.0-beta1', u'5.3.0-beta2', u'5.3.0-beta3', u'5.3.0', u'5.3.1', u'5.3.2', u'5.3.3', u'5.3.4', u'5.4.0-beta1', u'5.4.0', u'5.4.1', u'5.4.2', u'
5.4.3', u'5.4.4', u'6.0.0-beta1', u'6.0.0-beta2', u'6.0.0-beta3', u'6.0.0', u'6.0.1', u'6.0.2', u'6.1.0-beta1', u'6.1.0', u'6.1.1', u'6.1.2', u'6.1.3', u'6.1.
4', u'6.1.6', u'6.2.0-beta1', u'6.2.0-beta2', u'6.2.0', u'6.2.1', u'6.2.2', u'6.2.4', u'6.2.5', u'develop', u'latest', u'master']}
docker.
In this cases as the Labels has a value (None), we want to use the provided fallback tag, avoiding the whole flow to fail.
Changed in tripleo: | |
assignee: | nobody → Francesco Pantano (fmount) |
Changed in tripleo: | |
importance: | Undecided → High |
milestone: | none → train-2 |
tags: | added: stein-backport-potential |
Fix proposed to branch: master /review. opendev. org/667837
Review: https:/