Project

General

Profile

Actions

Bug #3611

closed

The rudder-upgrade script could be very long to execute (>5min)

Added by Nicolas CHARLES over 11 years ago. Updated almost 10 years ago.

Status:
Released
Priority:
N/A
Assignee:
Jonathan CLARKE
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

When doing a rudder upgrade, the Postgres service is checked with the following command :

retry_wrapper 'su - postgres -c "psql -t -d rudder -c \"select count(id) from ruddersysevents\"" >/dev/null 2>&1' 'PostgreSQL'

This can be quite slow if the database is very very big, as it can be on large installs. We could rather check on smallish table, which would be much much faster

retry_wrapper 'su - postgres -c "psql -t -d rudder -c \"select count(id) from eventlog\"" >/dev/null 2>&1' 'PostgreSQL'

Actions #1

Updated by Nicolas PERRON over 11 years ago

It could be done in Rudder 2.7.0~beta2

You're right when saying that ruddersysevents could be too heavy but why use eventlog:

time su - postgres -c "psql -t -d rudder -c \"select count(id) from ruddersysevents\"" 
 2165394

real    0m15.644s
user    0m0.044s
sys    0m0.004s
time su - postgres -c "psql -t -d rudder -c \"select count(id) from eventlog\"" 
  3958

real    0m0.966s
user    0m0.028s
sys    0m0.040s

Don't we want to use tables with less entries like groups or rules ?

time su - postgres -c "psql -t -d rudder -c \"select count(ruleid) from rules\"" 
   209

real    0m0.070s
user    0m0.032s
sys    0m0.012s
Actions #2

Updated by Nicolas PERRON over 11 years ago

  • Assignee set to Nicolas PERRON
  • Target version set to 2.6.3

Hmm...it could be considered as a bug since the rudder-upgrade script (adn so ,the update of rudder-webapp package) could take more than 5 minutes.

Nicolas agreed with the use of rules instead of ruddersysents

Actions #3

Updated by Nicolas PERRON over 11 years ago

  • Status changed from New to Pending technical review
  • Assignee changed from Nicolas PERRON to Jonathan CLARKE
  • % Done changed from 0 to 100
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/86

Pull Request URL added: https://github.com/Normation/rudder-packages/pull/86

Jon, could you review it please ?

Actions #4

Updated by Nicolas PERRON over 11 years ago

  • Project changed from Rudder to 34
  • Category deleted (13)
Actions #5

Updated by Nicolas PERRON over 11 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:442d901cb20da96cd26ab0446f9d6771bdc15489.

Actions #6

Updated by Jonathan CLARKE over 11 years ago

Applied in changeset commit:cb7295baa202641af8d329759c95fa5dbbffd4d3.

Actions #7

Updated by Nicolas PERRON over 11 years ago

  • Subject changed from The rudder-upgrade script uses a Postgres query that can be very long to check postgres to The rudder-upgrade script could be very long to execute (>5min)
Actions #8

Updated by Nicolas PERRON over 11 years ago

  • Status changed from Pending release to Released
Actions #9

Updated by Nicolas PERRON over 11 years ago

This bug has been fixed in Rudder 2.6.3, which was released today.
Check out:

Actions #10

Updated by Benoît PECCATTE almost 10 years ago

  • Project changed from 34 to Rudder
  • Category set to Packaging
Actions

Also available in: Atom PDF