Add zstd decompression to launcher
To allow for handling compressed raw images, have the launcher automatically decompress images with a .zst extension. Change-Id: I00151aa487f7d09a9ef620a9abf61e7b21259a53
This commit is contained in:
1 parent
82df4a0822
commit
ac02c27054
2 files changed
+11
No files matched your search
@@ -116,6 +116,11 @@ FROM zuul as zuul-fingergw
|
||||
CMD ["/usr/local/bin/zuul-fingergw", "-f"]
|
||||
|
||||
FROM zuul as zuul-launcher
|
||||
# Install zstd to decompress images
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y zstd \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
CMD ["/usr/local/bin/zuul-launcher", "-f"]
|
||||
|
||||
FROM zuul as zuul-merger
|
||||
|
||||
@@ -21,6 +21,7 @@ import logging
|
||||
import os
|
||||
import random
|
||||
import socket
|
||||
import subprocess
|
||||
import threading
|
||||
import time
|
||||
import uuid
|
||||
@@ -1066,6 +1067,11 @@ class Launcher:
|
||||
for future in concurrent.futures.as_completed(futures):
|
||||
future.result()
|
||||
self.log.debug("Downloaded %s bytes to %s", size, path)
|
||||
if path.endswith('.zst'):
|
||||
subprocess.run(["zstd", "-dq", path],
|
||||
cwd=self.temp_dir, check=True, capture_output=True)
|
||||
path = path[:-len('.zst')]
|
||||
self.log.debug("Decompressed image to %s", path)
|
||||
return path
|
||||
|
||||
def getImageExternalId(self, node, provider):
|
||||
|
||||
Reference in new issue
Block a user