Commit Graph

1152 Commits

Author SHA1 Message Date
Christian Goll
dc6db3d565 using the right overlay directory and remove it
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-06-06 16:46:10 -04:00
Jonathon Anderson
05b951d78d Support dracut booting with GRUB
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-06-06 16:34:53 -04:00
xu yang
48d6b63030 Add tests for new iPXE template variables
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-06-06 03:20:12 -04:00
Jonathon Anderson
53dae60e20 New, optional dracut.ipxe configuration
dracut.ipxe boots an initramfs detected in the container image. This
required a few small changes to warewulfd and the wwinit overlay to
accommodate the dracut initramfs configuring the network interface
before wwinit:

- Include .NetDevs in the ipxe configuration template, so that dracut
  can configure interfaces with the correct names.

- Configure NetworkManager to not keep the initramfs configuration, in
  stead applying the configuration found by wwinit.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-06-06 03:20:09 -04:00
xu yang
a322061fe9 Add initramfs stage to warewulfd
The initramfs stage supports serving an initramfs image from within the
container image, typically generated by dracut.

Signed-off-by: xu yang <xyang@ciq.com>
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-06-06 03:14:21 -04:00
Christian Goll
68ca92244d wwctl configure --all calls SSH(keys)
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-06-03 19:36:01 -06:00
Jonathon Anderson
6b8ca378d8 Refactor syncuser to reduce walking the container fs
- Closes #1209

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-06-03 19:18:25 -06:00
Xu Yang
b3d8f9ccc5 add CIDR format to warewulf.conf parse
Signed-off-by: Xu Yang <xyang@ciq.com>
2024-05-31 23:36:35 -06:00
David McFarlane
41535cb8f9 Also prevent provisioning arbitrary overlays in secure mode
Signed-off-by: David McFarlane <54093156+Prepultrue@users.noreply.github.com>
2024-05-08 11:37:20 +10:00
Jonathon Anderson
7046c6dc8c Use the first configured ssh key type for authn
Previously, the authentication key was always generated using rsa. Now
it uses the first configured ssh key type.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-05-01 14:27:39 -06:00
Christian Goll
21150d2975 make created ssh keys configureable
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-05-01 14:27:39 -06:00
Christian Goll
ad6699c110 allow the user to specify ssh key types
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-05-01 14:27:36 -06:00
Jonathon Anderson
03aae1a1d9 Fix parsing of /etc/group during syncuser
- Closes #1202

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-04-30 23:27:06 -06:00
Jonathon Anderson
addde549ff Only walk the filesystem during syncuser if writing
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-04-25 14:42:56 -06:00
Christian Goll
76a40f1364 Entry is aware if its ment as a slice or not
This is needed for printing out the values, as at this part in the
code there is no access to the NodeConf and only there the information
if the Entry is ment as a slice or not is available.

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-04-19 22:28:05 -06:00
Christian Goll
fc80c4745c add various tests for wwctl node list -a
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>
2024-04-19 22:24:54 -06:00
Christian Goll
2ba9efa57c created kernel.FindKernel reduces code complexity
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-04-19 16:12:22 -06:00
Christian Goll
b192e3b5d5 fixed ShimFind for aarch64
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-04-19 16:12:21 -06:00
Christian Goll
16f5b7408e added tests for BootLoaderFindPath for x86/aarch64
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-04-19 16:10:57 -06:00
Christian Goll
5c23a4cdde added {{ .Overlay }} to templates
{{ .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>
2024-04-17 21:40:32 -06:00
Christian Goll
71f5d42942 Add a read write mutex for node status
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-04-17 12:55:02 -06:00
Xu Yang
555947529f make necessary changes for code updates
Signed-off-by: Xu Yang <xyang@ciq.com>
2024-04-04 00:17:30 -06:00
Xu Yang
2d1a39a3ee add support for rendering host tempalte
Signed-off-by: Xu Yang <xyang@ciq.com>
2024-03-25 00:55:35 -06:00
Christian Goll
17a5aaefee added more aliases for wwctl commands
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-03-20 21:11:14 -06:00
Xu Yang
5956f2e9a1 use marshalindent instead of marshal
Signed-off-by: Xu Yang <xyang@ciq.com>
2024-03-19 03:04:20 -06:00
Xu Yang
16183e603c add multiple formats support
Signed-off-by: Xu Yang <xyang@ciq.com>
2024-03-19 01:48:08 -06:00
Christian Goll
27c0297e5f fixed formating
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-03-12 19:29:01 +01:00
Timothy Middelkoop
44c8a24ba8 Merge branch 'main' into tm-wwid-raspberry-pi 2024-03-12 12:51:54 -05:00
Yong Qin
0aca225ef7 Fixed a bug with profile list when kernelargs are set with 'var=val'
format. This also removed the unnecessary '--' for the source profile
since it's never used.
2024-03-11 11:04:21 +01:00
Timothy Middelkoop
c61af786f3 Add support for machines that do not have a SMBIOS
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.

Fixes warewulf/warewulf#1108

Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
2024-03-11 10:23:51 +01:00
John Hanks
a7b5f6ac94 Drop 'tr' as a custom function. 2024-03-11 09:36:56 +01:00
John Hanks
cbf9178f10 Provide sprig functions in overlay templates 2024-03-11 09:36:52 +01:00
Timothy Middelkoop
3575132db1 Get wwid from interface not /proc/cmdline when wwid=[interface] is specified
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
2024-02-27 19:43:13 +00:00
Christian Goll
b387c86e6e contruct network from nodeInfo not NodeConf
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-02-21 10:43:59 +01:00
Christian Goll
b3638ac1ff failing test for node list without network
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-02-21 10:34:03 +01:00
Christian Goll
ff10bc95bb const string for Version, Release, Confversion
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>
2024-02-17 10:22:44 -07:00
Christian Goll
1fca0057d3 updated WW_INTERNAL to 45 for 4.5.x release
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>
2024-02-16 20:12:51 -07:00
Christian Goll
5e94766895 do not export version and rc
create also a new warewulf.conf so that the compiled
in paths are in sync with the configuration

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-02-16 17:38:34 -07:00
Christian Goll
24cb00e068 removed doubled entries form conf.Path
tftp.tftproot was also avlailable under paths.tftdir, removed
paths.tftpdir

warewulfconf.datastore was also availbale under
paths.datadir, remove paths.datadir

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-02-16 17:38:34 -07:00
Xu Yang
259c1780c5 resolve conflicts
Signed-off-by: Xu Yang <xyang@ciq.com>
2024-02-14 21:18:41 -07:00
jason yang
4072730172 add container build after container sync
Signed-off-by: jason yang <xyang@ciq.com>
2024-02-14 21:18:41 -07:00
Christian Goll
dcb21af5ba added check if commas can be set
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-02-06 23:16:59 -07:00
Xu Yang
74480ab494 fix the bug that configuration expects CIDR format
Signed-off-by: Xu Yang <xyang@ciq.com>
2024-01-30 21:20:10 -07:00
xu yang
cd0ef5c4a8 fix the issue when node edit deletes node when warewulfd is not running
Signed-off-by: xu yang <xyang@ciq.com>
2024-01-30 17:10:52 -07:00
xu yang
7746854732 Fix error when editing node
Signed-off-by: xu yang <xyang@ciq.com>
2024-01-30 17:10:52 -07:00
Jonathon Anderson
a1832ad8c1 Complete transfer of Warewulf from HPCng
Warewulf is now being maintained in its own GitHub organization at
github.com/warewulf

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-01-26 21:35:04 -07:00
jason yang
c0b9c0996a move hostlist code into internal folder
Signed-off-by: jason yang <jasonyangshadow@gmail.com>
2024-01-24 22:00:07 -07:00
jason yang
8f7b8b641b change message level from warn to debug
Signed-off-by: jason yang <jasonyangshadow@gmail.com>
2024-01-24 21:36:19 -07:00
Jonathon Anderson
69e9cf7e85 Merge pull request #1022 from JasonYangShadow/issue/583
add container rename support
2024-01-24 19:59:41 -07:00
jason yang
d0b396b89c fix tag ignored issue
Signed-off-by: jason yang <jasonyangshadow@gmail.com>
2024-01-24 15:25:48 -07:00