aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2019-06-25 08:29:16 +0000
committerGerrit Code Review <review@openstack.org>2019-06-25 08:29:16 +0000
commit2777a0c0584e4c707c56ca6aaa8cf2f41a473a83 (patch)
tree4ff7c7d746822d6be69fa1fd8192ce0621cb4c7a
parent74ad749da540145c24174d16f48f354718d6d67a (diff)
parentbe54999eb14b7d3fb83fc4515b0e61645b217105 (diff)
downloadkolla-2777a0c0584e4c707c56ca6aaa8cf2f41a473a83.tar.gz
kolla-2777a0c0584e4c707c56ca6aaa8cf2f41a473a83.zip
Merge "Make SKIPPED_IMAGES more flexible"
-rwxr-xr-xkolla/image/build.py123
-rw-r--r--releasenotes/notes/more-flexible-image-skipping-8e1320ed78976026.yaml5
2 files changed, 48 insertions, 80 deletions
diff --git a/kolla/image/build.py b/kolla/image/build.py
index d4dbf447c..4e37677d3 100755
--- a/kolla/image/build.py
+++ b/kolla/image/build.py
@@ -76,9 +76,15 @@ STATUS_SKIPPED = 'skipped'
STATUS_ERRORS = (STATUS_CONNECTION_ERROR, STATUS_PUSH_ERROR,
STATUS_ERROR, STATUS_PARENT_ERROR)
-
+# The dictionary of skipped images supports keys in the format:
+# '<distro>+<installation_type>+<arch>' where each component is optional
+# and can be omitted along with the + separator which means that component
+# is irrelevant. Otherwise all must match for skip to happen.
SKIPPED_IMAGES = {
- 'centos+binary': [
+ 'source': {
+ "tripleoclient",
+ },
+ 'binary': {
"almanach-base",
"bifrost-base",
"blazar-base",
@@ -90,115 +96,65 @@ SKIPPED_IMAGES = {
"monasca-base",
"monasca-thresh",
"nova-mksproxy",
- "ovsdpdk",
"qinling-base",
"searchlight-base",
"solum-base",
"vmtp",
"zun-base",
- ],
- 'centos+source': [
+ },
+
+ 'centos': {
"ovsdpdk",
- "tripleoclient",
- ],
- 'ubuntu+binary': [
- "almanach-base",
- "bifrost-base",
- "blazar-base",
+ },
+ 'oraclelinux': {
+ "ovsdpdk",
+ },
+ 'debian': {
+ "sensu-base",
+ },
+ 'ubuntu': {
+ "qdrouterd", # There is no qdrouterd package for ubuntu bionic
+ },
+
+ 'debian+binary': {
"cloudkitty-base",
"congress-base",
- "cyborg-base",
- "dragonflow-base",
"ec2-api",
- "freezer-base",
"heat-all",
"ironic-neutron-agent",
- "karbor-base",
- "kuryr-base",
"mistral-event-engine",
- "monasca-base",
- "monasca-thresh",
- "nova-mksproxy",
"novajoin-base",
"octavia-base",
- # There is no qdrouterd package for ubuntu bionic
- "qdrouterd",
- "qinling-base",
- "searchlight-base",
- "solum-base",
"tacker-base",
"tripleoclient",
"vitrage-base",
- "vmtp",
"zaqar",
- "zun-base",
- ],
- 'ubuntu+source': [
+ },
+ 'debian+source': {
"cyborg-base",
- # There is no qdrouterd package for ubuntu bionic
- "qdrouterd",
- "tripleoclient",
- ],
- 'debian+binary': [
- "almanach-base",
+ },
+
+ 'oraclelinux+source': {
"bifrost-base",
- "blazar-base",
+ },
+
+ 'ubuntu+binary': {
"cloudkitty-base",
"congress-base",
- "cyborg-base",
- "dragonflow-base",
"ec2-api",
- "freezer-base",
"heat-all",
"ironic-neutron-agent",
- "karbor-base",
- "kuryr-base",
"mistral-event-engine",
- "monasca-base",
- "monasca-thresh",
- "nova-mksproxy",
"novajoin-base",
"octavia-base",
- "qinling-base",
- "searchlight-base",
- "sensu-base",
- "solum-base",
"tacker-base",
"tripleoclient",
"vitrage-base",
- "vmtp",
"zaqar",
- "zun-base"
- ],
- 'debian+source': [
- "cyborg-base",
- "sensu-base",
- "tripleoclient",
- ],
- 'oraclelinux+binary': [
- "almanach-base",
- "bifrost-base",
- "blazar-base",
+ },
+ 'ubuntu+source': {
"cyborg-base",
- "dragonflow-base",
- "freezer-base",
- "karbor-base",
- "kuryr-base",
- "monasca-base",
- "monasca-thresh",
- "nova-mksproxy",
- "ovsdpdk",
- "qinling-base",
- "searchlight-base",
- "solum-base",
- "vmtp",
- "zun-base"
- ],
- 'oraclelinux+source': [
- "bifrost-base",
- "ovsdpdk",
- "tripleoclient",
- ]
+ },
}
@@ -1035,8 +991,15 @@ class KollaWorker(object):
for image in self.images:
image.status = STATUS_MATCHED
- skipped_images = SKIPPED_IMAGES.get('%s+%s' % (self.base,
- self.install_type))
+ # Unmatch (skip) unsupported images
+ tag_element = r'(%s|%s|%s)' % (self.base,
+ self.install_type,
+ self.base_arch)
+ tag_re = re.compile(r'^%s(\+%s)*$' % (tag_element, tag_element))
+ skipped_images = set()
+ for set_tag in SKIPPED_IMAGES:
+ if tag_re.match(set_tag):
+ skipped_images.update(SKIPPED_IMAGES[set_tag])
if skipped_images:
for image in self.images:
if image.name in skipped_images:
diff --git a/releasenotes/notes/more-flexible-image-skipping-8e1320ed78976026.yaml b/releasenotes/notes/more-flexible-image-skipping-8e1320ed78976026.yaml
new file mode 100644
index 000000000..1bf0a09c9
--- /dev/null
+++ b/releasenotes/notes/more-flexible-image-skipping-8e1320ed78976026.yaml
@@ -0,0 +1,5 @@
+---
+features:
+ - |
+ Kolla skipped images feature is now more flexible, allowing filtering
+ based on used image distribution, installation type and processor architecture.