aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadosław Piliszek <radoslaw.piliszek@gmail.com>2019-06-13 13:38:34 +0200
committerRadosław Piliszek <radoslaw.piliszek@gmail.com>2019-06-19 19:52:38 +0200
commitbe54999eb14b7d3fb83fc4515b0e61645b217105 (patch)
tree3ac4235aa18ffc84b24887a7d359cdb92566d91b
parent86907688802f2633d165271eff08cdcdc0284b33 (diff)
downloadkolla-be54999eb14b7d3fb83fc4515b0e61645b217105.tar.gz
kolla-be54999eb14b7d3fb83fc4515b0e61645b217105.zip
Make SKIPPED_IMAGES more flexible
With introduction of new architectures, it seems reasonable to allow skipping of images based on their architecture. Additionally, the existing framework had unneccessary duplication. This commit makes the feature more flexible and cleaner. Existing skips have been programmatically rewritten. Change-Id: I34c002a0ee605ca121d9d923b256e4fe1ea3d9aa Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
-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.