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 9 years ago. Updated over 9 years ago.

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

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

Also available in: Atom PDF