Project

General

Profile

Actions

Bug #10171

closed

If the Rudder Web Interface is interrupted during the second step of reports archiving, then it won't never succeed in archiving again

Added by Nicolas CHARLES about 7 years ago. Updated about 7 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Maintenance
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

Reports archiving happens by default every day.
It's a 3 steps procedure, with:
  1. reports insertion into archivedruddersysevents from ruddersysevents
  2. deletion from ruddersysevents
  3. vaccuum

If this is interupted during step 2, then reports already moved will not be deleted, and on the following day they won't be archived (because of duplicate keys)
We should have a more robust system that would recover from where it stopped

(alternatives are to drop the unicity constraints on archivedruddersysevents, but this would lead to duplicate entries in this case)


Subtasks 1 (0 open1 closed)

Bug #10188: Spurious println introduced in parent ticketReleasedFrançois ARMANDActions

Related issues 1 (0 open1 closed)

Has duplicate Rudder - Bug #3917: Archiving reports should not break on on duplicate IDs or keyRejectedNicolas CHARLESActions
Actions #1

Updated by Nicolas CHARLES about 7 years ago

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

Updated by Nicolas CHARLES about 7 years ago

Suggested implementation
  1. get A max id of archivedruddersysevents
  2. get R min id of ruddersysevents
  3. get C max id of ruddersysevents where date < archive date
  4. insert reports from [max(R,A) to C] to archivedruddersysevents
  5. delete reports smaller than C from ruddersysevents
Actions #3

Updated by Nicolas CHARLES about 7 years ago

risk is: if insert into ruddersysevents is too long, and web interface is restarted, deletion never occurs, so we may add a delete in 3bis for all overlap

Actions #4

Updated by François ARMAND about 7 years ago

Seems good to me.

Actions #5

Updated by Nicolas CHARLES about 7 years 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/1491
Actions #6

Updated by Nicolas CHARLES about 7 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #7

Updated by Vincent MEMBRÉ about 7 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.1.18, 3.2.11, 4.0.3 and 4.1.0~beta3 which were released today.

Actions #8

Updated by François ARMAND about 7 years ago

  • Is duplicate of Bug #3917: Archiving reports should not break on on duplicate IDs or key added
Actions #9

Updated by François ARMAND about 7 years ago

  • Is duplicate of deleted (Bug #3917: Archiving reports should not break on on duplicate IDs or key)
Actions #10

Updated by François ARMAND about 7 years ago

  • Has duplicate Bug #3917: Archiving reports should not break on on duplicate IDs or key added
Actions

Also available in: Atom PDF