Architecture #2603
closedAdd new table for archived reports when migrating to Rudder 2.4
Description
On Rudder 2.4, If I try to go to database management (Administration -> Database Management) , the page only show this message (http://orchestrateur-3.labo.normation.com/rudder/secure/administration/databaseManagement) :
Something unexpected happened while serving the page at /secure/administration/databaseManagement
On the /var/log/rudder/webapp/xxxxxxx.stderrout.log:
18:34:59.557 [qtp132616134-72] ERROR net.liftweb.http.LiftRules - Exception being returned to browser when processing Req(List(), Map(), ParsePath(List(secure, administration, databaseManagement),,true,false), /rudder, GetRequest, Empty) org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [select executiondate, nodeid, ruleid, directiveid, serial, component, keyValue, executionTimeStamp, eventtype, policy, msg from archivedruddersysevents where 1=1 order by executionTimeStamp asc limit 1]; nested exception is org.postgresql.util.PSQLException: ERREUR: la relation « archivedruddersysevents » n'existe pas
Updated by Jonathan CLARKE over 12 years ago
- Status changed from New to Discussion
- Assignee changed from Nicolas CHARLES to Nicolas PERRON
- Target version changed from 2.4.0~beta1 to 2.4.0~beta2
Nicolas, I don't get this error on a fresh installation of Rudder 2.4 (snapshot from last night). Can you confirm you're on a recent version and this still occurs?
Updated by Nicolas PERRON over 12 years ago
I've updated to the nightly version and the error is still here.
It seems that "archivedruddersysevents" doesn't exist on my Rudder server.
On my server:
You are now connected to database "rudder". rudder=# \d List of relations Schema | Name | Type | Owner --------+----------------------+----------+-------- public | directives | table | rudder public | directivesid | sequence | rudder public | eventlog | table | rudder public | eventlogidseq | sequence | rudder public | expectedreports | table | rudder public | expectedreportsnodes | table | rudder public | groups | table | rudder public | groupsid | sequence | rudder public | migrationeventlog | table | rudder public | migrationeventlogid | sequence | rudder public | nodes | table | rudder public | nodesid | sequence | rudder public | ruddersysevents | table | rudder public | rules | table | rudder public | rulesdirectivesjoin | table | rudder public | ruleserialid | sequence | rudder public | rulesgroupjoin | table | rudder public | rulesid | sequence | rudder public | ruleversionid | sequence | rudder public | serial | sequence | rudder (20 rows)
On a fresh install:
rudder=# \d List of relations Schema | Name | Type | Owner --------+-------------------------+----------+-------- public | archivedruddersysevents | table | rudder public | directives | table | rudder public | directivesid | sequence | rudder public | eventlog | table | rudder public | eventlogidseq | sequence | rudder public | expectedreports | table | rudder public | expectedreportsnodes | table | rudder public | groups | table | rudder public | groupsid | sequence | rudder public | migrationeventlog | table | rudder public | migrationeventlogid | sequence | rudder public | nodes | table | rudder public | nodesid | sequence | rudder public | ruddersysevents | table | rudder public | rules | table | rudder public | rulesdirectivesjoin | table | rudder public | ruleserialid | sequence | rudder public | rulesgroupjoin | table | rudder public | rulesid | sequence | rudder public | ruleversionid | sequence | rudder public | serial | sequence | rudder (21 rows)
Updated by Jonathan CLARKE over 12 years ago
- Assignee changed from Nicolas PERRON to Nicolas CHARLES
Does this table need creating by a migration script?
Updated by Nicolas CHARLES over 12 years ago
- Assignee changed from Nicolas CHARLES to Nicolas PERRON
Sure it does, the script is this one :
rudder/rudder-core/src/main/resources/Migration/dbMigration-2.3-2.4-archive.sql
Isn't it included in the packaging?
Updated by Jonathan CLARKE over 12 years ago
- Tracker changed from Bug to User story
- Subject changed from Error appear at Database Management page on Rudder 2.4 to Add new table for archived reports when migrating to Rudder 2.4
- Status changed from Discussion to 2
Nicolas CHARLES wrote:
Sure it does, the script is this one :
rudder/rudder-core/src/main/resources/Migration/dbMigration-2.3-2.4-archive.sql
Isn't it included in the packaging?
No. This file seems to have been added in a commit for #2381 but there was never any mention of including it in packaging.
Nicolas, can you please implement this with a sensible check?
Updated by Jonathan CLARKE over 12 years ago
- Target version changed from 2.4.0~beta2 to 2.4.0~beta1
This is blocking for the beta1 release.
Updated by Nicolas PERRON over 12 years ago
- Status changed from 2 to Pending technical review
- % Done changed from 0 to 100
Applied in changeset commit:3faeb8d0e230fda3d05b030824197d2057bf900b.
Updated by Jonathan CLARKE over 12 years ago
- Status changed from Pending technical review to 10
Looks good to me - thanks for the quick fix Nicolas.
Updated by Jonathan CLARKE over 12 years ago
- Tracker changed from User story to Architecture
- Status changed from 10 to Released