Loomio
Thu 22 Oct 2020 10:36AM

Content of Loomio disappeared after update - Migration command execution freezes

G Giuseppe Public Seen by 39

Hello everybody, I currently made a pull from master branch and relaunched the docker-compose.

I did the following steps as described in the help documentation:

docker-compose pull
docker-compose down
docker-compose run app rake db:migrate
docker-compose up -d

I tried to redo the procedure and I noticed, that after the command

docker-compose run app rake db:migrate

the log seems to freeze. I waited at least 20 Minutes and nothing seemed to proceed.

Here is the log until the line where it stops doing anything - any ideas? Can someone help?

gmt@bogus:~/loomio-deploy$ docker-compose run app rake db:migrate
Creating loomio-redis ... done
Creating loomio-db    ... done
Redis#exists(key) will return an Integer by default in redis-rb 4.3. The option to explicitly disable this behaviour via Redis.existsreturnsinteger will be removed in 5.0. You should use exists? instead.
Migrating to CreateEventsDescendantCount (20200815201352)
== 20200815201352 CreateEventsDescendantCount: migrating ======================
-- addcolumn(:events, :descendantcount, :integer, {:default=>0, :null=>false})
   -> 2.6092s
-- execute("UPDATE events\n             SET descendantcount = (\n               SELECT count(id) from events children\n               WHERE children.discussionid = events.eventableid\n             )\n             WHERE events.kind = 'newdiscussion'")
   -> 0.0541s
-- execute("UPDATE events\n         SET descendantcount = (\n           SELECT count(children.id)\n           FROM events children\n           WHERE\n              children.discussionid = events.discussionid AND\n              children.id != events.id AND\n              children.positionkey like CONCAT(events.positionkey, '%')\n          )\n         WHERE discussionid is not null and id > 0 and id <= 10000")
G

Giuseppe Thu 22 Oct 2020 10:46AM

I checked the admin sections. The content (discussions, polls) are listed there. It seems, that they just are not visualised.

G

Giuseppe Fri 23 Oct 2020 2:17PM

Oh wow - it worked now. The command was really updating a mess of ids with rising counter (until 100.000 in 10.000 steps width). This took around 4 h ... so I learned just to be patient :D

It is working now!

RG

Robert Guthrie Fri 23 Oct 2020 10:21PM

Yea, we have some big changes coming to the thread page. That's generating easier to use tree metadata. You can see the beta version of this if you enable "Beta features" from your sidebar.

BTW You will also need to setup a CNAME of 'channels' to your main loomio domain. I will change the defalt setup to use another port on the same host in the near future, but in the meantime you'll need a CNAME

G

Giuseppe Sat 24 Oct 2020 10:07AM

Hey @Rob Guthrie , thanks for you answer.

I did not understand really what kind of value I should enter in the CNAME record.

  1. What do you mean with "channels"? Should I just write "channels" as value? I think this does not work. Or do you mean a certain URL? BTW - I use already a subdomain as main loomio domain. Could this be an potential problem?

  2. Concerning the beta feature: When I enable it and when creating a new thread, I get the message "Connecting to the socket" - and nothing happens. Is this normal?

PC

Pablo Costa Sat 24 Oct 2020 1:50PM

I guess you have to add

channels.yoursubdomain.example.com CNAME yoursubdomain.example.com

to your DNS

RG

Robert Guthrie Sat 24 Oct 2020 7:49PM

that's right.

G

Giuseppe Tue 22 Dec 2020 12:25PM

Hello everybody. The service is working now after I add the CNAME entries. Thanks for the hint and your help!