Errors when running MAM 9.1 migration script


Issue:  When running the MAM migration script to make the step from 9.0 to 9.1 (migrate_9.0-9.1.pl) I get errors stating that JSON:Integer is not a valid value for DataType.

 

***Modifying Attribute DataType Values to include JSON***
Subcommand (mam-shell -v Attribute Modify Object==Attribute Name==DataType Values=\"\(AutoGen,Boolean,Currency,Float,Integer,JSON\(:\\w+\)?,String,TimeStamp\)\") returned with rc=0:
Object Name DataType PrimaryKey Required Fixed Values DefaultValue Sequence Hidden Description
--------- -------- -------- ---------- -------- ----- -------------------------------------------------------------------- ------------ -------- ------ -----------
Attribute DataType String False False True (AutoGen,Boolean,Currency,Float,Integer,JSON(:w+)?,String,TimeStamp) String 30 False Data Type
Successfully modified 1 attribute

***Creating new UsageRecord Resources Attribute***
Subcommand (mam-shell -v Attribute Create Object=UsageRecord Name=Resources DataType=JSON:Integer Description="\"Generic Resources\"" Sequence=180 NoRefresh:=True) returned with rc=185:
JSON:Integer is not a valid value for DataType
Subcommand (mam-shell -v Attribute Create Object=UsageRecord Name=Resources DataType=JSON:Integer Description="\"Generic Resources\"" Sequence=180 NoRefresh:=True) failed with rc=185: JSON:Integer is not a valid value for DataType

***Creating new UsageRecord Licenses Attribute***
Subcommand (mam-shell -v Attribute Create Object=UsageRecord Name=Licenses DataType=JSON:Integer Description="\"Licenses Used\"" Sequence=190 NoRefresh:=True) returned with rc=185:
JSON:Integer is not a valid value for DataType
Subcommand (mam-shell -v Attribute Create Object=UsageRecord Name=Licenses DataType=JSON:Integer Description="\"Licenses Used\"" Sequence=190 NoRefresh:=True) failed with rc=185: JSON:Integer is not a valid value for DataType

***Creating new UsageRecord Metrics Attribute***
Subcommand (mam-shell -v Attribute Create Object=UsageRecord Name=Metrics DataType=JSON:Float Description="\"Generic Metrics\"" Sequence=200 NoRefresh:=True) returned with rc=185:
JSON:Float is not a valid value for DataType
Subcommand (mam-shell -v Attribute Create Object=UsageRecord Name=Metrics DataType=JSON:Float Description="\"Generic Metrics\"" Sequence=200 NoRefresh:=True) failed with rc=185: JSON:Float is not a valid value for DataType

***Creating new UsageRecord Variables Attribute***
Subcommand (mam-shell -v Attribute Create Object=UsageRecord Name=Variables DataType=JSON:String Description="\"Job Variables\"" Sequence=210 NoRefresh:=True) returned with rc=185:
JSON:String is not a valid value for DataType
Subcommand (mam-shell -v Attribute Create Object=UsageRecord Name=Variables DataType=JSON:String Description="\"Job Variables\"" Sequence=210 NoRefresh:=True) failed with rc=185: JSON:String is not a valid value for DataType

***Creating new UsageRecord RequestedDuration Attribute***
Subcommand (mam-shell -v Attribute Create Object=UsageRecord Name=RequestedDuration DataType=Integer Description="\"Requested Wallclock Time in seconds\"" Sequence=230 NoRefresh:=True) returned with rc=0:
Object Name

 

Cause:  This is caused by PostgreSQL not having standard_conforming_strings enabled.  It is not on by default in PostgreSQL 9.1 and earlier and will have to be enabled.  Later versions should not have this problem.

 

Solution:  You will have to have to enable this in your postgresql.conf file.

vi /var/lib/pgsql/data/postgresql.conf
                
standard_conforming_strings = on

 

Then restart postgres and rerun the migration script.

 

Tags: accounting, database, migrate, MySQL, postgres, psql
Last update:
2017-01-12 23:04
Author:
Ben Roberts
Revision:
1.0
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.

Records in this category

Tags