Project

General

Profile

Actions

Bug #7288

open

Policy does not get deleted when changing relays

Added by Janos Mattyasovszky over 8 years ago. Updated 19 days ago.

Status:
New
Priority:
N/A
Category:
Server components
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Infrequent - complex configurations | third party integrations
Effort required:
Large
Priority:
0
Name check:
Fix check:
Regression:
No

Description

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.

rudder-root:/var/rudder/share # ls -d /var/rudder/share/*/share/* | gawk -F/ '{print $NF}' | sort | uniq -c | grep -c -w 2
604

=> not a unique issue.

The date is also showing this:

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

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.


Related issues 3 (1 open2 closed)

Related to Scale-out relay - Bug #7751: When we delete a relay, all system groups and directive related to this relay are not deletedNewElaad FURREEDANActions
Related to Rudder - Bug #8046: Change of Policy Server does not trigger a PolicyupdateRejectedFrançois ARMAND2016-03-08Actions
Related to Rudder - Question #9719: Node deletes are not properly cleaned upResolvedActions
Actions

Also available in: Atom PDF