Bug #3611
closedThe rudder-upgrade script could be very long to execute (>5min)
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'
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
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
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 ?
Updated by Nicolas PERRON over 11 years ago
- Project changed from Rudder to 34
- Category deleted (
13)
Updated by Nicolas PERRON over 11 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset commit:442d901cb20da96cd26ab0446f9d6771bdc15489.
Updated by Jonathan CLARKE over 11 years ago
Applied in changeset commit:cb7295baa202641af8d329759c95fa5dbbffd4d3.
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)
Updated by Nicolas PERRON over 11 years ago
- Status changed from Pending release to Released
Updated by Nicolas PERRON over 11 years ago
This bug has been fixed in Rudder 2.6.3, which was released today.
Check out:
- The release announcement: http://www.rudder-project.org/pipermail/rudder-announce/2013-July/000036.html
- The full ChangeLog: http://www.rudder-project.org/foswiki/bin/view/System/Documentation:ChangeLog26
- Download information: http://www.rudder-project.org/foswiki/Download/
Updated by Benoît PECCATTE over 9 years ago
- Project changed from 34 to Rudder
- Category set to Packaging