-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix member path in hyperv
ZIP
#3524
Conversation
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as is - I did have a few questions, though.;
# the compressor embeds the input filename in its output, so | ||
# strip the .gz or .zip suffix from the uncompressed file | ||
uncompressed_path = os.path.splitext(final_img)[0] | ||
os.rename(final_img, uncompressed_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the
log.info(f"Moving {work_img} to {final_img}")
shutil.move(work_img, final_img)
from above this feels a bit like musical chairs, but I don't really see a better way.
gzip and zip both embed the input filename in the output archive, and we're currently including the compression extension (.gz or .zip) in that name. For gzip this is harmless, since gunzip ignores it unless -N is specified. For zip (currently used only in hyperv), the member filename is not ignored during decompression, so the decompressed output claims to be another ZIP file but isn't. Fix this by stripping the last filename extension from the uncompressed file before compressing.
Place the disk image at the root of the ZIP file, skipping its containing directories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@bgilbert: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
The RHCOS test has been timing out lately. Merging over red. |
The
hyperv
ZIP has two problems:.vhdx
extension, but has.vhdx.zip
instead.Fix both issues.