Project

General

Profile

Actions

Architecture #15864

open

Add an option to remove the backup of node policy at the end of policy generation

Added by Nicolas CHARLES over 1 year ago. Updated about 1 month ago.

Status:
In progress
Priority:
N/A
Category:
Performance and scalability
Target version:
Effort required:

Description

When we generate policies, we are deleting previous backup, moving previous policies to backup folder, and moving new policies to final position. This can be really long (if it's on a different mount point, it can take up to a 1/3 of the policy generation time, for instance with 10 000 nodes, it took 1200 seconds), but we need to move the previous policies out of the way to have unitary changes - ticket #16072 takes care of documenting that they should be on the same FS.
Ultimately, these backup are rarely used, so we could simply drop them async at the end of generation, so that we don't have to delete them during next policy generation, and save some disk space, time and IO - this could be done via a post generation hook

  1. remove the backup of previous policies at the end generation
    curl -k -H "X-API-Token: xxx" -X POST 'https://.../rudder/api/latest/settings/rudder_remove_previous_policies' -d "value=true"

Related issues

Related to Rudder - Bug #16072: Improve documentation in rudder-web.properties about backup folderReleasedFrançois ARMANDActions
Actions #1

Updated by Nicolas CHARLES over 1 year ago

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES
Actions #2

Updated by Nicolas CHARLES over 1 year ago

  • Description updated (diff)
  • Category deleted (Performance and scalability)
  • Target version deleted (5.0.15)
Actions #3

Updated by Nicolas CHARLES over 1 year ago

  • Category set to Performance and scalability
  • Target version set to 5.0.15
Actions #4

Updated by Nicolas CHARLES over 1 year ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/2561
Actions #5

Updated by Nicolas CHARLES over 1 year ago

  • Related to Bug #16072: Improve documentation in rudder-web.properties about backup folder added
Actions #6

Updated by Nicolas CHARLES over 1 year ago

  • Status changed from Pending technical review to In progress

it's a bit more complex than that - deleting rather than moving the old policies is not atomic, so can end up with broken policies on the node/relay if shared at the wrong time (the error windows is too large).
Note that having /var/rudder/backup on a different fs than /var/rudder/share result also in non atomic change (the move is a copy+delete)

Actions #7

Updated by Nicolas CHARLES over 1 year ago

  • Subject changed from add an option to prevent backup of node policy at the end of policy generation to Add an option to remove the backup of node policy at the end of policy generation
  • Description updated (diff)
Actions #8

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 5.0.15 to 5.0.16
Actions #9

Updated by Alexis MOUSSET about 1 year ago

  • Target version changed from 5.0.16 to 5.0.17
Actions #10

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 5.0.17 to 5.0.18
Actions #11

Updated by François ARMAND 10 months ago

  • Tracker changed from Bug to Architecture
  • Target version changed from 5.0.18 to 6.2.0~beta1
  • Priority deleted (0)
Actions #12

Updated by Vincent MEMBRÉ 7 months ago

  • Target version changed from 6.2.0~beta1 to 6.2.0~rc1
Actions #13

Updated by François ARMAND 6 months ago

  • Target version changed from 6.2.0~rc1 to 6.1.7
Actions #14

Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 6.1.7 to 6.1.8
Actions #15

Updated by Vincent MEMBRÉ 4 months ago

  • Target version changed from 6.1.8 to 6.1.9
Actions #16

Updated by Vincent MEMBRÉ 4 months ago

  • Target version changed from 6.1.9 to 6.1.10
Actions #17

Updated by Vincent MEMBRÉ about 2 months ago

  • Target version changed from 6.1.10 to 6.1.11
Actions #18

Updated by Vincent MEMBRÉ about 2 months ago

  • Target version changed from 6.1.11 to 6.1.12
Actions #19

Updated by Vincent MEMBRÉ about 1 month ago

  • Target version changed from 6.1.12 to 6.1.13
Actions

Also available in: Atom PDF