diff --git a/imgs/README.md b/imgs/README.md index d038dec7d16bf1d0532bd4f5c3d127b76e1b6a7b..27a5227723fc739e1859454d2ce0792e238fadc0 100644 --- a/imgs/README.md +++ b/imgs/README.md @@ -3,12 +3,12 @@ Image definitions for NSFarm This directory contains definitions of images used in NSFarm. Images define content of container used during testing. -Image is defined by existence of executable file `NAME.sh` where `NAME` is name -for image used in NSFarm. Note that this is not name used in LXD (only part of -it). This file definition suppose to be a bash script. It is run in container to -prepare image. There is also a second part of image definition and that is -directory named `NAME` here. Content of this directory is merged to container as -it is. +Image is defined by existence of file `NAME.sh` in `/imgs` directory where `NAME` +is name for image used in NSFarm. Note that this is not name used in LXD (only +part of it). This file definition suppose to be a bash script. It is run in +container to prepare image. There is also a second part of image definition and +that is directory named `NAME` here. Content of this directory is merged to +container as it is. It is expected that `NAME.sh` file has on first line shebang and on second line name of base image to be used. It is suggested to continue with comment block with @@ -30,7 +30,7 @@ This is a limitation of image name having to be a valid hostname. Base image ---------- -The base idea of images is that we can stack them on top of each other and that +The base idea of images is that we can stack images on top of each other and that makes it easier to have common base and additional scripts that do only minimal changes to it. This concept is base image. In definition file `NAME.sh` this is sourced from second line. Leading hash is expected and stripped. diff --git a/imgs/base-alpine.sh b/imgs/base-alpine.sh old mode 100755 new mode 100644 diff --git a/imgs/boot.sh b/imgs/boot.sh old mode 100755 new mode 100644 diff --git a/imgs/isp-common.sh b/imgs/isp-common.sh old mode 100755 new mode 100644 diff --git a/imgs/isp-dhcp.sh b/imgs/isp-dhcp.sh old mode 100755 new mode 100644 diff --git a/nsfarm/lxd/container.py b/nsfarm/lxd/container.py index 7a6194c38b66245d77129fa7a33dc59b07640f46..8b100d6b7ef0a8e1362c5164d792fb56e10bb97d 100644 --- a/nsfarm/lxd/container.py +++ b/nsfarm/lxd/container.py @@ -30,8 +30,6 @@ class Container(): # Verify existence of image definition if not os.path.isfile(self._fpath): raise Exception("There seems to be no file describing image: {}".format(self._fpath)) - if not os.access(self._fpath, os.X_OK): - raise Exception("The file describing image is not executable: {}".format(self._fpath)) if not os.path.isdir(self._dpath): self._dpath = None # Make sure that we are connected to LXD