Commit Graph

55 Commits

Author SHA1 Message Date
Jonathon Anderson
2699f2628f Bump additional dependency versions
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-03-11 09:29:51 +01:00
Jonathon Anderson
395fa2c283 Support requiring TLS for API access
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-03-09 21:48:20 -06:00
Jonathon Anderson
a886b4958b Simplify and clarify configuration
- changed "secure port" to "tls port"
- removed the --create flag for "wwctl configure tls"; made it the default behavior
- fixed a TLS creation bug in "wwctl configure --all"
- added logging to "wwctl configure tls" and "wwctl configure --all" (for the tls case)

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-03-09 21:42:26 -06:00
Jonathon Anderson
02c7d29314 Return an error from wwclient updateSystem
Avoiding calling os.Exit() directly.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-03-09 21:35:19 -06:00
Jonathon Anderson
6e85852c29 Move defer out of the for loop
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-03-09 21:35:19 -06:00
Jonathon Anderson
26cec668e6 Set an explicit minimum TLS version
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-03-09 21:35:19 -06:00
Jonathon Anderson
673d7627b5 Move TLS files from keys/ to tls/
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-03-09 21:35:19 -06:00
Christian Goll
bcf53f7efd renamed to tls instead of keys 2026-03-09 21:34:40 -06:00
Christian Goll
2f88b4c3d5 add https in wwclient and wwinit 2026-03-09 21:34:40 -06:00
Timothy Middelkoop
c99cfec1b0 IPv6: wwclient support
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
2025-11-27 02:55:34 +00:00
Jonathon Anderson
685fd0338e Use a native library for SELinux in wwclient
This removes the dependency on shelling out to commands in the image.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-11-05 12:33:18 +01:00
Jonathon Anderson
a4bde3b279 Fix "address already in use" after wwclient --once
- Closes: #2009

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-10-14 13:01:04 -06:00
Jonathon Anderson
32ca0a9170 Atomic overlay file application in wwclient
Update wwclient such that each file in the runtime overlay is applied
atomically, and only if modified.

- Closes: #1307
- Closes: #1975
- Closes: #1226

Also adds --once flag to allow wwclient to be run one time.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-08-28 07:45:35 -06:00
Christian Goll
1e54d02f70 Revert "Atomic overlay file application in wwclient"
This reverts commit 9f11b4a2b9.
2025-08-13 09:57:31 +02:00
Jonathon Anderson
9f11b4a2b9 Atomic overlay file application in wwclient
Update wwclient such that each file in the runtime overlay is applied
atomically.

- Closes: #1307
- Closes: #1975
- Closes: #1226

Also adds --once flag to allow wwclient to be run one time.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-08-12 23:16:03 -06:00
Jonathon Anderson
680ecfb3fd Minor updates to wwclient log messages
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-06-16 11:02:40 +02:00
Jonathon Anderson
9a3e48fa37 Explicitly enforce the number or arguments accepted by some wwctl subcommands. #1717
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-03-24 21:06:07 -06:00
Jonathon Anderson
e4a9018b80 wwclient uses WW_IPADDR, if set, to contact the Warewulf server.
- Closes: #1788

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-03-22 03:03:21 -06:00
Christian Goll
4c1dbfb642 Set IdleConnTimeout wwlient to 2*UpdateIntervall
Signed-off-by: Christian Goll <cgoll@suse.com>
2025-02-21 23:39:13 -07:00
Jonathon Anderson
73f34d0099 Restore server network auto-detection
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-06 20:46:20 -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
73c70da4ef Refactor url build in wwclient with url.URL
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-04 14:06:56 +02:00
Jonathon Anderson
212b57f095 Merge pull request #1309 from griznog/sanitize-wwclient-url-data
sanitize wwclient url data
2024-08-02 10:50:26 -06:00
griznog
103852df78 Sanitize/escape asset tag strings from dmidecode. 2024-08-02 09:13:47 -06:00
Tobias Poschwatta
971d9e2118 Add option for wwclient port number
With this change, you can specify a port number for wwclient.
If

  wwclient:
    port: NUMBER

is specified in warewulf.conf, wwclient will bind to the specified local
port NUMBER. If no port is specified, wwclient will use any available
port, or port 987 if secure is true.

Port 987 is in the default port range used by the Linux NFS client
(665-1023, see linux/include/linux/sunrpc/xprtsock.h). Changing
the port can avoid failures when port 987 is already in use.

Signed-off-by: Tobias Poschwatta <poschwatta@zib.de>
2024-08-02 11:09:16 +02:00
Josh Burks
790375822c wwclient: added dmidecode as a method to obtain asset-tag if smbios fails fix #1110"
Signed-off-by: Josh Burks <jeburks2@asu.edu>
2024-06-18 09:08:19 -07: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
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
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
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
Christian Goll
7ac2970d83 fix warewulf.conf location for wwclient
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-23 14:18:43 -06:00
Jonathon Anderson
70292276e2 Rename BaseConf.New to BaseConf.Get
Since BaseConf.New could return a cached BaseConf, rather than always
constructing a new struct, I've renamed it to Get to more accurately
reflect its use. A new New() method is called by Get and always
initializes a new struct.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2023-04-19 14:02:43 -06:00
Jonathon Anderson
c461e65a98 Rename pkg/warewulfconf to pkg/config
Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2023-04-19 14:02:43 -06:00
Christian Goll
ce43dfa0b7 removed getters as configs must exportable
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-06 10:20:00 +01:00
Christian Goll
b55473e1e4 added new build in vars to rest of binaries
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-03 16:21:44 +01:00
Christian Goll
377702a179 make the configuration to be based in warewulf.conf
defaults will be se by the Makefile

Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-03 16:02:41 +01:00
mslacken
ab0ee87629 updated linter and fixed deprecated stuff 2022-10-14 17:40:16 +02:00
Jonathon Anderson
0b3e862bea Remove trailing newline from wwlog
I noticed that some wwlog calls included a trailing newline, but others
did not. I tested both in isolation and discovered that the behavior was
consistent regardless of whether a trailing newline was included. I
further confirmed in code that wwlog appends a trailing newline
automatically if it is not present; so a trailing newline is unnecessary
in individual calls.

This commit removes trailing newlines from all calls to make them
consistent. It also replaces two calls to wwlog.Printf. (see #534)

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-09-15 12:38:03 -06:00
Jonathon Anderson
22910958b5 Replace all instances of wwlog.Printf
wwlog provides named loggers for each level, which requires
less code and is clearer than wwlog.Printf. The code has
included a mix of both, but this commit consolidates existing
code on the per-level functions.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-09-11 08:00:23 -06:00
Carter Dodd
379faad51d Refactor of server, logging, building of images, template updates
* Combine provision response handling, add hwaddr and interface to dhcp
* Simplify stage cases, add backward compatible uri parse
* Move control of image compression to client
* Fix kernel search path for ubuntu, buffer template generation
* Implement cpio and gz as functions, add log named functions
* Generalize fs image creation routine
* Combine daemonLogf to generalized wwlog
* Fix template newline insertion, update dhcp and hosts tmpl
* Update IPXE template to handle non-compressed files
* Update DHCP template to set network interfaces and server IP assignment
* Update DHCP/hosts templates to choose a host-name self-consistently
2022-05-13 16:52:59 -05:00
jcsiadal
8827937a9d Update for LSB compliance
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-03-09 07:32:02 +00:00
Christian Goll
9f296079a6 fixed wrong WWCLIENTLOC synatx in in-files 2022-02-14 16:19:56 +01:00
Gregory M. Kurtzer
67ee3bf5f8 Revert "Move configuration code out of wwctl" 2022-02-11 16:20:05 -08:00
jcsiadal
c9c8a683a7 Updates specfile to match distro guidelines. Suppots modifying client directory path at build time.
- Support relocating client files at build time (required for LSB compliant nodes)
- OS varable added to perform some make choices
- Saving and exporting the Makefile vars now scripted using list of variables
- Updated specfile to match RH and SUSE requirements and guidelines
- Moved /usr/local/var to /var/local; dynamic files shall not use /usr.
- State files use %sharedstatedir for path (std for SLE and RHEL)
- Release value adjusted to meet different DEB and RPM reqs.

Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-02-10 19:47:50 +00:00
Gregory Kurtzer
543609fdfc Remove spaces from asset tag 2022-02-09 20:54:07 +00:00
Christian Goll
7b2d34f317 make location of buildconf 2022-02-09 10:18:18 +01:00
Christian Goll
6d1b3c66c5 listen mutliple times on SIGHUP 2022-01-26 11:33:28 +01:00
Christian Goll
404490b756 Add sd_notify to systemd after first sync 2022-01-26 11:31:24 +01:00
Niko Kivel
5abb1fc4c7 stale pidfile handling 2022-01-26 11:30:29 +01:00