← Go back to FSCI Service Status

Codema.in Upgrade

May 16, 2022 at 9:33 PM

loomio

Resolved after 60m of downtime. May 16, 2022 at 10:33 PM

Codema has not been updated in a long time due to various issues in migration, some of them related to upstream.

We’ve been able to find a migration path of least resistance and doing this upgrade, however risky it maybe, leads to good because it becomes increasingly difficult to do an upgrade the more we wait.

Update

We went from 2.0.108 to 2.12.1 which means a lot many things have changed.

If you find anything off, do let asd know.

Issues filed upstream as a result of this upgrade:

Backstory

The migration was blocked earlier by an issue with automatic ID generation for the ‘stances’ table. The sequence ‘stances_id_seq’ believed that the next number was somewhere around 30k. But for some unknown reason there already were a few entries in this table with IDs upto 80k.

This was identified by Harish and fixed by Akshay with the following psql command:

select setval('stances_id_seq', 879505, false);

This manipulated the sequence to allow for uninterrupted ID generation. (To arrive at the number 879505 one just had to do a select id from stances order by id desc limit 1; to get the highest id in the table).

There were further issues in later migrations, but those were crossed with a bit of nudge from upsream (see github issues linked above).

What would have been a roadblock was lack of disk space. When we began the update, df -h showed

Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        19G   16G  1.7G  91% /

Pirate Bady was quick to point out that there were some image backups that could be deleted to save space. docker system prune -a also helped in reclaiming space between each docker-compose pull.

The final path that was taken was

The underlying loomio-deploy docker-compose has to be updated, but that can wait for another day.

Last updated: March 9, 2023 at 12:45 AM