Project

General

Profile

Actions

Bug #5569

closed

Compliance to 0 with "no reports" but Technical reports correctly arriving + log about integer out of range for executionStatus

Added by François ARMAND over 7 years ago. Updated over 7 years ago.

Status:
Released
Priority:
2
Category:
System integration
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:

Description

The migration script created to take care of #4831 does not change the type of "lastid" in the table "statusupdate", so that user are reaching the limit from an other point.

The symptoms in Rudder are:
  • you can see Technical Reports for a node
  • but its compliance is to 0, due to "no reports"

Moreover, the webapp log contains the following error message:

[2014-09-25 13:46:53] ERROR com.normation.rudder.reports.status.StatusUpdateSquerylRepository - Error while 
setting executionStatus in table StatusUpdate cause is: Exception while executing statement : ERROR: integer
out of range

The diagnosis is complete thanks to a connection to "rudder" database (psql -d rudder -U rudder -h the_db_host), then in the postgres command line:

     rudder=# \d statusupdate
          Table "public.statusupdate" 
 Column |           Type           | Modifiers 
--------+--------------------------+-----------
 key    | text                     | not null
 lastid | integer                  | not null
 date   | timestamp with time zone | not null
Indexes:
    "statusupdate_pkey" PRIMARY KEY, btree (key)

If "lastid" has type "bigint", then everything is ok. Else, like in the example, if you have "integer", then you hit the limit.

WORKAROUND

Connected in the rudder database, you can correct the problem by executing the following request:

ALTER TABLE statusupdate ALTER COLUMN lastid TYPE bigint;

Then, after a time that can be rather long (several minutes), you should start to see again correct compliance for your rules.

Actions #1

Updated by François ARMAND over 7 years ago

  • Subject changed from Missing statusupdate table in the rudder-upgrade-database migration script to Compliance to 0 with "no reports" but Technical reports correctly arriving + log about integer out of range for executionStatus
Actions #2

Updated by Jonathan CLARKE over 7 years ago

  • Assignee set to Matthieu CERDA

OK, so this "ALTER TABLE" statement needs to be run from our migration script too, then. Should be easy enough!

Actions #3

Updated by Matthieu CERDA over 7 years ago

  • Status changed from New to Pending technical review
  • Assignee changed from Matthieu CERDA to Jonathan CLARKE
  • % Done changed from 0 to 100
  • Pull Request set to https://github.com/Normation/rudder/pull/638
Actions #4

Updated by Matthieu CERDA over 7 years ago

  • Status changed from Pending technical review to Pending release
Actions #6

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.10.7 and 2.11.4, which were released today.

Actions

Also available in: Atom PDF