Commit Graph

110 Commits

Author SHA1 Message Date
Christian Goll
09f00b9cac fix typo for opening defaults.conf 2023-01-04 14:23:47 +01:00
Jonathon Anderson
423e319bf4 Add --- to the head of FallBackConf
Why have I done this?

- Because defaults.conf had a starting newline, which bugs me.
- Because moving the first line of FallBackConf looks unlovely.
- Because yaml happens to have a --- document-start syntax.

I completely agree that this is (hopefully) a no-op change;
but if anyone else thinks it makes things aesthetically more
pleasing, and agrees that it doesn't break anything, go ahead
and merge. ^_^

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-12-13 17:48:38 -07:00
Christian Goll
f7b67b93a3 need ipxe template in defaults 2022-11-30 15:33:07 +01:00
Christian Goll
4fe584547b Merge branch 'development' into wwlog-newlines 2022-10-13 14:46:03 +02:00
Christian Goll
7b958984c8 constant net naming scheme and NetworkManager rule
Apperently the rules in /etc/systemd/network are not
honored by NetworkManager which loads earlier than
systemd-networkd, so adding a rule for NetworkManager
2022-10-06 17:37:38 +02:00
Christian Goll
91e032d7a2 added code for setting default values for NetDev 2022-09-30 16:12:03 +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
Christian Goll
efd761f7c3 Read the defaults for anode from defaults.conf 2022-09-15 11:14:26 +02: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
Christian Goll
18eb531d4b fixed deletion of network and deletion of tags 2022-09-02 16:45:37 +02:00
Christian Goll
0ca17dd454 using functor for Get and GetReal 2022-08-16 15:38:07 +02:00
Christian Goll
f744934122 fixed linting 2022-08-12 15:52:38 +02:00
Christian Goll
02d47e8f11 automatic add primary for single netdev 2022-08-12 15:41:57 +02:00
Christian Goll
b2dc31e20b fixed mergin profiles into nodes 2022-08-12 09:30:16 +02:00
Christian Goll
8c2d40881d use reflect on overlays 2022-08-10 17:09:10 +02:00
Christian Goll
41d12888ab reflections for unmarshal 2022-08-10 14:16:48 +02:00
Christian Goll
d819eef792 tags for ipmi and kernel 2022-08-04 20:07:24 +02:00
Christian Goll
ba46e34a4d merging profile update 2022-08-03 14:49:50 +02:00
Christian Goll
ed5b2bbf35 using tag instead of key 2022-08-03 13:44:12 +02:00
Christian Goll
96731a4b87 node list imporvement 2022-08-03 11:47:25 +02:00
Christian Goll
b548d8583d reflection on constructor 2022-08-03 11:28:15 +02:00
Christian Goll
1dd519a7e6 clean up and linting fix 2022-07-18 15:04:38 +02:00
Christian Goll
e6ef30ed53 porfile add has now all otions of set 2022-07-15 11:10:12 +02:00
Christian Goll
29573e26ad added more values 2022-07-07 11:39:02 +02:00
Christian Goll
9796e61678 Merge pull request #469 from mslacken/fix-468
fix nil map for networks
2022-07-06 21:38:55 +02:00
MatthewHink
d8cd6049ac Initial cut of wwapi.
We need an API for Warewulf in order to automate around it. The initial version of the API will look a lot like wwctl. wwctl will call the API so that we do not need to maintain separate code paths. In this preview wwctl calls the API via direct function call, but we can change that to a gprc or REST call to a Warewulf server in the future.

This commit contains:
wwapid WareWulf API Daemon. A grpc server with mTLS auth.
wwapic WareWulf API Client. A grpc client with mTLS auth. It's just a sample that reads the version from the server.
wwapird WareWulf API Rest Daemon. A http REST reverse proxy to wwapid.
There are also sample insecure and secure curls to test with.

Implemented Functionality:
wwctl node add
wwctl node delete
wwctl node list
wwctl node set
wwctl node status
wwctl container build
wwctl container delete
wwctl container import
wwctl container list
wwctl container show

Some notes on the files:

    Logic that was in wwctl has moved to warewulf/internal/pkg/api. wwctl just calls the API. wwctl functionality is unchanged.
    Everything under the /google directory is copied google proto code to stand up wwapird. It's a bit strange to copy in the code, but that is currently how it's done.
    Everything in warewulf/internal/pkg/api/routes/wwapiv1 is generated code.

There are some loose ends here, such as no service installers. I just ran off the command line for development.
The Makefile could use improvement. I'm building by make clean setup proto all build wwapid wwapic wwapird ; echo $?
I copied the configs from warewulf/etc to /usr/local/etc/warewulf manually.
2022-06-24 08:39:30 -07:00
Christian Goll
a13a00a03d fix nil map for networks 2022-06-24 17:20:47 +02:00
Christian Goll
80c92475b0 added backwards compatibilty for default 2022-05-12 11:51:00 +02:00
jcsiadal
9b6b93a5cb Rename default to primary in src
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-05-05 03:13:21 +00:00
Christian Goll
e29aea8ae3 using stirng for ipmiwrite storage 2022-04-14 12:50:38 +02:00
Christian Goll
b3cf1dea6b setaltb for ipmi write 2022-04-14 11:47:34 +02:00
Christian Goll
2e9848fa5c do not unmarshall deprecated yaml 2022-04-14 11:27:09 +02:00
mslacken
f68c0a3633 add backward compatiblity for old yaml syntax 2022-04-14 09:33:30 +02:00
jcsiadal
bc0039eecd Remove redundant line
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-04-13 18:44:52 +00:00
jcsiadal
8568599627 Convert MACs to lowercase on set
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-04-13 18:40:55 +00:00
Christian Goll
4782d7e726 fixup profile handling 2022-04-11 14:41:43 +02:00
Christian Goll
ae2b1ce2ae check for nil vaule of Kernel and Impi 2022-04-08 15:06:40 +02:00
Christian Goll
197c663a97 memory for Ipmi and Kernel Entry FindAllProfiles 2022-04-08 15:01:14 +02:00
Christian Goll
49bb9a40f0 reserve memory ofr kernel and ipmi entry 2022-04-08 14:47:19 +02:00
MatthewHink
3c01728aa5 Fix 365. Nil checks around pointers in nodes.conf. 2022-04-07 16:32:26 -04:00
Christian Goll
95050a44ce add user defined keys for networks/netdev
Every network in the profile and for the nodes can have induvidual keys values
pairs, called Tags, which are propergated to the templates. So they can be used
for things like MTU size like
  `wwct node set node01 --nettag mtu=9000`
and in in ifcfg.xml.ww
```
{{ if $netdev.Tags.mtu -}}
<mtu> {{ $netdev.Tags.mtu }} </mtu>
{{ end -}}
```
2022-04-06 21:36:17 +02:00
Christian Goll
16fa2518fa set not ipv6 if no ipv4 present 2022-04-06 21:36:17 +02:00
jcsiadal
bd3edb9e7f Udated constructors/mods
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-04-04 16:13:09 +00:00
Christian Goll
c0f7ecf357 store the ovelats as yaml list 2022-03-24 19:45:51 +01:00
Christian Goll
10b5f606d4 set default value for gateway 2022-03-21 11:29:49 +01:00
Christian Goll
55bf1695de initial commit of simple ipv6 support
As soon as in warewulf.conf a value for ipaddr6 is defined
all nodes will get a derived ipv6 address if not the ipv6
is not explicitly set.
2022-03-15 15:57:35 +01:00
Christian Goll
5ac75661c9 Only write to IPMI if this is explictly wanted 2022-03-02 21:24:05 +01:00
Gregory M. Kurtzer
b11f3f7228 Merge pull request #313 from mslacken/single-netdev
For just one netdev make it the default
2022-02-27 19:02:53 -08:00
Gregory M. Kurtzer
88832420ca Merge pull request #306 from gmkurtzer/container_kernel_integration
Utilize containerized kernel by default
2022-02-27 18:03:25 -08:00
Christian Goll
704248f2da For just one netdev make it the default 2022-02-17 10:35:03 +01:00