Version 3.3.15

Released: March 5, 2020

Changes

API

Add more API tests to the Tags app.

Documentation

Remove remaining Wiki links from README files

Settings

New Django settings are now exposed and configurable using Mayan’s setting system: SECURE_PROXY_SSL_HEADER, USE_X_FORWARDED_HOST, and USE_X_FORWARDED_PORT.

The default value of the DATABASE_CONN_MAX_AGE setting was changed to 0. This is Django’s default and safest value. https://docs.djangoproject.com/en/3.0/ref/settings/#conn-max-age

Converted the hard-coded constant STUB_EXPIRATION_INTERVAL into a user setting named DOCUMENTS_STUB_EXPIRATION_INTERVAL. Defaults to previous value of 24 hours to preserve existing behavior.

Docker

A new Docker only environment setting was added. The environment setting MAYAN_SKIP_CHOWN_ON_STARTUP is used to skip performing the initial chown command on the media folder when the Docker container starts. The command chown is slow on non native block storage backends and not needed for most object storage backends.

The default Docker Compose file was updated to allow multiple environment variables to be overridden using a Docker .env file.

A new Docker environment variable named MAYAN_DOCKER_WAIT was added. This controls a native implementation of a wait cycle to allow the container to wait until the containers it is dependent, are ready to accept connections.

User interface

The icon used for multi document cabinet add action was corrected.

Removals

  • None

Upgrading process

  1. Stop supervisord:

    sudo systemctl stop supervisor
    

Upgrading from Mayan EDMS 3.2.x

  1. Update the Redis configuration:

    Configure Redis to discard data when it runs out of memory, not save its database, and only keep 2 database:

    echo "maxmemory-policy allkeys-lru" | sudo tee -a /etc/redis/redis.conf
    echo "save \"\"" | sudo tee -a /etc/redis/redis.conf
    echo "databases 2" | sudo tee -a /etc/redis/redis.conf
    sudo systemctl restart redis
    
  2. Install the Python 3 development OS package:

    sudo apt-get install python3-dev
    
  3. Update the virtualenv to use Python 3:

    sudo -u mayan virtualenv --clear /opt/mayan-edms -p /usr/bin/python3
    
  4. Create a home directory for the Mayan EDMS system user:

    mkdir /home/mayan
    
  5. Grant ownership to the Mayan EDMS system user:

    chown mayan:mayan /home/mayan
    
  6. Reinstall the Python client for PostgreSQL and Redis:

    sudo -u mayan /opt/mayan-edms/bin/pip install --no-use-pep517 psycopg2==3.2.3 redis==5.0.7
    

    Note

    Platforms with the ARM CPU might also need additional requirements:

    sudo -u mayan /opt/mayan-edms/bin/pip install --no-use-pep517 psutil==5.8.0
    
  7. Reinstall the Python client for RabbitMQ if you are using RabbitMQ as a broker:

    sudo -u mayan /opt/mayan-edms/bin/pip install --no-use-pep517 amqp==5.2.0
    

Upgrade steps from any previous version of Mayan EDMS

  1. Remove deprecated requirements:

    sudo -u mayan curl https://gitlab.com/mayan-edms/mayan-edms/raw/master/removals.txt -o /tmp/removals.txt \
    && sudo -u mayan /opt/mayan-edms/bin/pip uninstall -y -r /tmp/removals.txt
    
  2. Update the Mayan EDMS Python package:

    sudo -u mayan /opt/mayan-edms/bin/pip install mayan-edms==3.3.15
    

    the requirements will also be updated automatically.

  3. Make a backup of your supervisord file:

    sudo cp /etc/supervisor/conf.d/mayan-edms.conf /etc/supervisor/conf.d/mayan-edms.conf.bck
    
  4. Update the supervisord configuration file. Replace the environment variables values show here with your respective settings. This step will refresh the supervisord configuration file with the new queues and the latest recommended layout:

    sudo -u mayan MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan \
    MAYAN_DATABASE_PASSWORD=mayanuserpass MAYAN_DATABASE_USER=mayan \
    MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \
    /opt/mayan-edms/bin/mayan-edms.py platformtemplate supervisord | sudo sh -c "cat > /etc/supervisor/conf.d/mayan-edms.conf"
    

    or:

    sudo -u mayan MAYAN_DATABASES=\"{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'mayan','PASSWORD':'mayanuserpass','USER':'mayan','HOST':'127.0.0.1'}}\" \
    MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \
    /opt/mayan-edms/bin/mayan-edms.py platformtemplate supervisord | sudo sh -c "cat > /etc/supervisor/conf.d/mayan-edms.conf"
    
  5. Edit the supervisord configuration file and update any setting specific to your installation:

    sudo vi /etc/supervisor/conf.d/mayan-edms.conf
    
  6. Migrate existing database schema with:

    sudo -u mayan MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan \
    MAYAN_DATABASE_PASSWORD=mayanuserpass MAYAN_DATABASE_USER=mayan \
    MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \
    /opt/mayan-edms/bin/mayan-edms.py performupgrade
    

    or:

     sudo -u mayan MAYAN_DATABASES="{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'mayan','PASSWORD':'mayanuserpass','USER':'mayan','HOST':'127.0.0.1'}}" \
     MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \
    /opt/mayan-edms/bin/mayan-edms.py performupgrade
    
  7. Add new static media:

    sudo -u mayan MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \
    /opt/mayan-edms/bin/mayan-edms.py preparestatic --noinput
    
  8. Start supervisord:

    sudo systemctl start supervisor
    

The upgrade procedure is now complete.

Backward incompatible changes

  • None

Issues closed

  • None