drakkar-lig / walt-python-packages

Home of walt-node, walt-server, walt-client and walt-common python packages.
https://walt-project.liglab.fr
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

WalT server crashes when an image reaches its peak number of layers #32

Closed sandikkaya closed 4 years ago

sandikkaya commented 5 years ago

The WalT images are built based on Docker images. A docker image, by definition has a base layer and numerous layers, which each of them is generated automatically with manipulative command executions.

See https://stackoverflow.com/questions/31222377/what-are-docker-image-layers See https://stackoverflow.com/questions/39382518/whats-the-reason-for-the-42-layer-limit-in-docker

The manipulations are added to an image without further commands in WalT right after an image is changed either by copying files into the image via walt image cp <local_path> <image:tag:image_path> or by executing a series of commands via walt image shell.

When the maximum number of layers are reached, WalT server crashes unexpectedly. The expected behavior is either (1) merging manipulative layers to build a new base without any further interaction or (2) introduce a walt image squash <layered-image-name> <squashed-image-name> commad which may behave similar to docker --squash command.

First one has the disadvantage of modifying users' layers without prior notice. Second one requires a warning message when number of layers are more than some predetermined value.