Yeti upgrade 1.12

Than you for new release 1.12

Can you please add to the upgrade document to check database.yaml
I didn’t checked and upgrade procedure failed on CDR table migration.
Tried ran again, but got error


StandardError: An error has occurred, this and all later migrations canceled:

PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "queue_pkey"
DETAIL:  Key (queue_id)=(2) already exists.
CONTEXT:  SQL statement "insert into pgq.queue (queue_id, queue_name,
            queue_data_pfx, queue_event_seq, queue_tick_seq)
        values (id, i_queue_name, tblpfx, ev_seq, tick_seq)"
PL/pgSQL function pgq.create_queue(text) line 46 at SQL statement

Any help thank you.

Yeti-web error

 [0ff19268-8808-4b53-b271-e51ea9d7c484] [0ff19268-8808-4b53-b271-e51ea9d7c484] ActionView::Template::Error (PG::UndefinedTable: ERROR:  relation "rtp_statistics.rx_streams" does not exist
                                     LINE 8:  WHERE a.attrelid = '"rtp_statistics"."rx_streams"'::regclas...
                                                                 ^
                                     ):
                                     [0ff19268-8808-4b53-b271-e51ea9d7c484]     1: insert_tag active_admin_application.view_factory["page"]
                                     [0ff19268-8808-4b53-b271-e51ea9d7c484]
                                     [0ff19268-8808-4b53-b271-e51ea9d7c484] app/lib/policy_adapter.rb:19:in `authorized?'
                                     [0ff19268-8808-4b53-b271-e51ea9d7c484] config/initializers/active_admin.rb:220:in `authorized?'
                                     [0ff19268-8808-4b53-b271-e51ea9d7c484] config/initializers/instrumentation_notification.rb:32:in `block in process_action'
                                     [0ff19268-8808-4b53-b271-e51ea9d7c484] config/initializers/instrumentation_notification.rb:31:in `process_action'

Hello Everyone,
I was be able upgrade and recover from fail upgrade procedure.
Might somebody else need it

Don’t forget adopt database.yml and /opt/yeti-web/config/yeti_web.yml.distr

1.  systemctl stop yeti-web yeti-cdr-billing@cdr_billing yeti-delayed-job yeti-scheduler
2. root@sbc0:/opt/yeti-web# su - postgres
postgres@sbc0:~$ psql
psql (13.9 (Debian 13.9-1.pgdg110+1))
Type "help" for help.

postgres=# \c yeti
You are now connected to database "yeti" as user "postgres".
yeti=# SET search_path = public, pgq, switch20;
SET
yeti=# TRUNCATE queue CASCADE;

3. cd /opt/yeti-web
su -s /bin/bash yeti-web
RAILS_ENV=production ./bin/bundle.sh exec rake db:migrate

4. Start services
 systemctl start yeti-web yeti-cdr-billing@cdr_billing yeti-delayed-job yeti-scheduler

this is very bad solution and it will cause problems in future.

looks like your issue caused by sequence valuses inconsistency. Simple workarount - try to apply migrations few times(3-4)

I tried multiply times and it returns that data exist. Is possible before upgrade it tries write into database and upgrade procedure is coiled with it ?

No.