You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Appending to the list layers got moved outside of the if block, resulted in a reversed list of layers than the previous version v1.1.0.
This would require subsequent change of top_id = rld[-1]["id"] to top_id = rld[0]["id"].
This is the root cause of why running squashed images for multi-layer images such as ubuntu:16.04 will get something like: Error: crun: executable file /bin/bash not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found. Looking at the directory structure of $SCRATCH/storage, one would find the squash file pointing to the parent layer, not the top layer.
The version in v1.1.3
def_add_parent(layer, layer_map, layers=None, layer_ids=None):
""" Recrusive function to walk up parent graph. Inputs: layer: layer to walk layer_map: dictionary of layers by ID layers: list of layers that are being accumulated. layer_ids: accumulated dictionary of layers by ID """ifnotlayer_ids:
layer_ids=set()
ifnotlayers:
layers= []
logging.debug(f"Adding layer {layer['id']}")
layers.append(layer)
layer_ids.add(layer["id"])
if"parent"inlayerandlayer["parent"] notinlayer_ids:
parent=layer_map[layer["parent"]]
_add_parent(parent, layer_map, layers, layer_ids)
returnlayers
old version in v1.1.0
def_add_parent(layer, layers, by_id, layer_ids):
""" Recrusive function to walk up parent graph. Inputs: layer: layer to walk layers: list of layers that are being accumulated. by_id: dictionary of layers by ID layer_ids: accumulated dictionary of layers by ID """if"parent"inlayerandlayer["parent"] notinlayer_ids:
parent=by_id[layer["parent"]]
layers.append(parent)
layer_ids.add(parent["id"])
_add_parent(parent, layers, by_id, layer_ids)
The text was updated successfully, but these errors were encountered:
Had a second look, actually the e reversed order is not caused by the relocation of append call, but the initialization of layers. Old version didn’t have that initialized explicitly so it got initialized from the inner most add_parent call.
This section in v1.1.0 caused the top layer to be placed at the end the list (the fact layers.append get called after _add_parent).
Appending to the listlayers
got moved outside of theif
block, resulted in a reversed list oflayers
than the previous version v1.1.0.This would require subsequent change of
top_id = rld[-1]["id"]
totop_id = rld[0]["id"]
.This is the root cause of why running squashed images for multi-layer images such as
ubuntu:16.04
will get something like:Error: crun: executable file
/bin/bashnot found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found
. Looking at the directory structure of$SCRATCH/storage
, one would find the squash file pointing to the parent layer, not the top layer.The version in v1.1.3
old version in v1.1.0
The text was updated successfully, but these errors were encountered: