[Spce-user] Upgrade problem

Sergey Kharlamov mentax at bk.ru
Tue Sep 16 10:09:42 EDT 2014


 I did't change a hostname. That was new installation - debian+sipwise.

cat /etc/ngcp_nodename
spce

I don't change anything there. I was install it 35 days ago.


Tue, 16 Sep 2014 11:18:26 +0200 от Alex Lutay <alutay at sipwise.com>:
>Hi,
>
>Let me try to help you here.
>
>Brief history:
>  - Sipwise tracks DB and config updates using the simple scripts:
>>  https://github.com/sipwise/cfg-schema/tree/master/cfg_scripts/config
>>  https://github.com/sipwise/db-schema/tree/master/db_scripts/base
>  - The information about already executed scripts are stored in MySQL 
>tables ngcp.db_schema and ngcp.cfg_schema.
>  - Having a lot of different products CE (community edition), PRO (for 
>professional usage) and Carrier (for huge telecoms providers) we need to 
>store information about the host of script execution (column "node").
>  - Historically we wrote there hostname of the server, later we 
>released CE edition and noticed the problem that users are renaming the 
>servers after installation, as a result the value into field "node" 
>doesn't match for real hostname.
>  - So, previously we suggested users update value in (column 
>"ngcp.db_schema.node" and "ngcp.cfg_schema.node" to appropriate values).
>It produces another issues, like your one.
>  - Finally we decided to stops using hostname there and introduced 
>"nodename" (file which installed once and allows users easily renames 
>servers):
>> root at spce:~# cat /etc/ngcp_nodename
>> spce
>> root at spce:~#
>
>Since that time new CE installations should have "spce" in 
>"ngcp_nodename" as well as into field "node" of the tables above
>>  https://github.com/sipwise/installer/commit/f9b49eb1282b93c0e6cb60c71ad0755c9fa6178f
>
>Also old systems (users manually changed "node" field in DB) should get 
>DB update:
>>  https://github.com/sipwise/upgrade/commit/34a620fb6d484b2de16204930bf4ec0f9088431a
>
>I suppose you have installed mr3.4.1 and updated "node" field manually 
>some time ago.
>So, to fix your issue just check that you have file "/etc/ngcp_nodename" 
>with content "spce" and update DB:
>> mysql -u root ngcp -e 'update db_schema set node = "spce"; update cfg_schema set node = "spce";'
>
>and retry the DB/CFG upgrade part + apply new configs
>> ngcp-update-db-schema &&  ngcp-update-cfg-schema &&   ngcpcfg apply
>
>I hope it will bring some light on the issue for other users.
>Since that time you can change the hostname anytime.
>
>On 15/09/14 23:29, Sergey Kharlamov wrote:
>> I have a new installation mr3.4.1
>>
>> Trying to do first update using command
>>
>> apt-get update && apt-get upgrade &&   ngcp-update-db-schema &&
>> ngcp-update-cfg-schema &&   ngcpcfg apply
>>
>> I see the error:
>[...skipped...]
>> Applying revision script
>> /usr/share/ngcp-db-schema/db_scripts/base/0070_not_replicated.up: ERROR
>> 1050 (42S01) at line 2: Table 'acc_backup' already exists
>>
>> failed. :(
>>
>> Please resolve the problem and run ngcp-update-db-schema again.
>
>-- 
>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


-- 
Sergey Kharlamov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20140916/b9ed0118/attachment-0001.html>


More information about the Spce-user mailing list