Bug #7288
Updated by François ARMAND about 5 years ago
Sometimes we re-balance and change the policy server (relay) a node is connected to.
I have noticed the old relay's policy for the nodes do not get removed then.
<pre>
rudder-root:/var/rudder/share # ls -d /var/rudder/share/*/share/* | gawk -F/ '{print $NF}' | sort | uniq -c | grep -c -w 2
604
</pre>
=> not a unique issue.
The date is also showing this:
<pre>
drwx------ 3 root root 18 Sep 22 23:25 /var/rudder/share/9ee3f1c5-d83c-4daa-9465-2555476521fb/share/00208aa8-f4d1-11e4-b6d9-11cb081228de
drwxrwx--- 3 root root 18 Oct 17 22:38 /var/rudder/share/c49a0a1c-1100-11e5-9959-76b2081228de/share/00208aa8-f4d1-11e4-b6d9-11cb081228de
...
drwx------ 3 root root 18 Sep 23 00:00 /var/rudder/share/9ee3f1c5-d83c-4daa-9465-2555476521fb/share/0013855c-f377-11e4-b4af-33e8081228de
drwxrwx--- 3 root root 18 Oct 17 22:38 /var/rudder/share/78169036-10f9-11e5-b8f7-afb7081228de/share/0013855c-f377-11e4-b4af-33e8081228de
</pre>
When a node changes the policy server, that policy server should get the node's folder removed.
Edit FAR: Proposed solution: each policy server has a base @share@ directory (@/var/rudder/share@ for root, @/var/rudder/share/9ee3f1c5-d83c-4daa-9465-2555476521fb/share@ for relay with uuid @9ee3f1c5-d83c-4daa-9465-2555476521fb@, etc recursively). At the end of the generation, we just need to check that the base @share@ of a policy server only contains nodes directly managed by it.