Skip to content

Commit

Permalink
Merge pull request #135 from NERSC/dingp/squashing_with_top_id_fix_#134
Browse files Browse the repository at this point in the history
fix #134 use the trusted top layer id from image info
  • Loading branch information
scanon authored Dec 24, 2024
2 parents 16d5dcb + 4fdbea2 commit 85ad161
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions podman_hpc/migrate2scratch.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,11 @@ def migrate_image(self, image):
return False

img_id = img_info["id"]
top_id = img_info["layer"]
# Get the layers from the manifest
rld = self._get_img_layers(self.src, img_info["layer"])
rld = self._get_img_layers(self.src, top_id)

# make sure the src squash file exist
top_id = rld[-1]["id"]
logging.debug(f"Reading link: {top_id}")

if self.dst.chk_image(img_id):
Expand Down Expand Up @@ -468,11 +468,11 @@ def remove_image(self, image):
logging.error(f"Image {image} not found\n")
return False
img_id = img_info["id"]
top_id = img_info["layer"]
# Get the layers from the manifest
rld = self._get_img_layers(self.dst, img_info["layer"])
rld = self._get_img_layers(self.dst, top_id)

# make sure the src squash file exist
top_id = rld[-1]["id"]
ln = self.dst.read_link_file(top_id)
sqf = self.dst.get_squash_filename(ln)
if os.path.exists(sqf):
Expand Down
2 changes: 1 addition & 1 deletion podman_hpc/podman_hpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from subprocess import Popen, PIPE


__version__ = "1.1.3"
__version__ = "1.1.4"


def _round_nearest(x, a):
Expand Down

0 comments on commit 85ad161

Please sign in to comment.