Upgrading Tethys Platform Errors

29 views
Skip to first unread message

ezra.j.rice

unread,
Mar 9, 2020, 7:44:56 AM3/9/20
to Tethys Platform
I'm a bit slow on the update scene and am currently running Tethys version 2.0. The end goal is to upgrade to version 3.0, but I believe I need to do the intermediate upgrade to version 2.1 first. Is this correct? Assuming the correct upgrade path is 2.0 -> 2.1 -> 3.0, I'm getting the following error trying to upgrade to 2.1. I had to use git fetch --all to bypass a merge conflict in app_base.py

These are the commands I executed in order and the final command resulted in the error.

$ cd ~/tethys/src
$ mv tethys_portal/settings.py tethys_portal/settings20.py
$ git fetch --all
$ git reset origin/release

$ cd ~
$ t
(tethys) $ tstartdb
(tethys) $ conda activate base
(base) $ conda env remove -n tethys
(base) $ conda deactivate
(tethys) $ conda deactivate

$ wget https://raw.githubusercontent.com/tethysplatform/tethys/release/scripts/install_tethys.sh
$ bash install_tethys.sh -t ~ -b release -c ~/tethys/miniconda -s ~/tethys/src --partial-tethys-install cieast

ERROR conda.core.link:_execute(481): An error occurred while installing package 'conda-forge::appdirs-1.4.3-py_1'.
FileNotFoundError(2, "No such file or directory: '/home/ezra/tethys/miniconda/envs/tethys-dev/bin/python3.7'")
Attempting to roll back.

Rolling back transaction: done

FileNotFoundError(2, "No such file or directory: '/home/ezra/tethys/miniconda/envs/tethys-dev/bin/python3.7'")

It appears that the script is trying to find executables in a different location than they were in 2.0. My 2.0 installation has these located in ~/tethys/miniconda/bin
I can't do anything that would cause me to lose my database/users. Any help in trying to find where I'm going wrong would be a huge help.

swainn

unread,
Mar 9, 2020, 12:05:58 PM3/9/20
to Tethys Platform
Hey Ezra,

Sorry to hear that you are having trouble. I don't know that it is necessary to migrate through Tethys 2.1. Tethys 2.1 was meant to be a bridge upgrade that supported both Python 2 and Python 3. I would recommend upgrading directly to Tethys 3 and see how that works out.

As far as your database, the db migrations should be fairly straight forward, so I don't think you'll have a problem maintaining the database. That said, I always recommend taking backups before performing any upgrade on a production system.

--
Nathan


ezra.j.rice

unread,
Mar 9, 2020, 5:19:13 PM3/9/20
to Tethys Platform
Thanks. I'll give it a try tomorrow and let you now how that goes.

ezra.j.rice

unread,
Mar 10, 2020, 12:56:06 PM3/10/20
to Tethys Platform
Okay so trying to upgrade straight to Tethys 3.0 is having some conflicting specs.

$ conda install -c tethysplatform -c conda-forge tethys-platform

results in

Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:
  - pillow=4.1
  - tethys-platform -> docker-py=4.2 -> python_abi=[build=*_cp27mu] -> pypy[version='<0a0']
  - tethys-platform -> pillow=7.0 -> freetype[version='>=2.9.1,<3.0a0']
  - tethys-platform -> pillow=7.0 -> libtiff[version='>=4.1.0,<5.0a0']
Use "conda info <package>" to see the dependencies for each package.

ezra.j.rice

unread,
Mar 16, 2020, 10:12:26 AM3/16/20
to Tethys Platform
Update:

Tethys 2.0 used a version of postgresql that was too old to downgrade and so I had to upgrade the database to the new mdillon/postgis version using these steps:

(tethys) $ tethys docker start -c postgis  # make sure db docker is running
(tethys) $ pg_dumpall --username=tethys_super --host=localhost --port=5435 > ~/tethys_postgis_bak.sql  # use whatever port number you are running your docker instance on
(tethys) $ docker run -d -p 5435:5432 --restart=always --name postgis mdillon/postgis

(tethys) $ tethys docker stop -c postgis  # stop current(old) db docker
(tethys) $ docker rename tethys_postgis tethys_postgis_old
(tethys) $ docker rename postgis tethys_postgis
(tethys) $ psql --username=postgres --host=localhost --port=5435 -f tethys_postgis_bak.sql postgres  # fill database with your old data

(tethys) $ psql -U postgres --host=localhost --port=5435 -d postgres -c 'SELECT version();'  # check version of postgresql: should be 11.2

After getting this updated, I could proceed on the portal upgrade. I had to do these steps just to get conda to install tethys-platform:

$ t  # activate tethys environment
(tethys) $ pip uninstall tethys-platform

(tethys) $ conda update -n base conda
(tethys) $ conda remove python
(tethys) $ conda install python=3.7 -c conda-forge
(tethys) $ conda install -c tethysplatform -c conda-forge tethys-platform

When I move on to the step to rename ~/tethys/ to ~/.tethys/, it allows the move, but then all tethys commands are broken because they are trying to use the old path. Any ideas on how to get it to use the new path?
Reply all
Reply to author
Forward
0 new messages