Commit Graph

47 Commits

Author SHA1 Message Date
Christian Goll
4fe584547b Merge branch 'development' into wwlog-newlines 2022-10-13 14:46: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
c75f4e468c remove also the container image on delete 2022-09-14 14:42:33 +02:00
Jonathon Anderson
cac614a4b7 Correct handling of exclude patterns
Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-09-11 19:25:40 -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
Jonathon Anderson
1ed5a531bb Removed extra period from log message
I think the `.` in `uid./gid not synced` is erroneous.
2022-08-31 11:53:37 -06:00
Carter Dodd
a36467b2a8 Merge upstream 2022-05-13 19:42:18 -05: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
Christian Goll
2efcbe0348 syncucer will only write witrh syncuser switch
uid/gid are not synced at container import but checked. An apropriate
message is printed, regarding users which are not present on host.
The `wwctl container syncuser` needs the `--write` switch to actually
write to the container.

The command `wwctl container syncuser` will always operate at the
container level, but as the 'generic` overlay reads in the container
passwd/group, following two steps will update the passwd/group on a
running cluster:
1. Add passwd/group to container
wwctl container syncuser --write CONTAINER
2. Synchronize overlay
wwctl overlay build -N
2022-05-12 11:18:53 +02:00
jcsiadal
4260c97552 Fix container excludes
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-05-05 04:39:36 +00:00
Christian Goll
7f1636c9a9 created syncuids.go with code from utils.go 2022-04-06 21:44:00 +02:00
Christian Goll
61eae386af Just check syncuids on default 2022-04-06 21:44:00 +02:00
Christian Goll
1afa58ae57 Fixed wrong collision for group 0(root) 2022-04-06 21:44:00 +02:00
Christian Goll
23ba9ca61a fixed linting 2022-04-06 21:44:00 +02:00
Christian Goll
8c7fd7d140 basic function comparing uids of host/container 2022-04-06 21:44:00 +02:00
Gregory Kurtzer
ca6a805731 Sort kernel paths to find the biggest version.
Note we can do better as this is an alpha sort, so 9 is always bigger than 10.
2022-02-24 22:10:28 -08:00
Gregory Kurtzer
9edef29ebd Change exclude name to plural 2022-02-24 22:03:01 -08:00
Gregory Kurtzer
99bdc8a35a Fix issue with improper kernel version probe 2022-02-24 22:01:46 -08:00
Gregory Kurtzer
a6c793caca Fixes for kernel identification within the container 2022-02-16 04:48:17 +00:00
Gregory Kurtzer
5a0c13225e Utilize containerized kernel and remove kernel Support 2022-02-15 06:49:24 +00:00
Christian Goll
9bf492f79b moved exlucde file location and find -xdev 2022-02-03 09:48:11 +01:00
Christian Goll
2e44c51554 check if ./.ww4/exludes exist and use if 2022-01-31 15:05:11 +01:00
Gregory Kurtzer
d35f368b21 Build configs should not be globally writable (thanks Jeremy) 2022-01-19 06:01:33 +00:00
Gregory Kurtzer
8da7dd415a Extend and optimize relocatable build config infrastructure 2022-01-15 04:00:18 +00:00
jcsiadal
b515442872 Fix oci dir & some formatting
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-01-11 05:55:24 +00:00
jcsiadal
8e626e9a62 Add config option for shared state dir
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>

Changes default share to /srv/warewulf
Update specfile
Some changes to match Golang standards
2022-01-11 05:52:58 +00:00
WestleyR
4edc16953e Fix linting issues 2021-09-07 20:48:51 -07:00
Gregory Kurtzer
c60be743ba Update sources to use upstream errors package 2021-09-06 14:50:27 -07:00
Gregory Kurtzer
d9289f9f26 VNFS is current isn't an error 2021-08-20 18:43:14 -07:00
Gregory Kurtzer
4732868966 Slight modification to Yong's pigz conditional 2021-04-25 12:25:34 -07:00
Yong Qin
2e1017ca63 When available, use "pigz" to speedup compression. 2021-04-24 21:00:22 -07:00
Gregory Kurtzer
ad6dec792b Readding Yong's addition of graphdriver/copy 2021-04-23 21:49:25 -07:00
Gregory Kurtzer
72ae24c5bc Docker requirement was breaking build. 2021-04-23 19:39:02 -07:00
Yong Qin
0346d98d46 Fixed the bug with importing container/vnfs from a directory. 2021-04-07 11:25:57 -07:00
Niko Kivel
1d396df056 fixed problems with wrongly identified invalid characters 2021-03-18 11:30:33 +01:00
Gregory Kurtzer
dcea5ece28 Minor bug with removing container name if import fails. Fixed. 2021-03-06 18:32:29 -08:00
Gregory Kurtzer
431c6d6891 Renamed vnfs.go to util.go 2021-03-06 18:27:21 -08:00
Gregory Kurtzer
6357e31438 Support container import of chroot directory 2021-02-24 21:01:56 -08:00
Gregory Kurtzer
5a07ac2e14 Cleaned container.Build() return 2021-02-24 21:01:35 -08:00
Gregory Kurtzer
3998dff021 Allowed undescore character in container name 2021-02-24 21:00:15 -08:00
Ian Kaneshiro
db28555165 Support OCI registry creds
Adds support to 3 environment variables:
- WAREWULF_OCI_USERNAME: registry user username
- WAREWULF_OCI_PASSWORD: registry user password
- WAREWULF_OCI_NOHTTPS: disable tls requirements (for local registries)

Note:
	This will default to ~/.docker/config.json for credentials and other docker
configurations on the system when no options are specified.
2021-02-16 18:11:23 -08:00
Ian Kaneshiro
846b45524c Tidy up
- Ran goimports to format code and imports
- Removed unused module from go.mod
- Added .editorconfig to keep formatting standard across contributors
2021-02-16 11:54:12 -08:00
Gregory Kurtzer
62a1abaab3 Cleanups and minor fixups 2020-12-13 22:45:08 -08:00
Gregory Kurtzer
0b0efa0637 Fix minor bug WRT top level container directory not being removed 2020-12-10 20:54:15 -08:00
Gregory Kurtzer
dd1913c1de Backend for container delete 2020-12-07 19:43:56 -08:00
Gregory Kurtzer
5c995f9d0f Added Init to datastructure, fixups to container interface, and --setdefault to kernel and container build 2020-12-06 22:29:25 -08:00
Gregory Kurtzer
8c11c2b304 Renamed vnfs to container, finished VNFS and kernel refactoring 2020-12-06 00:47:00 -08:00