OpenSIPS / opensips-cli

OpenSIPS CLI tool - an interactive command line tool that can be used to control and monitor OpenSIPS servers.
GNU General Public License v3.0
85 stars 48 forks source link

3.1 db migrations not available from repo installs #64

Closed samk-acw closed 4 years ago

samk-acw commented 4 years ago

Hi, the APT (and presumably YUM) repo release version is lacking the changes needed to do the 3.1 DB migrations - are these likely to be updated soon?

liviuchircu commented 4 years ago

Hi, @samk-acw! This output is from a opensips-cli installed from APT on a Debian 9 a week ago:

$ opensips-cli 
Welcome to OpenSIPS Command Line Interface!
(opensips-cli): database 
add      create   drop     migrate  
(opensips-cli): database migrate 
2.4_to_3.0   3.0_to_3.1
(opensips-cli): ^D
$ dpkg -l | grep -i opensi
ii  opensips-cli                      0.1~20200707~2b522d9-1            all          very fast and configurable SIP server

... as you can see, it's a fresh build (July 7th, last commit) and it includes the database migrate command. Can you let me know what specific issue you are facing?

samk-acw commented 4 years ago

Hi @liviuchircu thanks for the quick response. I'm using debian 10, updated to latest repos, but I don't get the 2.4_to_3.0 or 3.0_to_3.1 migration options, only "opensips_new"

$ dpkg -l | grep -i opensips
ii  opensips                           3.1.0-1                      amd64        very fast and configurable SIP server
ii  opensips-carrierroute-module:amd64 3.1.0-1                      amd64        Carrierroute module for OpenSIPS
ii  opensips-cli                       0.1-1                        all          very fast and configurable SIP server
ii  opensips-cpl-module:amd64          3.1.0-1                      amd64        CPL module (CPL interpreter engine) for OpenSIPS
ii  opensips-dbg:amd64                 3.1.0-1                      amd64        very fast and configurable SIP server [debug symbols]
ii  opensips-dialplan-module:amd64     3.1.0-1                      amd64        Generic string translation module for OpenSIPS
ii  opensips-http-modules:amd64        3.1.0-1                      amd64        HTTP transport layer and Management Interface for OpenSIPS
ii  opensips-mysql-module:amd64        3.1.0-1                      amd64        MySQL database connectivity module for OpenSIPS
ii  opensips-snmpstats-module:amd64    3.1.0-1                      amd64        SNMP AgentX subagent module for OpenSIPS
ii  opensips-unixodbc-module:amd64     3.1.0-1                      amd64        unixODBC database connectivity module for OpenSIPS

(opensips-cli): database migrate
opensips_new
liviuchircu commented 4 years ago

Confirming the issue, it's actually caused by some wrong repo name on the website. If you want to always run the latest CLI and benefit from updates, switch to the cli-nightly repository, instead of cli-releases. So, you'd run:

echo "deb https://apt.opensips.org bionic cli-nightly" >/etc/apt/sources.list.d/opensips-cli.list
apt update
apt -y remove opensips-cli
apt -y install opensips-cli
liviuchircu commented 4 years ago

@nikbyte, if you could also fix the cli-nightly repository name when you select "nightly" on this page, that would be awesome! Thanks!

nikbyte commented 4 years ago

Fixes, thanks for pointing out.

samk-acw commented 4 years ago

perfect, thanks guys!