Commit Graph

910 Commits

Author SHA1 Message Date
Christian Goll
d5fc7e9320 introduce site overlays
site overlays are place in sysconfdir/overlays and take
precedence over distribution overlays with the same name.

Every `wwctl overlay` command changing overlays will create
an site overlay. distribution overlays can't be deleted or
modified with wwctl.

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-12-20 11:12:41 +01:00
Christian Goll
e8f7c01283 Merge pull request #1595 from anderbubble/removeInit
Configure nodes.conf dynamically from config
2024-12-20 11:00:27 +01:00
Jonathon Anderson
fc82244749 Refactor softlink functions to remove repetition and add flexibility
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-17 18:48:00 -07:00
Christian Goll
9ff5c60505 create soft link with template
Add the the function softlink to the template rendering, so that
{{ softlink: "/bin/bash" }} for the file `/bin/run.ww` will create
a soft link to `/bin/bash`
It's also possible to "import" soft links from the host, e.g. the
template
{{ ImportLink "/etc/localtime" }}
set the timezone from the host

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-12-17 18:48:00 -07:00
Jonathon Anderson
a80ba8ee01 Configure nodes.conf path dynamically from config
Removes the use of init() to initialize the variable.

- Closes: #1596
- See also: #1569

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-17 11:04:43 -07:00
Jonathon Anderson
c18bcfe3bd Support importing containers from directories containing a socket
- Fixes #892

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-09 11:19:48 -07:00
Jonathon Anderson
facba28e0f Rename "preferred" kernel to "default" kernel
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-09 10:02:29 +01:00
Jonathon Anderson
098c288ce2 Provide detected kernel version to overlay templates
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-09 10:02:28 +01:00
Jonathon Anderson
a844379bc5 Merge --kerneloverride into --kernelversion
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-09 10:02:28 +01:00
Jonathon Anderson
8f21d54243 Refactor kernel support
- Remove kernel imports and kmods images
- Repurpose KernelOverride as container path
- Support Kernel.Version as version prefix for kernel selection
- Compare initramfs by version

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-09 10:02:22 +01:00
Christian Goll
d584c14403 Merge pull request #1564 from anderbubble/issues/1447
Use a sentinel file to determine container readonly state
2024-12-02 09:03:02 +01:00
Jonathon Anderson
07f6402520 Use a sentinel file to determine container readonly state. #1447
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-29 10:37:52 -07:00
Jonathon Anderson
e098455f7c Fix display of profiles in node list
- Closes #1496

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-25 11:32:03 +01:00
Jonathon Anderson
5834b82f93 Format errors in logs as strings
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-23 22:47:48 -07:00
Christian Goll
8f196a9dce added test for sending grub.cfg.ww
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-11-14 19:25:48 -07:00
Christian Goll
68f62ed0a1 fix problem that tags don't show up in overlay
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-11-14 19:25:22 -07:00
Christian Goll
c0d2e3714c add tag to tags not nettag
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-11-14 17:17:43 -07:00
Jonathon Anderson
e80c639b11 Convert config to *bool
Supports leaving booleans unspecified in YAML.

Boolean methods allow the templates to continue using previous names for
boolean values.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:48 -07:00
Jonathon Anderson
b37d49d6de Support upgrading warewulf.conf
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:45 -07:00
Jonathon Anderson
393629321c Optionally replace wwinit and generic overlays during upgrade
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:41 -07:00
Jonathon Anderson
263e3959c2 Fix handling of upgrading booleans
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:40 -07:00
Jonathon Anderson
981d11a012 Initial wwctl upgrade command
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:38 -07:00
Jonathon Anderson
336577c221 Fix linter errors
Capture and generate warnings for boolean conversion errors.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:36 -07:00
Jonathon Anderson
835506f5e8 Support inserting defaults during config upgrade
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:33 -07:00
Jonathon Anderson
ff40c0fed2 Node upgrade tests
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:04 -07:00
Jonathon Anderson
fdbdf88df0 Rename NodeConf to NodesConf
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:02 -07:00
Jonathon Anderson
76acd8ff80 Rename RootConf to WarewulfYaml
Matches the new name of NodesYaml

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:01 -07:00
Jonathon Anderson
a2c778b7ee Remove ExportedYml
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:08:59 -07:00
Jonathon Anderson
1acbfc1ffa First commit of backwards-compatible config datastructures
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:08:57 -07:00
Jonathon Anderson
8a602e8a76 Return OnBoot to wwtype.WWbool
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:08:55 -07:00
Jonathon Anderson
a7325b6ffa Remove WW_INTERNAL
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:08:54 -07:00
Jonathon Anderson
ab293d88ea Fix extraneous whitespace in flag definition
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:08:52 -07:00
Jonathon Anderson
0665d5dc88 Refactor node
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:08:47 -07:00
Jonathon Anderson
8efec499a2 Revert changes to testenv and fix bmc tests
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-07 23:01:32 -07:00
Jonathon Anderson
8189390e03 Switch bmc templates from html/template to text/template
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-07 23:01:32 -07:00
Jonathon Anderson
c25eaa8855 Move default ipmi template to default profile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-07 23:01:32 -07:00
Jonathon Anderson
9ddb491ba3 Rename BmcTemplate to Template
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-07 23:01:32 -07:00
Christian Goll
0490f4c9a5 added documentation for ipmi templates
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-11-07 23:01:32 -07:00
Christian Goll
f53ae48ae6 added test for power status
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-11-07 23:01:32 -07:00
Christian Goll
4597fdfaa9 use ipmitool created from template file
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-11-07 23:01:32 -07:00
Christian Goll
10ea0ac78d use ipmi interface from node.NodeConf
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-11-07 23:01:32 -07:00
Christian Goll
0dd0317740 replaced errors.Wrap with fmt.Errorf
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-11-07 22:57:29 -07:00
Jonathon Anderson
3cbb295e7b Remove escape character from IPMI attribute list
This wasn't in the header, and usually wasn't displaying anything
anyway.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-07 22:44:50 -07:00
Jonathon Anderson
4e9b097eb6 Only output node and profile list headers once
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-07 22:44:50 -07:00
Jonathon Anderson
a3ede90093 Use "default" netname during add, set
- Closes #1499

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-07 22:40:58 -07:00
Jonathon Anderson
ad7582692c Omit the wwclient section from warewulf.conf if empty
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-06 19:07:06 -07:00
Jonathon Anderson
cec95b14f0 Update default warewulfd port to match initial configuration
We've been shipping a warewulf.conf that defines the warewulfd port as
9873, and a firewalld service that uses this port as well; but the
default value in the YAML data-structure has been 9983.

This changes the default port to 9873 to match the configuration we've
been shipping, and removes the port from the initial configuration file
(to use the default value).

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-06 19:07:05 -07:00
Christian Goll
f4308ca02d Merge pull request #1514 from anderbubble/remove-iszero
Remove unused IsZero function
2024-11-06 17:36:39 +01:00
Christian Goll
6e55a00076 Merge pull request #1478 from anderbubble/warewulfd-deadcode
Remove deadcode from warewulfd
2024-11-06 11:19:07 +01:00
Jonathon Anderson
093c74add4 Remove unused IsZero function
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-01 18:39:40 -06:00