Function not implemented (os error 38) while trying to link directory
Describe the bug
When trying to link a file that is not immediately under /etc, I get the error:
[2025-05-09T15:44:26Z INFO system_manager] Creating symlink: /etc/pve/qemu-server/505.conf -> ./../../.system-manager-static/pve/qemu-server/505.conf
[2025-05-09T15:44:26Z ERROR system_manager::activate::etc_files] Error while trying to link directory /etc/.system-manager-static/pve/qemu-server: Function not implemented (os error 38)
My config looks like:
environment = {
etc = {
"pve/storage.cfg".text = "...";
"pve/qemu-server/101.conf".source = ./101.conf;
"pve/qemu-server/505.conf".source = ./505.conf;
};
};
The (same) error occurs with all files under a directory. Note that both "pve" and "pve/qemu-server" are already-existing directories.
To Reproduce
Steps to reproduce the behavior:
- Create a nested file like
environment.etc."mydir/myfile".text = .... - Apply the configuration
Expected behavior
The nested "myfile" is created under "mydir". In my case, "mydir" already exists.
System information
system-manager 0.1.0 running on Proxmox 8.4.0
I've got a similar error where config shares the same parent path, but presents slightly differently. For me the parent directory doesn't exist, so activate symlinks the whole parent directory... then tries to descend the tree symlinking the sub dirs and files.
The problem is that it's already symlinked the whole tree, so it's now just trying to create links from the path of the original files to themselves. Erroring out saying it's found existing unmanaged files... for the files it's just created.
For us though, a workaround was to pre create the parent directories so that it doesn't try symlinking the parent directory. Then everything works as expected.
So it's a little different than your issue @szethh but maybe this will help diagnose the issues with this part of the code?