Skip to content
  • Mathieu Bridon's avatar
    debian: Stop enabling the uWSGI/Nginx apps · 1e411427
    Mathieu Bridon authored
    When installing the Ideascube package, APT will correctly drag in uWSGI
    as a dependency.
    
    At the end of the transaction, the uWSGI service will be started, as the
    Debian policy mandates.
    
    As a result Ideascube starts, and runs its migrations, which can take
    quite some time on a Koombook.
    
    Meanwhile, Ansiblecube proceeds, unaware that Ideascube hasn't finished
    running its migrations, and gets to a point where it tries to set some
    configuration values in the Ideascube database.
    
    We're faced with a race-condition, where this can sometimes fail if
    Ideascube hadn't finished running its migrations, the configuration
    command reporting that the database does not exist yet.
    
    But even if Ideascube had finished, this would still be problematic,
    because then we would have two processes trying to access the Ideascube
    database: Ideascube itself, and the command setting the configuration.
    
    This will also fail, because SQLite doesn't allow multiple processes to
    write to the same database.
    
    The only way out of this is to not start Ideascube automatically when
    the package is installed.
    
    uWSGI gets started anyway, unless we rebuilt the Debian package, so the
    simplest is to just not enable the Ideascube configuration for Nginx and
    uWSGI.
    1e411427