wwctl container rename "materializes" profile container value into each node
I'm guessing that somehow container rename operates on the expanded node config, and writes out the new container name to each node, even if before it was configured at a profile level.
Before
nodes.conf:
profiles:
gpu:
container name: rocky-gpu
nodes:
gpn01:
profiles:
- default
- gpu
Breakit
wwctl container rename rocky-gpu rockylinux-9-gpu
After
nodes.conf:
profiles:
gpu:
container name: rockylinux-9-gpu
nodes:
gpn01:
container name: rockylinux-9-gpu
profiles:
- default
- gpu
I've never renamed a container via wwctl but I'd have assumed it'd only operate on the container and not touch the nodeconfig in any way. It seems more intuitive to be able to assume that wwctl [overlay|container|kernel] ... will never modify a node or profile, only operating on their namesake.
Thanks for the report, @epruesse! We'll check it out.
This appears to be resolved in current main.
# cat /etc/warewulf/nodes.conf
nodeprofiles:
gpu:
container name: alpine
default: {}
nodes:
gpn01:
profiles:
- default
- gpu
# wwctl container rename alpine alpine-newname
WARN : Could not remove image files for alpine: %!w(*errors.fundamental=&{Image /var/lib/warewulf/provision/container/alpine.img of container alpine doesn't exist
0x400011d6b0})
Container alpine successfully renamed as alpine-newname
cat /etc/warewulf/nodes.conf
nodeprofiles:
default: {}
gpu:
container name: alpine
nodes:
gpn01:
profiles:
- default
- gpu