[Spce-user] upgrade errors (4.5.9-->5.5.9)

Alex Lutay alutay at sipwise.com
Wed May 15 07:45:26 EDT 2019


Hi Jon,

On 5/15/19 12:55 PM, Jon Bonilla (Manwe) wrote:
>> * update-db step: 15324.up failed because the users didn't exist. Fixed
>>   manually creating the users
>> * apply step: Failed again during sync-grants because licensed at localhost
>> didn't exist. Fixed manually creating it.
>> First time I have these errors. I've upgraded servers to 5.5.x before and
>> didn't happen.

It looks like you had some problems with users/grants in MySQL.
mr4.5+ should use ngcp-sync-grants to keep them up to date with the
necessary one, check /etc/mysql/grants.yml file
(it is coming from template
/etc/ngcp-config/templates/etc/mysql/grants.yml.tt2). It must contains
something like:

>     licensed:
>         localhost:
>             - select on provisioning.voip_subscribers
>             - select on kamailio.location
>             - select on billing.voip_subscribers
>             - select on billing.contracts
>             - select on billing.billing_mappings
>             - select on billing.products
>     rtpengine:
>         localhost:
>             - all on provisioning.recording_calls
>             - all on provisioning.recording_streams
>             - all on provisioning.recording_metakeys

If the user is missing, it will be created with the proper grants:

> root at spce:~# /usr/sbin/ngcp-sync-grants --verbose
> --> connected to localhost:3306 as sipwise
> --> host: spce (self)
> -->   [defaults.asterisk.localhost]
> -->   [defaults.dbcleaner.localhost]
> -->   [defaults.debian-sys-maint.localhost]
> -->   [defaults.exporter.localhost]
> -->   [defaults.fileshare.localhost]
> -->   [defaults.kamailio.localhost]
> -->   [defaults.kamailioro.localhost]
> -->   [defaults.ldap.localhost]
> -->   [defaults.licensed.localhost]
> -->   [defaults.mediator.localhost]
> -->   [defaults.nagios.localhost]
> -->   [defaults.prosody.localhost]
> -->   [defaults.rateomat.localhost]
> -->   [defaults.rsyslog.localhost]
> -->   [defaults.rtcengine.localhost]
> -->   [defaults.rtpengine.localhost]
> -->   [defaults.sems_prepaid.localhost]
> -->   [defaults.sipwise.localhost]
> -->   [defaults.soap.localhost]
> -->   [defaults.voisniff.localhost]
>> root at spce:~# mysql -e "drop user 'rtpengine'@'localhost'"
>> root at spce:~# /usr/sbin/ngcp-sync-grants --verbose
> --> connected to localhost:3306 as sipwise
> --> host: spce (self)
> -->   [defaults.asterisk.localhost]
> -->   [defaults.dbcleaner.localhost]
> -->   [defaults.debian-sys-maint.localhost]
> -->   [defaults.exporter.localhost]
> -->   [defaults.fileshare.localhost]
> -->   [defaults.kamailio.localhost]
> -->   [defaults.kamailioro.localhost]
> -->   [defaults.ldap.localhost]
> -->   [defaults.licensed.localhost]
> -->   [defaults.mediator.localhost]
> -->   [defaults.nagios.localhost]
> -->   [defaults.prosody.localhost]
> -->   [defaults.rateomat.localhost]
> -->   [defaults.rsyslog.localhost]
> -->   [defaults.rtcengine.localhost]
> -->   [defaults.rtpengine.localhost]
> -->     revoke all from: rtpengine at localhost
> -->     grant all privileges on provisioning.recording_metakeys to rtpengine at localhost 
> -->     grant all privileges on provisioning.recording_streams to rtpengine at localhost 
> -->     grant all privileges on provisioning.recording_calls to rtpengine at localhost 
> -->   [defaults.sems_prepaid.localhost]
> -->   [defaults.sipwise.localhost]
> -->   [defaults.soap.localhost]
> -->   [defaults.voisniff.localhost]
> --> flush privileges
> root at spce:~# 

ngcp-sync-grants should be executed at the end of 'ngcpcfg apply'.
Check it on your side please. I can't debug it further from my side.
Jenkins reported no issues with nightly LTS upgrade
2.8->mr3.8.13->mr4.5.12->mr5.5.9->mr6.5.4 on my side.

> Also, and this have been before, kernel-headers not installed by default so
> rtpengine starts in user-space mode. Fixed by installing headers manually.

One commit better then 100 promises... ;-)

> 13:31:20 ✔ taurus:(master)~/sipwise/git/metapackages$ git show be6d65bb
> commit be6d65bb2c375297d0370de9ad977922bc34b4de
> Author: Alexander Lutay <alutay at sipwise.com>
> Date:   Mon Jun 18 10:06:02 2018 +0200
> 
>     TT#38454 Depends on linux-image-amd64/linux-headers-amd64 in ngcp-services-ce
>     
>     PRO and Carrier depends on it since commit c27082ffb,
>     also deployment.sh installed it on CE in the past.
>     We need headers installed for proper dkms functionality
>     which is used by license client and rtpengine nowadays.
>     
>     Change-Id: I0a2d9d0ced89782107254d721673ee215cb18729)

Available for mr6.4+

-- 
Alex Lutay



More information about the Spce-user mailing list