Actions
Architecture #7831
openSimplify usage and copy of ncf directories
Status:
New
Priority:
N/A
Assignee:
-
Category:
System techniques
Target version:
Pull Request:
Effort required:
Name check:
Fix check:
Regression:
Description
Currently, we use several different directories for ncf on root servers, relay servers and nodes:
- /usr/share/ncf/tree
- ncf is installed here on the root server, from a package
- this directory is shared for nodes and relay servers to copy from
- nodes and relay servers copy this directory to their local /var/rudder/ncf/common
- relay servers copy this directory to their local /usr/share/ncf/tree (yes, that's two identical but separate copies of the same directory to relay servers)
- /var/rudder/ncf/common
- /usr/share/ncf/tree is copied into this directory by the agent, in update.cf so before a normal run
- this directory is used to read the bundles in from promises.cf so during a normal run
- /var/rudder/configuration-repository/ncf
- the local instance of ncf is instanciated here, in particular the local configuration file ncf.conf
- the technique editor creates and modifies techniques here
- this directory is shared for nodes and relay servers to copy from
- nodes and relay servers copy this directory to their local /var/rudder/ncf/local
- relay servers copy this directory to their local /var/rudder/configuration-repository/ncf (yes, that's two identical but separate copies of the same directory to relay servers)
- /var/rudder/ncf/local
- /var/rudder/configuration-repository/ncf is copied into this directory by the agent, in update.cf so before a normal run
- this directory is used to read the bundles in from promises.cf so during a normal run
We can largely simplify this.
Initial discussions showed several key points that we would like to achieve in simplifying this:- Simplify the copy mechanism so that all nodes, including relay and root servers, use the same directory for each item
- Avoid duplication so that directories don't exist twice with identical contents on each folder
- Avoid delays introduced by copying from one directory to another locally before a remote copy
- Keep /usr/share/ncf/tree as the installation directory, but don't share it any longer.
- Copy this directory on installation (in rudder-upgrade, and possibly rudder-init) to /var/rudder/configuration-repository/ncf.d/common
- Move /var/rudder/configuration-repository/ncf to /var/rudder/configuration-repository/ncf.d/local
- Suppress /var/rudder/ncf/local completely, and share /var/rudder/configuration-repository/ncf.d/local instead
- Configure both relay servers and nodes to only copy the /var/rudder/configuration-repository/ncf.d/ directory
- Change all promises to read ncf bundles from /var/rudder/configuration-repository/ncf.d/ only
Actions