mirror of
https://github.com/rocky-linux/createhdds.git
synced 2024-12-22 10:08:30 +00:00
Move the 'unknown' image check below the renaming gubbins
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
6fbe122c0c
commit
841fdf1ffb
@ -605,11 +605,6 @@ def check(hdds, nextrel=None):
|
|||||||
unknown = []
|
unknown = []
|
||||||
# Get the list of all 'expected' images
|
# Get the list of all 'expected' images
|
||||||
expected = get_all_images(hdds, nextrel=nextrel)
|
expected = get_all_images(hdds, nextrel=nextrel)
|
||||||
# Get the list of all present image files
|
|
||||||
files = set(fl for fl in os.listdir('.') if fl.startswith('disk') and fl.endswith('img'))
|
|
||||||
# Compare present images vs. expected images to produce 'unknown'
|
|
||||||
expnames = set(img.filename for img in expected)
|
|
||||||
unknown = list(files.difference(expnames))
|
|
||||||
|
|
||||||
# Now determine if images are absent or outdated
|
# Now determine if images are absent or outdated
|
||||||
for img in expected:
|
for img in expected:
|
||||||
@ -628,6 +623,12 @@ def check(hdds, nextrel=None):
|
|||||||
continue
|
continue
|
||||||
current.append(img)
|
current.append(img)
|
||||||
|
|
||||||
|
# Get the list of all present image files
|
||||||
|
files = set(fl for fl in os.listdir('.') if fl.startswith('disk') and (fl.endswith('img') or fl.endswith('qcow2')))
|
||||||
|
# Compare present images vs. expected images to produce 'unknown'
|
||||||
|
expnames = set(img.filename for img in expected)
|
||||||
|
unknown = list(files.difference(expnames))
|
||||||
|
|
||||||
logger.debug("Current images: %s", ', '.join([img.filename for img in current]))
|
logger.debug("Current images: %s", ', '.join([img.filename for img in current]))
|
||||||
logger.debug("Missing images: %s", ', '.join([img.filename for img in missing]))
|
logger.debug("Missing images: %s", ', '.join([img.filename for img in missing]))
|
||||||
logger.debug("Outdated images: %s", ', '.join([img.filename for img in outdated]))
|
logger.debug("Outdated images: %s", ', '.join([img.filename for img in outdated]))
|
||||||
|
Loading…
Reference in New Issue
Block a user