edf-hpc / clara

Cluster Administration tools
Other
18 stars 12 forks source link

Clara images is sensible to umask for image directory #136

Closed rezib closed 1 year ago

rezib commented 2 years ago

Clara images creates directories to save the generated diskless images:

https://github.com/edf-hpc/clara/blob/a738808af141165c192bb29a463c3f71fad26990/clara/plugins/clara_images.py#L541-L543

Unfortunately, the created directory is sensible to umask (eg. umask 0077 results in directory with mode 0700). Then the push preserves the mode of this directory, and the httpd service on remote nodes is not able to access pushed files, resulting in iPXE reporting errors, such as:

http://<server>:3137/scibian9/initrd-4.9.0-8-amd64... Operation not permitted (https://ipxe.org/410c618f)
Could not boot:

I think clara should enforce the mode of created directories to 0755.

The workaround is to manually change the mode of the created directory right after the initial creation of the image, on both the local node (where clara is run) and remote nodes (where the image is pushed).