[Spce-user] DB table ngcp.db_schema contains wrong value

Alex Lutay alutay at sipwise.com
Mon Jan 12 05:49:11 EST 2015

Dear Max,

Please find my inline answers below:

On 11/01/15 20:26, Max Power wrote:
> This time when running the upgrade we got the error:
> Error: DB table ngcp.db_schema contains duplicated revisions: 5471

This is expected message, all OK here.
Duplicates noticed and you have fixed them.

> After running the command successfully we tried to update again. We were
> presented with the same message as before:
> Error: DB table ngcp.cfg_schema contains wrong value.
> Please execute: mysql -uroot -e "update ngcp.cfg_schema set node='spce'"

Still OK here, and now SQL command must have no errors as duplicates 
were fixed on previous stage. Please note, that NGCP contains two 
tables: cfg_schema and db_schema. You have been reported about 
duplicates on db_schema and wrong values on cfg_schema.

Can you please send me privately the full dump of  cfg_schema and 
db_schema you have currently. Tnx!

> Tried executing that command and although there were no errors the upgrade
> script still won't run.

Can you please post more details here, what means "still won't run".
It is not clear what exactly doesn't work.

Can you please send me upgrade log (privately) if you have it.
You can find it in /var/log/ngcp-upgrade-mr3.6.2.log

> Is there anything else it might be?

To answer this question I need to see error you have now.

> Before rolling back the changes we tried
> clearing the data from that table.

Please, never do this again, it will bring you the problems only :-)

> "apt-get update && apt-get upgrade && ngcp-update-db-schema &&
> ngcp-update-cfg-schema && ngcpcfg apply".

Those command updates NGCP to the latest _hotfixes_ in the _same build_,
while it does NOT upgrade NGCP to the next release/builds.

P.S. Our releasing policy uses the following terms:
Release - new software which contains new features and bugfixes (e.g. 
mr3.6, mr3.7, ...)
Build - bugfixes only for current release only. NO new features here 
(e.g mr3.6.2 for mr3.6)
Hotfixes - some emergency fixes which are released for builds (e.g. 
upgrade check for duplicates). No new features or dangerous bugfixes here.

> That seemed to work just fine. The
> upgrade script still fails with the same error.

What means the same value? You wrote:
> Error: DB table ngcp.db_schema contains wrong value.

Du you still have error for db_schema or it is for cfg_schema currently?

> We ended up just rolling back to the working snapshot. Attached is the
> db_schema table after deleting the duplicates with the first command.

Please send me dumps of db_schema and cfg_schema privately to reproduce 
in a lab.


Alexander Lutay
Head of Quality Assurance
Sipwise GmbH, Campus 21/Europaring F15
AT-2345 Brunn am Gebirge

Office: +43(0)13012036
Email: alutay at sipwise.com
Website: http://www.sipwise.com

Meet us @ AFRICACOM : Booth A17/A18
11-13 November 2014 : CTICC Cape Town, South Africa

More information about the Spce-user mailing list