From ed7fcd75e49889b5ae9ca6597a1be4dfaf263e95 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 16 Oct 2017 09:51:56 -0700 Subject: [PATCH] Don't list images for other arches as 'missing' ...But also be careful not to treat them as 'unknown' either. This avoids the ansible plays regenerating outdated images (we try to avoid that and just have the cron job do it). --- createhdds.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/createhdds.py b/createhdds.py index da6fc3d..fe798d5 100755 --- a/createhdds.py +++ b/createhdds.py @@ -60,8 +60,8 @@ def supported_arches(): """Provides a list of the arches for which virt-install images can be built on this host. """ - powerpc_arches = ['ppc64', 'ppc64le'] - intel_arches = ['i686', 'x86_64'] + powerpc_arches = ['ppc64', 'ppc64le', 'noarch'] + intel_arches = ['i686', 'x86_64', 'noarch'] if CPUARCH in powerpc_arches: supported_arches = powerpc_arches elif CPUARCH in intel_arches: @@ -93,6 +93,7 @@ class GuestfsImage(object): def __init__(self, name, size, imgver='', filesystem='ext4', label='mbr', parts=None, writes=None, uploads=None, name_extras=None): self.name = name + self.arch = 'noarch' self.size = handle_size(size) # guestfs images are never outdated self.outdated = False @@ -568,7 +569,7 @@ def check(hdds, nextrel=None): # Now determine if images are absent or outdated for img in expected: - if not os.path.isfile(img.filename): + if img.arch in supported_arches() and not os.path.isfile(img.filename): missing.append(img) continue if img.outdated: