Is LXC property config_path incorrectly documented?

Hello,

The property config_path of lxc_container struct is described in documentation as: Full path to configuration file. Additionally, description of its get and set functions also confirm this statement (that it should resemble configuration file of a specific container).

Having this in mind, I would assume that I can use set_config_path to set this value to e.g. /home/lxc/testcontainer/config (my LXC directory is /home/lxc).
However, this case leads to is_defined function for this LXC returning false, since the set_config_path function will set configfile property (which is checked for LXC existence) to config_path/[LXC_NAME]/[CONFIG_FILE_NAME] (e.g. /home/lxc/testcontainer/config/testcontainer/config) which does not exist.

In the end I concluded that set_config_path property is not full path to config file of specific container, but full path to overall directory with subdirectories for configuration of each container.

Is this just misleading documentation, or I misunderstood something?

Thank you for any help.

In the future, when your post gets stuck in moderation, just wait for a moderator to let it through.
Continuing to re-post the same thing or create another account is just making the spam detection logic get angrier at you :slight_smile:

1 Like

doc: Fix definitions of get_config_path and set_config_path by stgraber · Pull Request #4472 · lxc/lxc · GitHub should take care of this

Thanks for the spam hint :smiley:
And bigger thanks for the confirmation and PR :slight_smile: