Also unify mounting of sys, run, proc, and dev as occuring within the
chroot and without bind mounts from the host.
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
The directories for the overlays needed for the bind
mount are now created under conf.Paths.WWChrootdir/$CONTAINERNAME
with the pattern $CONTAINERNAME-run-xxxxxx. This pattern can be
used as lock, so that there can't be congruent shell/exec calls
to the same container.
Signed-off-by: Christian Goll <cgoll@suse.com>
Altough getting and setting values is correct, `wwctl list -a`
will print superseded values as a list and mark them not as
superseded. Tests will fail after this commit.
Signed-off-by: Christian Goll <cgoll@suse.com>
{{ .Overlay }} contains the overlay name in which the template is
located, or an empty string if RenderTempalte is called outside the
warewulf overlay tree.
- Closes#1052
Signed-off-by: Christian Goll <cgoll@suse.com>
Try to read from "/sys/firmware/devicetree/base/serial-number" if there is no SMBIOS (Raspberry Pi Serial Number) and create a UUID from that.
Fixeswarewulf/warewulf#1108
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
The Version (e,g, 4.4 ), Release (git hash) and Confversion (e.g. 44)
must be compiled into the code so that they can't be changed during run
time and ensure this with the compiler
Signed-off-by: Christian Goll <cgoll@suse.com>
Internal version update is necessary as new structures were added,
most obviously the disk, partitions and file system structures.
Old configurations will work as expected.
Signed-off-by: Christian Goll <cgoll@suse.com>
The `mv` command is typically used to rename files in a Linux
environment, so keep that convention here for container rename.
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
The original implementation presented a warning if more than two
arguments were presented, and didn't handle the case where fewer than
two arguments were provided. This change requires precisely two
arguments and returns an error otherwise.
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
Since grub support no longer depends on a default container, no longer
automatically set default container on import.
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
Also the boot method is now configured globaly as this is
the only way to make sure that unkonwn nodes get the right
stuff
Signed-off-by: Christian Goll <cgoll@suse.com>
Writing absolute file names in testenv breaks safety that files in the
test environment are written to the designated temporary path. Adjusted
the relevant tests to use testenv.WriteFile.
Signed-off-by: Jonathon Anderson <janderson@ciq.com>