Bug #3611
closed
The rudder-upgrade script could be very long to execute (>5min)
Added by Nicolas CHARLES over 11 years ago.
Updated over 9 years ago.
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'
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
- 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
- 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
- Project changed from Rudder to 34
- Category deleted (
13)
- Status changed from Pending technical review to Pending release
Applied in changeset commit:442d901cb20da96cd26ab0446f9d6771bdc15489.
Applied in changeset commit:cb7295baa202641af8d329759c95fa5dbbffd4d3.
- 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)
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.6.3, which was released today.
Check out:
- Project changed from 34 to Rudder
- Category set to Packaging
Also available in: Atom
PDF