Skip to content

Problem: bootstrap process doesn't always work #303

Open
@sevein

Description

@sevein

In a typical AM/SS installation (deb/rpm/ansible) the process seems to be done in the following way:

  1. SS administrator deploys Storage Service code.
  2. SS administrator runs manage.py migrate.
  3. SS administrator starts Storage Service web worker(s).
  4. SS administrator provides API key to Pipeline administrator.
  5. Pipeline is installed - pipeline self-registration process.

The order of the operations is important because when SS is executed for the first time (step 3), the startup() function makes some changes in the database that are needed for step 5 to succeed:

  1. Create LOCAL_FILESYSTEM Space with path /.
  2. Create default locations for this Space.
  3. Persist the UUIDs of the new locations in the database (settings table)

In step 5 the locations added in step 3 are associated with the new pipeline.

The problem I've found with the process described above is the following:

In a typical container-based deployment it's possible that the application was executed (step 3) before the database was populated (step 2) meaning that the startup() function is never executed. When the pipeline is registered (step 5) the process doesn't succeed - it does not fail but the locations are not created. The system ends up with a pipeline created but missing locations causing all sort of problems.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions