overhangio / tutor

The Docker-based Open edX distribution designed for peace of mind
https://docs.tutor.overhang.io/
GNU Affero General Public License v3.0
927 stars 444 forks source link

Error: `lms is mounted on / but it is not a shared mount` #522

Closed mrvaghani closed 2 years ago

mrvaghani commented 2 years ago

Bug description When doing a fresh install using tutor local quickstart, it downloads all the images but fails during docker-compose file.

How to reproduce

╰─ mkdir tutor && cd tutor
╰─ sudo curl -L "https://github.com/overhangio/tutor/releases/download/v12.1.6/tutor-$(uname -s)_$(uname -m)" -o /usr/local/bin/tutor
╰─ sudo chmod 0755 /usr/local/bin/tutor
╰─ export TUTOR_ROOT=tutor
╰─ tutor local start
docker-compose -f /home/<USER>/.local/share/tutor/env/local/docker-compose.yml -f /home/<USER>/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans --build
[+] Running 7/7
 ⠿ Container tutor_local-redis-1          Created                                                                                                                                      1.0s
 ⠿ Container tutor_local-caddy-1          Created                                                                                                                                      1.0s
 ⠿ Container tutor_local-mysql-1          Created                                                                                                                                      1.0s
 ⠿ Container tutor_local-smtp-1           Created                                                                                                                                      1.0s
 ⠿ Container tutor_local-elasticsearch-1  Created                                                                                                                                      1.0s
 ⠿ Container tutor_local-mongodb-1        Created                                                                                                                                      1.0s
 ⠿ Container tutor_local-forum-1          Created                                                                                                                                      0.1s
 ⠋ Container tutor_local-lms-1            Creating                                                                                                                                     0.0s
Error response from daemon: path /home/<USER>/.local/share/tutor/env/apps/openedx/settings/lms is mounted on / but it is not a shared mount.
Error: Command failed with status 1: docker-compose -f /home/<USER>/.local/share/tutor/env/local/docker-compose.yml -f /home/<USER>/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans --build

Environment Windows 10 20H2 WSL2 - Ubuntu 20.04 LTS tutor, version 12.1.6

Additional context

iamCristYe commented 2 years ago

https://stackoverflow.com/questions/69579200/unable-to-run-docker-compose-from-wsl-2-ubuntu https://stackoverflow.com/questions/68273745/how-to-make-a-mount-shared-in-docker/68455665#68455665

mrvaghani commented 2 years ago

Thanks @iamCristYe. It solved this problem but now I have a new problem. I'll open a separate issue for it

iamCristYe commented 2 years ago

@regisb I believe this is indeed an issue and worth fixing.

BbrSofiane commented 2 years ago

If it's what I came across, I think this is the underlying problem docker/compose#8558.

So removing the trailing '/' in docker-compose files should fix it.

Edit: as @iamCristYe linked! (just went to the StackOverflow posts)

regisb commented 2 years ago

Is someone able to reproduce this bug, using docker-compose v2 on Windows (WSL2)? I successfully managed to run tutor local start -d and tutor local init on my Linux machine, so I guess this is a Windows only issue.

@mrvaghani What is your docker-compose version?

Let's try to reproduce this. In the meantime, I'm re-opening the issue.

mrvaghani commented 2 years ago

Is someone able to reproduce this bug, using docker-compose v2 on Windows (WSL2)? I successfully managed to run tutor local start -d and tutor local init on my Linux machine, so I guess this is a Windows only issue.

@mrvaghani What is your docker-compose version?

Let's try to reproduce this. In the meantime, I'm re-opening the issue.

Docker Compose version v2.0.0 I am willing to help recreate this so let me know what I can do to help. I haven't tried installing it on an Ubuntu VM but I would think it should be exactly same as wsl2. Not sure, let me know what you need from me.

iamCristYe commented 2 years ago

weird..... I thought I can reproduce this issue but tutor local quickstart runs without problem:

$ docker version
Client: Docker Engine - Community
 Version:           20.10.10
 API version:       1.41
 Go version:        go1.16.9
 Git commit:        b485636
 Built:             Mon Oct 25 07:42:59 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.10
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.9
  Git commit:       e2f740d
  Built:            Mon Oct 25 07:41:08 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.11
  GitCommit:        5b46e404f6b9f661a205e28d59c982d3634148f8
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
docker-compose version
docker-compose version 1.29.2, build 5becea4c
docker-py version: 5.0.0
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l  10 Sep 2019
iamCristYe commented 2 years ago

fine with docker-compose v2 also

$ docker-compose version
Docker Compose version v2.0.1
$ tutor local quickstart
==================================================
        Interactive platform configuration
==================================================
Are you configuring a production platform? Type 'n' if you are just testing Tutor on your local computer [y/N]
As you are not running this platform in production, we automatically set the following configuration values:
    LMS_HOST = local.overhang.io
    CMS_HOST = studio.local.overhang.io
    ENABLE_HTTPS = False
Your platform name/title [My Open edX]
Your public contact email address [contact@www.myopenedx.com]
The default language code for the platform [en]
Configuration saved to /home/c/.local/share/tutor/config.yml

Environment generated in /home/c/.local/share/tutor/env
==============================================
        Stopping any existing platform
==============================================
docker-compose -f /home/c/.local/share/tutor/env/local/docker-compose.yml -f /home/c/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local stop
[+] Running 12/0
 ⠿ Container tutor_local_lms-worker_1     Stopped                                                                  0.0s
 ⠿ Container tutor_local_nginx_1          Stopped                                                                  0.0s
 ⠿ Container tutor_local_caddy_1          Stopped                                                                  0.0s
 ⠿ Container tutor_local_cms-worker_1     Stopped                                                                  0.0s
 ⠿ Container tutor_local_cms_1            Stopped                                                                  0.0s
 ⠿ Container tutor_local_lms_1            Stopped                                                                  0.0s
 ⠿ Container tutor_local_smtp_1           Stopped                                                                  0.0s
 ⠿ Container tutor_local_mysql_1          Stopped                                                                  0.0s
 ⠿ Container tutor_local_redis_1          Stopped                                                                  0.0s
 ⠿ Container tutor_local_forum_1          Stopped                                                                  0.0s
 ⠿ Container tutor_local_mongodb_1        Stopped                                                                  0.0s
 ⠿ Container tutor_local_elasticsearch_1  Stopped                                                                  0.0s
======================================================
        Starting the platform in detached mode
======================================================
docker-compose -f /home/c/.local/share/tutor/env/local/docker-compose.yml -f /home/c/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans --build -d
[+] Running 24/24
 ⠿ Container tutor_local_caddy_1          Recreated                                                                0.2s
 ⠿ Container tutor_local_elasticsearch_1  Recreated                                                                0.2s
 ⠿ Container tutor_local_mysql_1          Recreated                                                                0.2s
 ⠿ Container tutor_local_redis_1          Recreated                                                                0.2s
 ⠿ Container tutor_local_mongodb_1        Recreated                                                                0.2s
 ⠿ Container tutor_local_smtp_1           Recreated                                                                0.2s
 ⠿ Container tutor_local_forum_1          Recreated                                                                0.1s
 ⠿ Container tutor_local_lms_1            Recreated                                                                0.1s
 ⠿ Container tutor_local_cms_1            Recreated                                                                0.1s
 ⠿ Container tutor_local_lms-worker_1     Recreated                                                                0.2s
 ⠿ Container tutor_local_nginx_1          Recreated                                                                0.2s
 ⠿ Container tutor_local_cms-worker_1     Recreated                                                                0.2s
 ⠿ Container tutor_local-smtp-1           Started                                                                  4.1s
 ⠿ Container tutor_local-mongodb-1        Started                                                                  4.4s
 ⠿ Container tutor_local-redis-1          Started                                                                  4.6s
 ⠿ Container tutor_local-caddy-1          Started                                                                  4.6s
 ⠿ Container tutor_local-elasticsearch-1  Started                                                                  4.6s
 ⠿ Container tutor_local-mysql-1          Started                                                                  3.8s
 ⠿ Container tutor_local-forum-1          Started                                                                  1.4s
 ⠿ Container tutor_local-lms-1            Started                                                                  1.3s
 ⠿ Container tutor_local-cms-1            Started                                                                  2.8s
 ⠿ Container tutor_local-lms-worker-1     Started                                                                  2.4s
 ⠿ Container tutor_local-nginx-1          Started                                                                  2.4s
 ⠿ Container tutor_local-cms-worker-1     Started                                                                  2.2s
================================================
        Database creation and migrations
================================================
Initialising all services...
docker-compose -f /home/c/.local/share/tutor/env/local/docker-compose.yml -f /home/c/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /home/c/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm mysql-job sh -e -c echo "Initialising MySQL..."
mysql_connection_max_attempts=10
mysql_connection_attempt=0
until mysql -u root --password="adar0u12" --host "mysql" --port 3306 -e 'exit'
do
    mysql_connection_attempt=$(expr $mysql_connection_attempt + 1)
    echo "    [$mysql_connection_attempt/$mysql_connection_max_attempts] Waiting for MySQL service (this may take a while)..."
    if [ $mysql_connection_attempt -eq $mysql_connection_max_attempts ]
    then
      echo "MySQL initialisation error" 1>&2
      exit 1
    fi
    sleep 10
done
echo "MySQL is up and running"

# edx-platform database
mysql -u root --password="adar0u12" --host "mysql" --port 3306 -e 'CREATE DATABASE IF NOT EXISTS openedx;'
mysql -u root --password="adar0u12" --host "mysql" --port 3306 -e 'GRANT ALL ON openedx.* TO "openedx"@"%" IDENTIFIED BY "5ZFCtgxk";'
[+] Running 1/0
 ⠿ Container tutor_local-mysql-1  Running                                                                          0.0s

Initialising MySQL...
mysql: [Warning] Using a password on the command line interface can be insecure.
MySQL is up and running
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
Initialising lms...
docker-compose -f /home/c/.local/share/tutor/env/local/docker-compose.yml -f /home/c/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /home/c/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm lms-job sh -e -c dockerize -wait tcp://mysql:3306 -timeout 20s

echo "Loading settings $DJANGO_SETTINGS_MODULE"

./manage.py lms migrate

# Fix incorrect uploaded file path
if [ -d /openedx/data/uploads/ ]; then
  if [ -n "$(ls -A /openedx/data/uploads/)" ]; then
    echo "Migrating LMS uploaded files to shared directory"
    mv /openedx/data/uploads/* /openedx/media/
    rm -rf /openedx/data/uploads/
  fi
fi

# Create waffle switches to enable some features, if they have not been explicitly defined before
# Completion tracking: add green ticks to every completed unit
(./manage.py lms waffle_switch --list | grep completion.enable_completion_tracking) || ./manage.py lms waffle_switch --create completion.enable_completion_tracking on
[+] Running 1/0
 ⠿ Container tutor_local-mysql-1  Running                                                                          0.0s
2021/11/13 00:31:01 Waiting for: tcp://mysql:3306
2021/11/13 00:31:01 Connected to tcp://mysql:3306
Loading settings lms.envs.tutor.production
Operations to perform:
  Apply all migrations: admin, announcements, api_admin, assessment, auth, badges, blackboard, block_structure, bookmarks, branding, bulk_email, bulk_grades, calendar_sync, canvas, catalog, celery_utils, certificates, commerce, completion, consent, content_libraries, content_type_gating, contentserver, contenttypes, cornerstone, cors_csrf, course_action_state, course_date_signals, course_duration_limits, course_goals, course_groups, course_modes, course_overviews, courseware, crawlers, credentials, credit, dark_lang, database_fixups, degreed, demographics, discounts, discussions, django_celery_results, django_comment_common, django_notify, edx_proctoring, edx_when, edxval, email_marketing, embargo, enterprise, entitlements, event_routing_backends, experiments, external_user_ids, grades, instructor_task, integrated_channel, learning_sequences, lms_xblock, lti_consumer, milestones, mobile_api, moodle, oauth2_provider, oauth_dispatch, organizations, program_enrollments, programs, redirects, rss_proxy, sap_success_factors, schedules, self_paced, sessions, shoppingcart, site_configuration, sites, social_django, splash, static_replace, status, student, submissions, super_csv, survey, system_wide_roles, teams, theming, third_party_auth, thumbnail, track, user_api, user_authn, user_tasks, util, verified_track_content, verify_student, video_config, video_pipeline, waffle, waffle_utils, wiki, workflow, xapi, xblock_django
Running migrations:
  No migrations to apply.
completion.enable_completion_tracking: on
Initialising cms...
docker-compose -f /home/c/.local/share/tutor/env/local/docker-compose.yml -f /home/c/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /home/c/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm cms-job sh -e -c dockerize -wait tcp://mysql:3306 -timeout 20s

echo "Loading settings $DJANGO_SETTINGS_MODULE"

./manage.py cms migrate

# Fix incorrect uploaded file path
if [ -d /openedx/data/uploads/ ]; then
  if [ -n "$(ls -A /openedx/data/uploads/)" ]; then
    echo "Migrating CMS uploaded files to shared directory"
    mv /openedx/data/uploads/* /openedx/media/
    rm -rf /openedx/data/uploads/
  fi
fi
[+] Running 1/0
 ⠿ Container tutor_local-mysql-1  Running                                                                          0.0s
2021/11/13 00:31:55 Waiting for: tcp://mysql:3306
2021/11/13 00:31:55 Connected to tcp://mysql:3306
Loading settings cms.envs.tutor.production
2021-11-13 00:32:01,631 WARNING 15 [py.warnings] [user None] [ip None] warnings.py:109 - /openedx/venv/lib/python3.8/site-packages/storages/backends/s3boto.py:41: DeprecationWarning: The S3BotoStorage backend is deprecated in favor of the S3Boto3Storage backend and will be removed in django-storages 1.8. This backend is mostly in bugfix only mode and has been for quite a while (in much the same way as its underlying library 'boto'). For performance, security and new feature reasons it is _strongly_ recommended that you update to the S3Boto3Storage backend. Please see the migration docs https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#migrating-boto-to-boto3.
  warnings.warn(

Operations to perform:
  Apply all migrations: admin, announcements, api_admin, assessment, auth, blackboard, block_structure, bookmarks, canvas, catalog, celery_utils, completion, consent, content_libraries, content_type_gating, contentserver, contentstore, contenttypes, cornerstone, cors_csrf, course_action_state, course_creators, course_date_signals, course_duration_limits, course_groups, course_modes, course_overviews, courseware, crawlers, credit, dark_lang, database_fixups, degreed, discounts, discussions, django_celery_results, django_comment_common, django_notify, edx_proctoring, edx_when, edxval, embargo, enterprise, entitlements, event_routing_backends, experiments, external_user_ids, integrated_channel, learning_sequences, lti_consumer, milestones, moodle, oauth2_provider, oauth_dispatch, organizations, programs, redirects, sap_success_factors, schedules, self_paced, sessions, site_configuration, sites, static_replace, student, submissions, survey, system_wide_roles, tagging, theming, track, user_api, user_authn, user_tasks, verified_track_content, verify_student, video_config, video_pipeline, waffle, waffle_utils, wiki, workflow, xapi, xblock_config, xblock_django
Running migrations:
  No migrations to apply.
Initialising forum...
docker-compose -f /home/c/.local/share/tutor/env/local/docker-compose.yml -f /home/c/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /home/c/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm forum-job sh -e -c bundle exec rake search:initialize
bundle exec rake search:rebuild_indices
[+] Running 2/0
 ⠿ Container tutor_local-mongodb-1        Running                                                                  0.0s
 ⠿ Container tutor_local-elasticsearch-1  Running                                                                  0.0s
Waiting for mongodb/elasticsearch...
2021/11/13 00:32:13 Waiting for: tcp://mongodb:27017
2021/11/13 00:32:13 Waiting for: http://elasticsearch:9200
2021/11/13 00:32:13 Connected to tcp://mongodb:27017
2021/11/13 00:32:13 Received 200 from http://elasticsearch:9200
/openedx/cs_comments_service/lib/tasks/deep_search.rake:7: warning: already initialized constant ROOT
/openedx/cs_comments_service/lib/tasks/kpis.rake:7: warning: previous definition of ROOT was here
/openedx/cs_comments_service/lib/tasks/db.rake:28: warning: already initialized constant COURSE_ID
/openedx/cs_comments_service/models/constants.rb:2: warning: previous definition of COURSE_ID was here
/openedx/cs_comments_service/lib/tasks/flags.rake:6: warning: already initialized constant ROOT
/openedx/cs_comments_service/lib/tasks/deep_search.rake:7: warning: previous definition of ROOT was here
W, [2021-11-13T00:32:16.350004 #18]  WARN -- : Overwriting existing field _id in class User.
W, [2021-11-13T00:32:16.402134 #18]  WARN -- : MONGODB | Unsupported client option 'max_retries'. It will be ignored.
W, [2021-11-13T00:32:16.402273 #18]  WARN -- : MONGODB | Unsupported client option 'retry_interval'. It will be ignored.
W, [2021-11-13T00:32:16.402321 #18]  WARN -- : MONGODB | Unsupported client option 'timeout'. It will be ignored.
I, [2021-11-13T00:32:16.431838 #18]  INFO -- : Skipping initialization. Indices already exist. If 'rake search:validate_indices' indicates a problem with the mappings, you could either use 'rake search:rebuild_indices' to reload from the db or 'rake search:initialize[true]' to force initialization with an empty index.
/openedx/cs_comments_service/lib/tasks/deep_search.rake:7: warning: already initialized constant ROOT
/openedx/cs_comments_service/lib/tasks/kpis.rake:7: warning: previous definition of ROOT was here
/openedx/cs_comments_service/lib/tasks/db.rake:28: warning: already initialized constant COURSE_ID
/openedx/cs_comments_service/models/constants.rb:2: warning: previous definition of COURSE_ID was here
/openedx/cs_comments_service/lib/tasks/flags.rake:6: warning: already initialized constant ROOT
/openedx/cs_comments_service/lib/tasks/deep_search.rake:7: warning: previous definition of ROOT was here
W, [2021-11-13T00:32:19.237218 #26]  WARN -- : Overwriting existing field _id in class User.
W, [2021-11-13T00:32:19.284182 #26]  WARN -- : MONGODB | Unsupported client option 'max_retries'. It will be ignored.
W, [2021-11-13T00:32:19.284287 #26]  WARN -- : MONGODB | Unsupported client option 'retry_interval'. It will be ignored.
W, [2021-11-13T00:32:19.284314 #26]  WARN -- : MONGODB | Unsupported client option 'timeout'. It will be ignored.
I, [2021-11-13T00:32:19.846088 #26]  INFO -- : New indices ["comments_20211113003219298", "comment_threads_20211113003219298"] are created.
I, [2021-11-13T00:32:19.895221 #26]  INFO -- : Catch up from 2021-11-13 00:27:19 UTC complete.
I, [2021-11-13T00:32:19.996233 #26]  INFO -- : Alias [comments] now points to index [comments_20211113003219298].
I, [2021-11-13T00:32:20.094307 #26]  INFO -- : Alias [comment_threads] now points to index [comment_threads_20211113003219298].
I, [2021-11-13T00:32:20.119546 #26]  INFO -- : Catch up from 2021-11-13 00:27:19 UTC complete.
I, [2021-11-13T00:32:20.119697 #26]  INFO -- : Rebuild indices complete.
All services initialised.
The Open edX platform is now running in detached mode
Your Open edX platform is ready and can be accessed at the following urls:

    http://local.overhang.io
    http://studio.local.overhang.io
iamCristYe commented 2 years ago

tried rm -rf .local/share/tutor, still working:

$ docker version
Client: Docker Engine - Community
 Cloud integration: 1.0.17
 Version:           20.10.10
 API version:       1.41
 Go version:        go1.16.9
 Git commit:        b485636
 Built:             Mon Oct 25 07:42:59 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.10
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.9
  Git commit:       e2f740d
  Built:            Mon Oct 25 07:41:08 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.11
  GitCommit:        5b46e404f6b9f661a205e28d59c982d3634148f8
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
$ docker-compose version
Docker Compose version v2.0.1
$ tutor local quickstart
==================================================
        Interactive platform configuration
==================================================
Are you configuring a production platform? Type 'n' if you are just testing Tutor on your local computer [Y/n] N
As you are not running this platform in production, we automatically set the following configuration values:
    LMS_HOST = local.overhang.io
    CMS_HOST = studio.local.overhang.io
    ENABLE_HTTPS = False
Your platform name/title [My Open edX]
Your public contact email address [contact@local.overhang.io]
The default language code for the platform [en]
Configuration saved to /home/c/.local/share/tutor/config.yml
Environment generated in /home/c/.local/share/tutor/env
==============================================
        Stopping any existing platform
==============================================
docker-compose -f /home/c/.local/share/tutor/env/local/docker-compose.yml -f /home/c/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local stop
[+] Running 12/0
 ⠿ Container tutor_local-lms-worker-1     Stopped                                                                  0.0s
 ⠿ Container tutor_local-caddy-1          Stopped                                                                  0.0s
 ⠿ Container tutor_local-nginx-1          Stopped                                                                  0.0s
 ⠿ Container tutor_local-cms-worker-1     Stopped                                                                  0.0s
 ⠿ Container tutor_local-cms-1            Stopped                                                                  0.0s
 ⠿ Container tutor_local-lms-1            Stopped                                                                  0.0s
 ⠿ Container tutor_local-forum-1          Stopped                                                                  0.0s
 ⠿ Container tutor_local-smtp-1           Stopped                                                                  0.0s
 ⠿ Container tutor_local-mysql-1          Stopped                                                                  0.0s
 ⠿ Container tutor_local-redis-1          Stopped                                                                  0.0s
 ⠿ Container tutor_local-mongodb-1        Stopped                                                                  0.0s
 ⠿ Container tutor_local-elasticsearch-1  Stopped                                                                  0.0s
======================================================
        Starting the platform in detached mode
======================================================
docker-compose -f /home/c/.local/share/tutor/env/local/docker-compose.yml -f /home/c/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans --build -d
[+] Running 12/12
 ⠿ Container tutor_local-redis-1          Started                                                                  5.0s
 ⠿ Container tutor_local-smtp-1           Started                                                                  4.7s
 ⠿ Container tutor_local-mongodb-1        Started                                                                  4.7s
 ⠿ Container tutor_local-mysql-1          Started                                                                  3.1s
 ⠿ Container tutor_local-caddy-1          Started                                                                  5.0s
 ⠿ Container tutor_local-elasticsearch-1  Started                                                                  4.0s
 ⠿ Container tutor_local-forum-1          Started                                                                  6.5s
 ⠿ Container tutor_local-lms-1            Started                                                                  8.3s
 ⠿ Container tutor_local-lms-worker-1     Started                                                                 10.9s
 ⠿ Container tutor_local-cms-1            Started                                                                 10.9s
 ⠿ Container tutor_local-cms-worker-1     Started                                                                 13.2s
 ⠿ Container tutor_local-nginx-1          Started                                                                 13.5s
================================================
        Database creation and migrations
================================================
Initialising all services...
docker-compose -f /home/c/.local/share/tutor/env/local/docker-compose.yml -f /home/c/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /home/c/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm mysql-job sh -e -c echo "Initialising MySQL..."
mysql_connection_max_attempts=10
mysql_connection_attempt=0
until mysql -u root --password="kH0MC3F8" --host "mysql" --port 3306 -e 'exit'
do
    mysql_connection_attempt=$(expr $mysql_connection_attempt + 1)
    echo "    [$mysql_connection_attempt/$mysql_connection_max_attempts] Waiting for MySQL service (this may take a while)..."
    if [ $mysql_connection_attempt -eq $mysql_connection_max_attempts ]
    then
      echo "MySQL initialisation error" 1>&2
      exit 1
    fi
    sleep 10
done
echo "MySQL is up and running"

# edx-platform database
mysql -u root --password="kH0MC3F8" --host "mysql" --port 3306 -e 'CREATE DATABASE IF NOT EXISTS openedx;'
mysql -u root --password="kH0MC3F8" --host "mysql" --port 3306 -e 'GRANT ALL ON openedx.* TO "openedx"@"%" IDENTIFIED BY "Ojfa7tzr";'
[+] Running 1/0
 ⠿ Container tutor_local-mysql-1  Running                                                                          0.0s
Initialising MySQL...
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on 'mysql' (111)
    [1/10] Waiting for MySQL service (this may take a while)...
mysql: [Warning] Using a password on the command line interface can be insecure.
MySQL is up and running
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
Initialising lms...
docker-compose -f /home/c/.local/share/tutor/env/local/docker-compose.yml -f /home/c/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /home/c/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm lms-job sh -e -c dockerize -wait tcp://mysql:3306 -timeout 20s

echo "Loading settings $DJANGO_SETTINGS_MODULE"

./manage.py lms migrate

# Fix incorrect uploaded file path
if [ -d /openedx/data/uploads/ ]; then
  if [ -n "$(ls -A /openedx/data/uploads/)" ]; then
    echo "Migrating LMS uploaded files to shared directory"
    mv /openedx/data/uploads/* /openedx/media/
    rm -rf /openedx/data/uploads/
  fi
fi

# Create waffle switches to enable some features, if they have not been explicitly defined before
# Completion tracking: add green ticks to every completed unit
(./manage.py lms waffle_switch --list | grep completion.enable_completion_tracking) || ./manage.py lms waffle_switch --create completion.enable_completion_tracking on
[+] Running 1/0
 ⠿ Container tutor_local-mysql-1  Running                                                                          0.0s
2021/11/13 00:36:18 Waiting for: tcp://mysql:3306
2021/11/13 00:36:18 Connected to tcp://mysql:3306
Loading settings lms.envs.tutor.production
Operations to perform:
  Apply all migrations: admin, announcements, api_admin, assessment, auth, badges, blackboard, block_structure, bookmarks, branding, bulk_email, bulk_grades, calendar_sync, canvas, catalog, celery_utils, certificates, commerce, completion, consent, content_libraries, content_type_gating, contentserver, contenttypes, cornerstone, cors_csrf, course_action_state, course_date_signals, course_duration_limits, course_goals, course_groups, course_modes, course_overviews, courseware, crawlers, credentials, credit, dark_lang, database_fixups, degreed, demographics, discounts, discussions, django_celery_results, django_comment_common, django_notify, edx_proctoring, edx_when, edxval, email_marketing, embargo, enterprise, entitlements, event_routing_backends, experiments, external_user_ids, grades, instructor_task, integrated_channel, learning_sequences, lms_xblock, lti_consumer, milestones, mobile_api, moodle, oauth2_provider, oauth_dispatch, organizations, program_enrollments, programs, redirects, rss_proxy, sap_success_factors, schedules, self_paced, sessions, shoppingcart, site_configuration, sites, social_django, splash, static_replace, status, student, submissions, super_csv, survey, system_wide_roles, teams, theming, third_party_auth, thumbnail, track, user_api, user_authn, user_tasks, util, verified_track_content, verify_student, video_config, video_pipeline, waffle, waffle_utils, wiki, workflow, xapi, xblock_django
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying announcements.0001_initial... OK
  Applying sites.0001_initial... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying api_admin.0001_initial... OK
  Applying api_admin.0002_auto_20160325_1604... OK
  Applying api_admin.0003_auto_20160404_1618... OK
  Applying api_admin.0004_auto_20160412_1506... OK
  Applying api_admin.0005_auto_20160414_1232... OK
  Applying api_admin.0006_catalog... OK
  Applying api_admin.0007_delete_historical_api_records... OK
  Applying assessment.0001_initial... OK
  Applying assessment.0002_staffworkflow... OK
  Applying assessment.0003_expand_course_id... OK
  Applying assessment.0004_historicalsharedfileupload_sharedfileupload... OK
  Applying assessment.0005_add_filename_to_sharedupload... OK
  Applying assessment.0006_TeamWorkflows... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying instructor_task.0001_initial... OK
  Applying certificates.0001_initial... OK
  Applying certificates.0002_data__certificatehtmlviewconfiguration_data... OK
  Applying certificates.0003_data__default_modes... OK
  Applying certificates.0004_certificategenerationhistory... OK
  Applying certificates.0005_auto_20151208_0801... OK
  Applying certificates.0006_certificatetemplateasset_asset_slug... OK
  Applying certificates.0007_certificateinvalidation... OK
  Applying badges.0001_initial... OK
  Applying badges.0002_data__migrate_assertions... OK
  Applying badges.0003_schema__add_event_configuration... OK
  Applying waffle.0001_initial... OK
  Applying sites.0002_alter_domain_unique... OK
  Applying enterprise.0001_squashed_0092_auto_20200312_1650... OK
  Applying enterprise.0093_add_use_enterprise_catalog_flag... OK
  Applying enterprise.0094_add_use_enterprise_catalog_sample... OK
  Applying enterprise.0095_auto_20200507_1138... OK
  Applying enterprise.0096_enterprise_catalog_admin_role... OK
  Applying enterprise.0097_auto_20200619_1130... OK
  Applying enterprise.0098_auto_20200629_1756... OK
  Applying enterprise.0099_auto_20200702_1537... OK
  Applying enterprise.0100_add_licensed_enterprise_course_enrollment... OK
  Applying enterprise.0101_move_data_to_saved_for_later... OK
  Applying enterprise.0102_auto_20200708_1615... OK
  Applying enterprise.0103_remove_marked_done... OK
  Applying enterprise.0104_sync_query_field... OK
  Applying enterprise.0105_add_branding_config_color_fields... OK
  Applying enterprise.0106_move_branding_config_colors... OK
  Applying enterprise.0107_remove_branding_config_banner_fields... OK
  Applying enterprise.0108_add_licensed_enrollment_is_revoked... OK
  Applying enterprise.0109_remove_use_enterprise_catalog_sample... OK
  Applying enterprise.0110_add_default_contract_discount... OK
  Applying enterprise.0111_pendingenterprisecustomeradminuser... OK
  Applying enterprise.0112_auto_20200914_0926... OK
  Applying enterprise.0113_auto_20200914_2054... OK
  Applying blackboard.0001_initial... OK
  Applying blackboard.0002_auto_20200930_1723... OK
  Applying blackboard.0003_blackboardlearnerdatatransmissionaudit... OK
  Applying blackboard.0004_blackboard_tx_chunk_size_default_1... OK
  Applying blackboard.0005_blackboardlearnerassessmentdatatransmissionaudit... OK
  Applying block_structure.0001_config... OK
  Applying block_structure.0002_blockstructuremodel... OK
  Applying block_structure.0003_blockstructuremodel_storage... OK
  Applying block_structure.0004_blockstructuremodel_usagekeywithrun... OK
  Applying block_structure.0005_trim_leading_slashes_in_data_path... OK
  Applying bookmarks.0001_initial... OK
  Applying branding.0001_initial... OK
  Applying course_modes.0001_initial... OK
  Applying course_modes.0002_coursemode_expiration_datetime_is_explicit... OK
  Applying course_modes.0003_auto_20151113_1443... OK
  Applying course_modes.0004_auto_20151113_1457... OK
  Applying course_modes.0005_auto_20151217_0958... OK
  Applying course_modes.0006_auto_20160208_1407... OK
  Applying course_modes.0007_coursemode_bulk_sku... OK
  Applying course_groups.0001_initial... OK
  Applying bulk_email.0001_initial... OK
  Applying bulk_email.0002_data__load_course_email_template...Installed 2 object(s) from 1 fixture(s)
 OK
  Applying bulk_email.0003_config_model_feature_flag... OK
  Applying bulk_email.0004_add_email_targets... OK
  Applying bulk_email.0005_move_target_data... OK
  Applying bulk_email.0006_course_mode_targets... OK
  Applying courseware.0001_initial... OK
  Applying bulk_grades.0001_initial... OK
  Applying bulk_grades.0002_auto_20190703_1526... OK
  Applying calendar_sync.0001_initial... OK
  Applying calendar_sync.0002_auto_20200709_1743... OK
  Applying canvas.0001_initial... OK
  Applying canvas.0002_auto_20200806_1632... OK
  Applying canvas.0003_delete_canvasglobalconfiguration... OK
  Applying canvas.0004_adding_learner_data_to_canvas... OK
  Applying canvas.0005_auto_20200909_1534... OK
  Applying canvas.0006_canvaslearnerassessmentdatatransmissionaudit... OK
  Applying canvas.0007_auto_20210222_2225... OK
  Applying catalog.0001_initial... OK
  Applying catalog.0002_catalogintegration_username... OK
  Applying catalog.0003_catalogintegration_page_size... OK
  Applying catalog.0004_auto_20170616_0618... OK
  Applying catalog.0005_catalogintegration_long_term_cache_ttl... OK
  Applying celery_utils.0001_initial... OK
  Applying celery_utils.0002_chordable_django_backend... OK
  Applying certificates.0008_schema__remove_badges... OK
  Applying certificates.0009_certificategenerationcoursesetting_language_self_generation... OK
  Applying certificates.0010_certificatetemplate_language... OK
  Applying certificates.0011_certificatetemplate_alter_unique... OK
  Applying certificates.0012_certificategenerationcoursesetting_include_hours_of_effort... OK
  Applying certificates.0013_remove_certificategenerationcoursesetting_enabled... OK
  Applying certificates.0014_change_eligible_certs_manager... OK
  Applying certificates.0015_add_masters_choice... OK
  Applying certificates.0016_historicalgeneratedcertificate... OK
  Applying certificates.0017_add_mode_20201118_1725... OK
  Applying certificates.0018_historicalcertificateinvalidation... OK
  Applying certificates.0019_allowlistgenerationconfiguration... OK
  Applying certificates.0020_remove_existing_mgmt_cmd_args... OK
  Applying certificates.0021_remove_certificate_allowlist_duplicate_records... OK
  Applying certificates.0022_add_unique_constraints_to_certificatewhitelist_model... OK
  Applying certificates.0023_certificategenerationcommandconfiguration... OK
  Applying certificates.0024_delete_allowlistgenerationconfiguration... OK
  Applying user_api.0001_initial... OK
  Applying user_api.0002_retirementstate_userretirementstatus... OK
2021-11-13 00:37:23,499 INFO 15 [tracking] [user None] [ip None] logger.py:41 - {"name": "edx.user.settings.changed", "context": {}, "username": "", "session": "", "ip": "", "agent": "", "host": "", "referer": "", "accept_language": "", "event": {"old": null, "new": null, "truncated": [], "setting": "password", "user_id": 1, "table": "auth_user"}, "time": "2021-11-13T00:37:23.499516+00:00", "event_type": "edx.user.settings.changed", "event_source": "server", "page": null}
  Applying commerce.0001_data__add_ecommerce_service_user... OK
  Applying commerce.0002_commerceconfiguration... OK
  Applying commerce.0003_auto_20160329_0709... OK
  Applying commerce.0004_auto_20160531_0950... OK
  Applying commerce.0005_commerceconfiguration_enable_automatic_refund_approval... OK
  Applying commerce.0006_auto_20170424_1734... OK
  Applying commerce.0007_auto_20180313_0609... OK
  Applying commerce.0008_auto_20191024_2048... OK
  Applying completion.0001_initial... OK
  Applying completion.0002_auto_20180125_1510... OK
  Applying completion.0003_learning_context... OK
  Applying consent.0001_initial... OK
  Applying consent.0002_migrate_to_new_data_sharing_consent... OK
  Applying consent.0003_historicaldatasharingconsent_history_change_reason... OK
  Applying consent.0004_datasharingconsenttextoverrides... OK
  Applying organizations.0001_squashed_0007_historicalorganization... OK
  Applying content_libraries.0001_initial... OK
  Applying content_libraries.0002_group_permissions... OK
  Applying content_libraries.0003_contentlibrary_type... OK
  Applying content_libraries.0004_contentlibrary_license... OK
  Applying course_overviews.0001_initial... OK
  Applying course_overviews.0002_add_course_catalog_fields... OK
  Applying course_overviews.0003_courseoverviewgeneratedhistory... OK
  Applying course_overviews.0004_courseoverview_org... OK
  Applying course_overviews.0005_delete_courseoverviewgeneratedhistory... OK
  Applying course_overviews.0006_courseoverviewimageset... OK
  Applying course_overviews.0007_courseoverviewimageconfig... OK
  Applying course_overviews.0008_remove_courseoverview_facebook_url... OK
  Applying course_overviews.0009_readd_facebook_url... OK
  Applying course_overviews.0010_auto_20160329_2317... OK
  Applying course_overviews.0011_courseoverview_marketing_url... OK
  Applying course_overviews.0012_courseoverview_eligible_for_financial_aid... OK
  Applying course_overviews.0013_courseoverview_language... OK
  Applying course_overviews.0014_courseoverview_certificate_available_date... OK
  Applying content_type_gating.0001_initial... OK
  Applying content_type_gating.0002_auto_20181119_0959... OK
  Applying content_type_gating.0003_auto_20181128_1407... OK
  Applying content_type_gating.0004_auto_20181128_1521... OK
  Applying content_type_gating.0005_auto_20190306_1547... OK
  Applying content_type_gating.0006_auto_20190308_1447... OK
  Applying content_type_gating.0007_auto_20190311_1919... OK
  Applying content_type_gating.0008_auto_20190313_1634... OK
  Applying contentserver.0001_initial... OK
  Applying contentserver.0002_cdnuseragentsconfig... OK
  Applying cornerstone.0001_initial... OK
  Applying cornerstone.0002_cornerstoneglobalconfiguration_subject_mapping... OK
  Applying cornerstone.0003_auto_20190621_1000... OK
  Applying cornerstone.0004_cornerstoneglobalconfiguration_languages... OK
  Applying cornerstone.0005_auto_20190925_0730... OK
  Applying cornerstone.0006_auto_20191001_0742... OK
  Applying cors_csrf.0001_initial... OK
  Applying course_action_state.0001_initial... OK
  Applying course_overviews.0015_historicalcourseoverview... OK
  Applying course_overviews.0016_simulatecoursepublishconfig... OK
  Applying course_overviews.0017_auto_20191002_0823... OK
  Applying course_overviews.0018_add_start_end_in_CourseOverview... OK
  Applying course_overviews.0019_improve_courseoverviewtab... OK
  Applying course_date_signals.0001_initial... OK
  Applying course_duration_limits.0001_initial... OK
  Applying course_duration_limits.0002_auto_20181119_0959... OK
  Applying course_duration_limits.0003_auto_20181128_1407... OK
  Applying course_duration_limits.0004_auto_20181128_1521... OK
  Applying course_duration_limits.0005_auto_20190306_1546... OK
  Applying course_duration_limits.0006_auto_20190308_1447... OK
  Applying course_duration_limits.0007_auto_20190311_1919... OK
  Applying course_duration_limits.0008_auto_20190313_1634... OK
  Applying course_goals.0001_initial... OK
  Applying course_goals.0002_auto_20171010_1129... OK
  Applying course_groups.0002_change_inline_default_cohort_value... OK
  Applying course_groups.0003_auto_20170609_1455... OK
  Applying course_modes.0008_course_key_field_to_foreign_key... OK
  Applying course_modes.0009_suggested_prices_to_charfield... OK
  Applying course_modes.0010_archived_suggested_prices_to_charfield... OK
  Applying course_modes.0011_change_regex_for_comma_separated_ints... OK
  Applying course_modes.0012_historicalcoursemode... OK
  Applying course_modes.0013_auto_20200115_2022... OK
  Applying course_overviews.0020_courseoverviewtab_url_slug... OK
  Applying course_overviews.0021_courseoverviewtab_link... OK
  Applying course_overviews.0022_courseoverviewtab_is_hidden... OK
  Applying course_overviews.0023_courseoverview_banner_image_url... OK
  Applying course_overviews.0024_overview_adds_has_highlights... OK
  Applying courseware.0002_coursedynamicupgradedeadlineconfiguration_dynamicupgradedeadlineconfiguration... OK
  Applying courseware.0003_auto_20170825_0935... OK
  Applying courseware.0004_auto_20171010_1639... OK
  Applying courseware.0005_orgdynamicupgradedeadlineconfiguration... OK
  Applying courseware.0006_remove_module_id_index... OK
  Applying courseware.0007_remove_done_index... OK
  Applying courseware.0008_move_idde_to_edx_when... OK
  Applying courseware.0009_auto_20190703_1955... OK
  Applying courseware.0010_auto_20190709_1559... OK
  Applying courseware.0011_csm_id_bigint... OK
  Applying courseware.0012_adjust_fields... OK
  Applying courseware.0013_auto_20191001_1858... OK
  Applying courseware.0014_fix_nan_value_for_global_speed... OK
  Applying courseware.0015_add_courseware_stats_index... OK
  Applying crawlers.0001_initial... OK
  Applying crawlers.0002_auto_20170419_0018... OK
  Applying credentials.0001_initial... OK
  Applying credentials.0002_auto_20160325_0631... OK
  Applying credentials.0003_auto_20170525_1109... OK
  Applying credentials.0004_notifycredentialsconfig... OK
  Applying credentials.0005_remove_existing_mgmt_cmd_args... OK
  Applying credit.0001_initial... OK
  Applying credit.0002_creditconfig... OK
  Applying credit.0003_auto_20160511_2227... OK
  Applying credit.0004_delete_historical_credit_records... OK
  Applying credit.0005_creditrequirement_sort_value... OK
  Applying credit.0006_creditrequirement_alter_ordering... OK
  Applying credit.0007_creditrequirement_copy_values... OK
  Applying credit.0008_creditrequirement_remove_order... OK
  Applying dark_lang.0001_initial... OK
  Applying dark_lang.0002_data__enable_on_install... OK
  Applying dark_lang.0003_auto_20180425_0359... OK
  Applying database_fixups.0001_initial... OK
  Applying degreed.0001_initial... OK
  Applying degreed.0002_auto_20180104_0103... OK
  Applying degreed.0003_auto_20180109_0712... OK
  Applying degreed.0004_auto_20180306_1251... OK
  Applying degreed.0005_auto_20180807_1302... OK
  Applying degreed.0006_upgrade_django_simple_history... OK
  Applying degreed.0007_auto_20190925_0730... OK
  Applying degreed.0008_auto_20191001_0742... OK
  Applying degreed.0009_auto_20210119_1546... OK
  Applying demographics.0001_initial... OK
  Applying demographics.0002_clean_duplicate_entries... OK
  Applying demographics.0003_auto_20200827_1949... OK
  Applying discounts.0001_initial... OK
  Applying discounts.0002_auto_20191022_1720... OK
  Applying lti_consumer.0001_initial... OK
  Applying discussions.0001_initial... OK
  Applying discussions.0002_add_provider_filter... OK
  Applying discussions.0003_alter_provider_filter_list... OK
  Applying django_celery_results.0001_initial... OK
  Applying django_celery_results.0002_add_task_name_args_kwargs... OK
  Applying django_celery_results.0003_auto_20181106_1101... OK
  Applying django_celery_results.0004_auto_20190516_0412... OK
  Applying django_celery_results.0005_taskresult_worker... OK
  Applying django_celery_results.0006_taskresult_date_created... OK
  Applying django_celery_results.0007_remove_taskresult_hidden... OK
  Applying django_celery_results.0008_chordcounter... OK
  Applying django_comment_common.0001_initial... OK
  Applying django_comment_common.0002_forumsconfig... OK
  Applying django_comment_common.0003_enable_forums... OK
  Applying django_comment_common.0004_auto_20161117_1209... OK
  Applying django_comment_common.0005_coursediscussionsettings... OK
  Applying django_comment_common.0006_coursediscussionsettings_discussions_id_map... OK
  Applying django_comment_common.0007_discussionsidmapping... OK
  Applying django_comment_common.0008_role_user_index... OK
  Applying django_notify.0001_initial... OK
  Applying edx_proctoring.0001_initial... OK
  Applying edx_proctoring.0002_proctoredexamstudentattempt_is_status_acknowledged... OK
  Applying edx_proctoring.0003_auto_20160101_0525... OK
  Applying edx_proctoring.0004_auto_20160201_0523... OK
  Applying edx_proctoring.0005_proctoredexam_hide_after_due... OK
  Applying edx_proctoring.0006_allowed_time_limit_mins... OK
  Applying edx_proctoring.0007_proctoredexam_backend... OK
  Applying edx_proctoring.0008_auto_20181116_1551... OK
  Applying edx_proctoring.0009_proctoredexamreviewpolicy_remove_rules... OK
  Applying edx_proctoring.0010_update_backend... OK
  Applying edx_proctoring.0011_allow_multiple_attempts... OK
  Applying edx_proctoring.0012_proctoredexamstudentattempt_time_remaining_seconds... OK
  Applying edx_proctoring.0013_proctoredexamsoftwaresecurereview_is_active_attempt... OK
  Applying edx_when.0001_initial... OK
  Applying edx_when.0002_auto_20190318_1736... OK
  Applying edx_when.0003_auto_20190402_1501... OK
  Applying edx_when.0004_datepolicy_rel_date... OK
  Applying edx_when.0005_auto_20190911_1056... OK
  Applying edx_when.0006_drop_active_index... OK
  Applying edx_when.0007_meta_tweaks... OK
  Applying edxval.0001_squashed_0016_add_transcript_credentials_model... OK
  Applying edxval.0002_add_error_description_field... OK
  Applying edxval.0003_delete_transcriptcredentials... OK
  Applying email_marketing.0001_initial... OK
  Applying email_marketing.0002_auto_20160623_1656... OK
  Applying email_marketing.0003_auto_20160715_1145... OK
  Applying email_marketing.0004_emailmarketingconfiguration_welcome_email_send_delay... OK
  Applying email_marketing.0005_emailmarketingconfiguration_user_registration_cookie_timeout_delay... OK
  Applying email_marketing.0006_auto_20170711_0615... OK
  Applying email_marketing.0007_auto_20170809_0653... OK
  Applying email_marketing.0008_auto_20170809_0539... OK
  Applying email_marketing.0009_remove_emailmarketingconfiguration_sailthru_activation_template... OK
  Applying email_marketing.0010_auto_20180425_0800... OK
  Applying embargo.0001_initial... OK
  Applying embargo.0002_data__add_countries... OK
  Applying enterprise.0114_auto_20201020_0142... OK
  Applying enterprise.0115_enterpriseanalyticsuser_historicalenterpriseanalyticsuser... OK
  Applying enterprise.0116_auto_20201116_0400... OK
  Applying enterprise.0116_auto_20201208_1759... OK
  Applying enterprise.0117_auto_20201215_0258... OK
  Applying enterprise.unique_constraints_pending_users... OK
  Applying enterprise.0001_auto_20210111_1253... OK
  Applying enterprise.0120_systemwiderole_applies_to_all_contexts... OK
  Applying enterprise.0121_systemwiderole_add_ent_cust_field... OK
  Applying enterprise.0122_remove_field_sync_enterprise_catalog_query... OK
  Applying enterprise.0123_enterprisecustomeridentityprovider_default_provider... OK
  Applying enterprise.0124_auto_20210301_1309... OK
  Applying enterprise.0125_add_config_for_role_assign_backfill... OK
  Applying enterprise.0126_auto_20210308_1522... OK
  Applying experiments.0001_initial... OK
  Applying student.0001_squashed_0031_auto_20200317_1122... OK
  Applying entitlements.0001_initial... OK
  Applying entitlements.0002_auto_20171102_0719... OK
  Applying entitlements.0003_auto_20171205_1431... OK
  Applying entitlements.0004_auto_20171206_1729... OK
  Applying entitlements.0005_courseentitlementsupportdetail... OK
  Applying entitlements.0006_courseentitlementsupportdetail_action... OK
  Applying entitlements.0007_change_expiration_period_default... OK
  Applying entitlements.0008_auto_20180328_1107... OK
  Applying entitlements.0009_courseentitlement_refund_locked... OK
  Applying entitlements.0010_backfill_refund_lock... OK
  Applying entitlements.0011_historicalcourseentitlement... OK
  Applying entitlements.0012_allow_blank_order_number_values... OK
  Applying entitlements.0013_historicalcourseentitlementsupportdetail... OK
  Applying entitlements.0014_auto_20200115_2022... OK
  Applying entitlements.0015_add_unique_together_constraint... OK
  Applying event_routing_backends.0001_initial... OK
  Applying experiments.0002_auto_20170627_1402... OK
  Applying experiments.0003_auto_20170713_1148... OK
  Applying experiments.0004_historicalexperimentkeyvalue... OK
  Applying external_user_ids.0001_initial... OK
  Applying external_user_ids.0002_mb_coaching_20200210_1754... OK
  Applying external_user_ids.0003_auto_20200224_1836... OK
  Applying external_user_ids.0004_add_lti_type... OK
  Applying grades.0001_initial... OK
  Applying grades.0002_rename_last_edited_field... OK
  Applying grades.0003_coursepersistentgradesflag_persistentgradesenabledflag... OK
  Applying grades.0004_visibleblocks_course_id... OK
  Applying grades.0005_multiple_course_flags... OK
  Applying grades.0006_persistent_course_grades... OK
  Applying grades.0007_add_passed_timestamp_column... OK
  Applying grades.0008_persistentsubsectiongrade_first_attempted... OK
  Applying grades.0009_auto_20170111_1507... OK
  Applying grades.0010_auto_20170112_1156... OK
  Applying grades.0011_null_edited_time... OK
  Applying grades.0012_computegradessetting... OK
  Applying grades.0013_persistentsubsectiongradeoverride... OK
  Applying grades.0014_persistentsubsectiongradeoverridehistory... OK
  Applying grades.0015_historicalpersistentsubsectiongradeoverride... OK
  Applying grades.0016_auto_20190703_1446... OK
  Applying grades.0017_delete_manual_psgoverride_table... OK
  Applying grades.0018_add_waffle_flag_defaults... OK
  Applying instructor_task.0002_gradereportsetting... OK
  Applying instructor_task.0003_alter_task_input_field... OK
  Applying sap_success_factors.0001_squashed_0022_auto_20200206_1046... OK
  Applying integrated_channel.0001_squashed_0007_auto_20190925_0730... OK
  Applying integrated_channel.0002_learnerdatatransmissionaudit_subsection_id... OK
  Applying learning_sequences.0001_initial... OK
  Applying learning_sequences.0002_coursesectionsequence_inaccessible_after_due... OK
  Applying learning_sequences.0003_create_course_context_for_course_specific_models... OK
  Applying learning_sequences.0004_coursecontext_self_paced... OK
  Applying learning_sequences.0005_coursecontext_days_early_for_beta... OK
  Applying learning_sequences.0006_coursecontext_entrance_exam_id... OK
  Applying learning_sequences.0007_coursesequenceexam... OK
  Applying learning_sequences.0008_add_learning_context_title_index... OK
  Applying learning_sequences.0009_contenterror_publishreport... OK
  Applying learning_sequences.0010_add_publishreport_indexes... OK
  Applying learning_sequences.0011_course_meta_names... OK
  Applying lms_xblock.0001_initial... OK
  Applying lti_consumer.0002_ltiagslineitem... OK
  Applying lti_consumer.0003_ltiagsscore... OK
  Applying lti_consumer.0004_keyset_mgmt_to_model... OK
  Applying lti_consumer.0005_migrate_keyset_to_model... OK
  Applying lti_consumer.0006_add_on_model_config_for_lti_1p1... OK
  Applying lti_consumer.0007_ltidlcontentitem... OK
  Applying lti_consumer.0008_fix_uuid_backfill... OK
  Applying lti_consumer.0009_backfill-empty-string-config-id... OK
  Applying lti_consumer.0010_backfill-empty-string-lti-config... OK
  Applying milestones.0001_initial... OK
  Applying milestones.0002_data__seed_relationship_types... OK
  Applying milestones.0003_coursecontentmilestone_requirements... OK
  Applying milestones.0004_auto_20151221_1445... OK
  Applying mobile_api.0001_initial... OK
  Applying mobile_api.0002_auto_20160406_0904... OK
  Applying mobile_api.0003_ignore_mobile_available_flag... OK
  Applying moodle.0001_initial... OK
  Applying moodle.0002_moodlelearnerdatatransmissionaudit... OK
  Applying moodle.0003_auto_20201006_1706... OK
  Applying moodle.0004_auto_20201105_1921... OK
  Applying oauth2_provider.0001_initial... OK
  Applying oauth2_provider.0002_auto_20190406_1805... OK
  Applying oauth_dispatch.0001_initial... OK
  Applying oauth_dispatch.0002_scopedapplication_scopedapplicationorganization... OK
  Applying oauth_dispatch.0003_application_data... OK
  Applying oauth_dispatch.0004_auto_20180626_1349... OK
  Applying oauth_dispatch.0005_applicationaccess_type... OK
  Applying oauth_dispatch.0006_drop_application_id_constraints... OK
  Applying oauth_dispatch.0007_restore_application_id_constraints... OK
  Applying oauth_dispatch.0008_applicationaccess_filters... OK
  Applying oauth_dispatch.0009_delete_enable_scopes_waffle_switch... OK
  Applying organizations.0002_unique_short_name... OK
  Applying organizations.0003_historicalorganizationcourse... OK
  Applying program_enrollments.0001_initial... OK
  Applying program_enrollments.0002_historicalprogramcourseenrollment_programcourseenrollment... OK
  Applying program_enrollments.0003_auto_20190424_1622... OK
  Applying program_enrollments.0004_add_programcourseenrollment_relatedname... OK
  Applying program_enrollments.0005_canceled_not_withdrawn... OK
  Applying program_enrollments.0006_add_the_correct_constraints... OK
  Applying program_enrollments.0007_waiting_programcourseenrollment_constraint... OK
  Applying program_enrollments.0008_add_ended_programenrollment_status... OK
  Applying program_enrollments.0009_update_course_enrollment_field_to_foreign_key... OK
  Applying program_enrollments.0010_add_courseaccessroleassignment... OK
  Applying programs.0001_initial... OK
  Applying programs.0002_programsapiconfig_cache_ttl... OK
  Applying programs.0003_auto_20151120_1613... OK
  Applying programs.0004_programsapiconfig_enable_certification... OK
  Applying programs.0005_programsapiconfig_max_retries... OK
  Applying programs.0006_programsapiconfig_xseries_ad_enabled... OK
  Applying programs.0007_programsapiconfig_program_listing_enabled... OK
  Applying programs.0008_programsapiconfig_program_details_enabled... OK
  Applying programs.0009_programsapiconfig_marketing_path... OK
  Applying programs.0010_auto_20170204_2332... OK
  Applying programs.0011_auto_20170301_1844... OK
  Applying programs.0012_auto_20170419_0018... OK
  Applying programs.0013_customprogramsconfig... OK
  Applying redirects.0001_initial... OK
  Applying rss_proxy.0001_initial... OK
  Applying sap_success_factors.0002_sapsuccessfactorslearnerdatatransmissionaudit_credit_hours... OK
  Applying schedules.0001_initial... OK
  Applying schedules.0002_auto_20170816_1532... OK
  Applying schedules.0003_scheduleconfig... OK
  Applying schedules.0004_auto_20170922_1428... OK
  Applying schedules.0005_auto_20171010_1722... OK
  Applying schedules.0006_scheduleexperience... OK
  Applying schedules.0007_scheduleconfig_hold_back_ratio... OK
  Applying schedules.0008_add_new_start_date_field... OK
  Applying schedules.0009_schedule_copy_column_values... OK
  Applying schedules.0010_remove_null_blank_from_schedules_date... OK
  Applying schedules.0011_auto_20200228_2018... OK
  Applying schedules.0012_auto_20200302_1914... OK
  Applying schedules.0013_historicalschedule... OK
  Applying schedules.0014_historicalschedule_drop_fk... OK
  Applying schedules.0015_schedules_start_nullable... OK
  Applying schedules.0016_remove_start_from_schedules... OK
  Applying schedules.0017_remove_start_from_historicalschedule... OK
  Applying schedules.0018_readd_historicalschedule_fks... OK
  Applying schedules.0019_auto_20200316_1935... OK
  Applying schedules.0020_remove_config_rollout_fields... OK
  Applying self_paced.0001_initial... OK
  Applying sessions.0001_initial... OK
  Applying shoppingcart.0001_initial... OK
  Applying shoppingcart.0002_auto_20151208_1034... OK
  Applying shoppingcart.0003_auto_20151217_0958... OK
  Applying shoppingcart.0004_change_meta_options... OK
  Applying shoppingcart.0005_drop_tables... OK
  Applying site_configuration.0001_initial... OK
  Applying site_configuration.0002_auto_20160720_0231... OK
  Applying site_configuration.0003_auto_20200217_1058... OK
  Applying site_configuration.0004_add_site_values_field... OK
  Applying site_configuration.0005_populate_siteconfig_history_site_values... OK
  Applying site_configuration.0006_copy_values_to_site_values... OK
  Applying site_configuration.0007_remove_values_field... OK
  Applying social_django.0001_initial... OK
  Applying social_django.0002_add_related_name... OK
  Applying social_django.0003_alter_email_max_length... OK
  Applying social_django.0004_auto_20160423_0400... OK
  Applying social_django.0005_auto_20160727_2333... OK
  Applying social_django.0006_partial... OK
  Applying social_django.0007_code_timestamp... OK
  Applying social_django.0008_partial_timestamp... OK
  Applying social_django.0009_auto_20191118_0520... OK
  Applying social_django.0010_uid_db_index... OK
  Applying splash.0001_initial... OK
  Applying static_replace.0001_initial... OK
  Applying static_replace.0002_assetexcludedextensionsconfig... OK
  Applying status.0001_initial... OK
  Applying status.0002_update_help_text... OK
  Applying student.0032_removed_logout_view_configuration... OK
  Applying student.0033_userprofile_state... OK
  Applying student.0034_courseenrollmentcelebration... OK
  Applying student.0035_bulkchangeenrollmentconfiguration... OK
  Applying student.0036_userpasswordtogglehistory... OK
  Applying student.0037_linkedinaddtoprofileconfiguration_updates... OK
  Applying student.0038_auto_20201021_1256... OK
  Applying student.0039_anon_id_context... OK
  Applying student.0040_usercelebration... OK
  Applying student.0041_registration_activation_timestamp... OK
  Applying submissions.0001_squashed_0005_CreateTeamModel... OK
  Applying super_csv.0001_initial... OK
  Applying super_csv.0002_csvoperation_user... OK
  Applying super_csv.0003_csvoperation_original_filename... OK
  Applying survey.0001_initial... OK
  Applying system_wide_roles.0001_SystemWideRole_SystemWideRoleAssignment... OK
  Applying system_wide_roles.0002_add_system_wide_student_support_role... OK
  Applying system_wide_roles.0003_systemwideroleassignment_applies_to_all_contexts... OK
  Applying teams.0001_initial... OK
  Applying teams.0002_slug_field_ids... OK
  Applying teams.0003_courseteam_organization_protected... OK
  Applying teams.0004_alter_defaults... OK
  Applying theming.0001_initial... OK
  Applying third_party_auth.0001_squashed_0026_auto_20200401_1932... OK
  Applying third_party_auth.0002_samlproviderconfig_country... OK
  Applying third_party_auth.0002_auto_20200721_1650... OK
  Applying third_party_auth.0003_samlconfiguration_is_public... OK
  Applying third_party_auth.0004_auto_20200919_0955... OK
  Applying thumbnail.0001_initial... OK
  Applying track.0001_initial... OK
  Applying track.0002_delete_trackinglog... OK
  Applying user_api.0003_userretirementrequest... OK
  Applying user_api.0004_userretirementpartnerreportingstatus... OK
2021-11-13 00:40:47,611 INFO 15 [tracking] [user None] [ip None] logger.py:41 - {"name": "edx.user.settings.changed", "context": {}, "username": "", "session": "", "ip": "", "agent": "", "host": "", "referer": "", "accept_language": "", "event": {"old": null, "new": null, "truncated": [], "setting": "password", "user_id": 2, "table": "auth_user"}, "time": "2021-11-13T00:40:47.611217+00:00", "event_type": "edx.user.settings.changed", "event_source": "server", "page": null}
  Applying user_authn.0001_data__add_login_service... OK
  Applying user_tasks.0001_initial... OK
  Applying user_tasks.0002_artifact_file_storage... OK
  Applying user_tasks.0003_url_max_length... OK
  Applying user_tasks.0004_url_textfield... OK
  Applying util.0001_initial... OK
  Applying util.0002_data__default_rate_limit_config... OK
  Applying verified_track_content.0001_initial... OK
  Applying verified_track_content.0002_verifiedtrackcohortedcourse_verified_cohort_name... OK
  Applying verified_track_content.0003_migrateverifiedtrackcohortssetting... OK
  Applying verify_student.0001_initial... OK
  Applying verify_student.0002_auto_20151124_1024... OK
  Applying verify_student.0003_auto_20151113_1443... OK
  Applying verify_student.0004_delete_historical_records... OK
  Applying verify_student.0005_remove_deprecated_models... OK
  Applying verify_student.0006_ssoverification... OK
  Applying verify_student.0007_idverificationaggregate... OK
  Applying verify_student.0008_populate_idverificationaggregate... OK
  Applying verify_student.0009_remove_id_verification_aggregate... OK
  Applying verify_student.0010_manualverification... OK
  Applying verify_student.0011_add_fields_to_sspv... OK
  Applying verify_student.0012_sspverificationretryconfig... OK
  Applying verify_student.0013_add_expiration_date_field... OK
  Applying video_config.0001_initial... OK
  Applying video_config.0002_coursevideotranscriptenabledflag_videotranscriptenabledflag... OK
  Applying video_config.0003_transcriptmigrationsetting... OK
  Applying video_config.0004_transcriptmigrationsetting_command_run... OK
  Applying video_config.0005_auto_20180719_0752... OK
  Applying video_config.0006_videothumbnailetting_updatedcoursevideos... OK
  Applying video_config.0007_videothumbnailsetting_offset... OK
  Applying video_config.0008_courseyoutubeblockedflag... OK
  Applying video_pipeline.0001_initial... OK
  Applying video_pipeline.0002_auto_20171114_0704... OK
  Applying video_pipeline.0003_coursevideouploadsenabledbydefault_videouploadsenabledbydefault... OK
  Applying video_pipeline.0004_vempipelineintegration... OK
  Applying video_pipeline.0005_add_vem_course_percentage... OK
  Applying video_pipeline.0006_remove_vempipelineintegration_vem_enabled_courses_percentage... OK
  Applying video_pipeline.0007_delete_videopipelineintegration... OK
  Applying waffle.0002_auto_20161201_0958... OK
  Applying waffle.0003_update_strings_for_i18n... OK
  Applying waffle.0004_update_everyone_nullbooleanfield... OK
  Applying waffle_utils.0001_initial... OK
  Applying wiki.0001_initial... OK
  Applying wiki.0002_remove_article_subscription... OK
  Applying wiki.0003_ip_address_conv... OK
  Applying wiki.0004_increase_slug_size... OK
  Applying wiki.0005_remove_attachments_and_images... OK
  Applying wiki.0006_auto_20200110_1003... OK
  Applying workflow.0001_initial... OK
  Applying workflow.0002_remove_django_extensions... OK
  Applying workflow.0003_TeamWorkflows... OK
  Applying workflow.0004_assessmentworkflowstep_skipped... OK
  Applying xapi.0001_initial... OK
  Applying xapi.0002_auto_20180726_0142... OK
  Applying xapi.0003_auto_20190807_1006... OK
  Applying xapi.0004_auto_20190830_0710... OK
  Applying xblock_django.0001_initial... OK
  Applying xblock_django.0002_auto_20160204_0809... OK
  Applying xblock_django.0003_add_new_config_models... OK
  Applying xblock_django.0004_delete_xblock_disable_config... OK
Creating switch: completion.enable_completion_tracking
Initialising cms...
docker-compose -f /home/c/.local/share/tutor/env/local/docker-compose.yml -f /home/c/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /home/c/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm cms-job sh -e -c dockerize -wait tcp://mysql:3306 -timeout 20s

echo "Loading settings $DJANGO_SETTINGS_MODULE"

./manage.py cms migrate

# Fix incorrect uploaded file path
if [ -d /openedx/data/uploads/ ]; then
  if [ -n "$(ls -A /openedx/data/uploads/)" ]; then
    echo "Migrating CMS uploaded files to shared directory"
    mv /openedx/data/uploads/* /openedx/media/
    rm -rf /openedx/data/uploads/
  fi
fi
[+] Running 1/0
 ⠿ Container tutor_local-mysql-1  Running                                                                          0.0s
2021/11/13 00:41:58 Waiting for: tcp://mysql:3306
2021/11/13 00:41:58 Connected to tcp://mysql:3306
Loading settings cms.envs.tutor.production
2021-11-13 00:42:04,037 WARNING 14 [py.warnings] [user None] [ip None] warnings.py:109 - /openedx/venv/lib/python3.8/site-packages/storages/backends/s3boto.py:41: DeprecationWarning: The S3BotoStorage backend is deprecated in favor of the S3Boto3Storage backend and will be removed in django-storages 1.8. This backend is mostly in bugfix only mode and has been for quite a while (in much the same way as its underlying library 'boto'). For performance, security and new feature reasons it is _strongly_ recommended that you update to the S3Boto3Storage backend. Please see the migration docs https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#migrating-boto-to-boto3.
  warnings.warn(

Operations to perform:
  Apply all migrations: admin, announcements, api_admin, assessment, auth, blackboard, block_structure, bookmarks, canvas, catalog, celery_utils, completion, consent, content_libraries, content_type_gating, contentserver, contentstore, contenttypes, cornerstone, cors_csrf, course_action_state, course_creators, course_date_signals, course_duration_limits, course_groups, course_modes, course_overviews, courseware, crawlers, credit, dark_lang, database_fixups, degreed, discounts, discussions, django_celery_results, django_comment_common, django_notify, edx_proctoring, edx_when, edxval, embargo, enterprise, entitlements, event_routing_backends, experiments, external_user_ids, integrated_channel, learning_sequences, lti_consumer, milestones, moodle, oauth2_provider, oauth_dispatch, organizations, programs, redirects, sap_success_factors, schedules, self_paced, sessions, site_configuration, sites, static_replace, student, submissions, survey, system_wide_roles, tagging, theming, track, user_api, user_authn, user_tasks, verified_track_content, verify_student, video_config, video_pipeline, waffle, waffle_utils, wiki, workflow, xapi, xblock_config, xblock_django
Running migrations:
  Applying contentstore.0001_initial... OK
  Applying contentstore.0002_add_assets_page_flag... OK
  Applying contentstore.0003_remove_assets_page_flag... OK
  Applying contentstore.0004_remove_push_notification_configmodel_table... OK
  Applying contentstore.0005_add_enable_checklists_quality_waffle_flag... OK
  Applying course_creators.0001_initial... OK
  Applying tagging.0001_initial... OK
  Applying tagging.0002_auto_20170116_1541... OK
  Applying xblock_config.0001_initial... OK
  Applying xblock_config.0002_courseeditltifieldsenabledflag... OK
Initialising forum...
docker-compose -f /home/c/.local/share/tutor/env/local/docker-compose.yml -f /home/c/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /home/c/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm forum-job sh -e -c bundle exec rake search:initialize
bundle exec rake search:rebuild_indices
[+] Running 2/0
 ⠿ Container tutor_local-elasticsearch-1  Running                                                                  0.0s
 ⠿ Container tutor_local-mongodb-1        Running                                                                  0.0s
Waiting for mongodb/elasticsearch...
2021/11/13 00:42:19 Waiting for: tcp://mongodb:27017
2021/11/13 00:42:19 Waiting for: http://elasticsearch:9200
2021/11/13 00:42:19 Connected to tcp://mongodb:27017
2021/11/13 00:42:19 Received 200 from http://elasticsearch:9200
/openedx/cs_comments_service/lib/tasks/deep_search.rake:7: warning: already initialized constant ROOT
/openedx/cs_comments_service/lib/tasks/kpis.rake:7: warning: previous definition of ROOT was here
/openedx/cs_comments_service/lib/tasks/db.rake:28: warning: already initialized constant COURSE_ID
/openedx/cs_comments_service/models/constants.rb:2: warning: previous definition of COURSE_ID was here
/openedx/cs_comments_service/lib/tasks/flags.rake:6: warning: already initialized constant ROOT
/openedx/cs_comments_service/lib/tasks/deep_search.rake:7: warning: previous definition of ROOT was here
W, [2021-11-13T00:42:22.282649 #19]  WARN -- : Overwriting existing field _id in class User.
W, [2021-11-13T00:42:22.334391 #19]  WARN -- : MONGODB | Unsupported client option 'max_retries'. It will be ignored.
W, [2021-11-13T00:42:22.334487 #19]  WARN -- : MONGODB | Unsupported client option 'retry_interval'. It will be ignored.W, [2021-11-13T00:42:22.334514 #19]  WARN -- : MONGODB | Unsupported client option 'timeout'. It will be ignored.
I, [2021-11-13T00:42:23.230981 #19]  INFO -- : New indices ["comments_20211113004222359", "comment_threads_20211113004222359"] are created.
I, [2021-11-13T00:42:23.329168 #19]  INFO -- : Alias [comments] now points to index [comments_20211113004222359].
I, [2021-11-13T00:42:23.400606 #19]  INFO -- : Alias [comment_threads] now points to index [comment_threads_20211113004222359].
/openedx/cs_comments_service/lib/tasks/deep_search.rake:7: warning: already initialized constant ROOT
/openedx/cs_comments_service/lib/tasks/kpis.rake:7: warning: previous definition of ROOT was here
/openedx/cs_comments_service/lib/tasks/db.rake:28: warning: already initialized constant COURSE_ID
/openedx/cs_comments_service/models/constants.rb:2: warning: previous definition of COURSE_ID was here
/openedx/cs_comments_service/lib/tasks/flags.rake:6: warning: already initialized constant ROOT
/openedx/cs_comments_service/lib/tasks/deep_search.rake:7: warning: previous definition of ROOT was here
W, [2021-11-13T00:42:26.463352 #37]  WARN -- : Overwriting existing field _id in class User.
W, [2021-11-13T00:42:26.530973 #37]  WARN -- : MONGODB | Unsupported client option 'max_retries'. It will be ignored.
W, [2021-11-13T00:42:26.531217 #37]  WARN -- : MONGODB | Unsupported client option 'retry_interval'. It will be ignored.W, [2021-11-13T00:42:26.531339 #37]  WARN -- : MONGODB | Unsupported client option 'timeout'. It will be ignored.
I, [2021-11-13T00:42:27.012596 #37]  INFO -- : New indices ["comments_20211113004226549", "comment_threads_20211113004226549"] are created.
I, [2021-11-13T00:42:27.063314 #37]  INFO -- : Catch up from 2021-11-13 00:37:26 UTC complete.
I, [2021-11-13T00:42:27.167068 #37]  INFO -- : Alias [comments] now points to index [comments_20211113004226549].
I, [2021-11-13T00:42:27.253439 #37]  INFO -- : Alias [comment_threads] now points to index [comment_threads_20211113004226549].
I, [2021-11-13T00:42:27.277618 #37]  INFO -- : Catch up from 2021-11-13 00:37:27 UTC complete.
I, [2021-11-13T00:42:27.277737 #37]  INFO -- : Rebuild indices complete.
All services initialised.
The Open edX platform is now running in detached mode
Your Open edX platform is ready and can be accessed at the following urls:

    http://local.overhang.io
    http://studio.local.overhang.io
~/.local/share/tutor/env/local$ cat docker-compose.yml
version: "3.7"
services:

  ############# External services

  mongodb:
    image: docker.io/mongo:4.0.25
    # Use WiredTiger in all environments, just like at edx.org
    command: mongod --smallfiles --nojournal --storageEngine wiredTiger
    restart: unless-stopped
    volumes:
      - ../../data/mongodb:/data/db

  mysql:
    image: docker.io/mysql:5.7.33
    command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
    restart: unless-stopped
    volumes:
      - ../../data/mysql:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: "kH0MC3F8"

  elasticsearch:
    image: docker.io/elasticsearch:7.8.1
    environment:
      - cluster.name=openedx
      - bootstrap.memory_lock=true
      - discovery.type=single-node
      - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
      - TAKE_FILE_OWNERSHIP=1
    ulimits:
      memlock:
        soft: -1
        hard: -1
    restart: unless-stopped
    volumes:
      - ../../data/elasticsearch:/usr/share/elasticsearch/data

  redis:
    image: docker.io/redis:6.2.1
    working_dir: /openedx/redis/data
    volumes:
      - ../apps/redis/redis.conf:/openedx/redis/config/redis.conf:ro
      - ../../data/redis:/openedx/redis/data
    command: redis-server /openedx/redis/config/redis.conf
    restart: unless-stopped

  smtp:
    image: docker.io/namshi/smtp:latest
    restart: unless-stopped

  ############# Forum

  forum:
    image: docker.io/overhangio/openedx-forum:12.1.6
    environment:
      SEARCH_SERVER: "http://elasticsearch:9200"
      MONGODB_AUTH: ""
      MONGODB_HOST: "mongodb"
      MONGODB_PORT: "27017"
      MONGODB_DATABASE: "cs_comments_service"
    restart: unless-stopped
    depends_on: ["elasticsearch", "mongodb"]

  ############# LMS and CMS

  lms:
    image: docker.io/overhangio/openedx:12.1.6
    environment:
      SERVICE_VARIANT: lms
      UWSGI_WORKERS: 2
      SETTINGS: ${TUTOR_EDX_PLATFORM_SETTINGS:-tutor.production}
    restart: unless-stopped
    volumes:
      - ../apps/openedx/settings/lms/:/openedx/edx-platform/lms/envs/tutor/:ro
      - ../apps/openedx/settings/cms/:/openedx/edx-platform/cms/envs/tutor/:ro
      - ../apps/openedx/config/:/openedx/config/:ro
      - ../../data/lms:/openedx/data
      - ../../data/openedx-media:/openedx/media
    depends_on:
      - mysql
      - elasticsearch
      - forum
      - mongodb
      - redis
      - smtp

  cms:
    image: docker.io/overhangio/openedx:12.1.6
    environment:
      SERVICE_VARIANT: cms
      UWSGI_WORKERS: 2
      SETTINGS: ${TUTOR_EDX_PLATFORM_SETTINGS:-tutor.production}
    restart: unless-stopped
    volumes:
      - ../apps/openedx/settings/lms/:/openedx/edx-platform/lms/envs/tutor/:ro
      - ../apps/openedx/settings/cms/:/openedx/edx-platform/cms/envs/tutor/:ro
      - ../apps/openedx/config/:/openedx/config/:ro
      - ../../data/cms:/openedx/data
      - ../../data/openedx-media:/openedx/media
    depends_on:
      - mysql
      - elasticsearch
      - mongodb
      - redis
      - smtp
      - lms

  ############# LMS and CMS workers

  lms-worker:
    image: docker.io/overhangio/openedx:12.1.6
    environment:
      SERVICE_VARIANT: lms
      SETTINGS: ${TUTOR_EDX_PLATFORM_SETTINGS:-tutor.production}
      C_FORCE_ROOT: "1" # run celery tasks as root #nofear
    command: celery worker --app=lms.celery --loglevel=info --hostname=edx.lms.core.default.%%h --maxtasksperchild=100 --exclude-queues=edx.cms.core.default
    restart: unless-stopped
    volumes:
      - ../apps/openedx/settings/lms/:/openedx/edx-platform/lms/envs/tutor/:ro
      - ../apps/openedx/settings/cms/:/openedx/edx-platform/cms/envs/tutor/:ro
      - ../apps/openedx/config/:/openedx/config/:ro
      - ../../data/lms:/openedx/data
      - ../../data/openedx-media:/openedx/media
    depends_on:
      - lms

  cms-worker:
    image: docker.io/overhangio/openedx:12.1.6
    environment:
      SERVICE_VARIANT: cms
      SETTINGS: ${TUTOR_EDX_PLATFORM_SETTINGS:-tutor.production}
      C_FORCE_ROOT: "1" # run celery tasks as root #nofear
    command: celery worker --app=cms.celery --loglevel=info --hostname=edx.cms.core.default.%%h --maxtasksperchild 100 --exclude-queues=edx.lms.core.default
    restart: unless-stopped
    volumes:
      - ../apps/openedx/settings/lms/:/openedx/edx-platform/lms/envs/tutor/:ro
      - ../apps/openedx/settings/cms/:/openedx/edx-platform/cms/envs/tutor/:ro
      - ../apps/openedx/config/:/openedx/config/:ro
      - ../../data/cms:/openedx/data
      - ../../data/openedx-media:/openedx/media
    depends_on:
      - cms
iamCristYe commented 2 years ago

I'm using wsl2:

PS C:\Windows\System32> wsl -l -v
  NAME      STATE           VERSION
* Ubuntu    Running         2

Maybe instead of installing docker desktop, I installed docker directly inside my wsl Ubuntu, though I don't think that would make a difference. So I really have no clue why I can't reproduce this.

regisb commented 2 years ago

@mrvaghani Can you attempt to upgrade to the latest version of docker-compose v2? I believe it should be v2.1.1. Do you reproduce the issue with this later version? @iamCristYe are you quite sure that the "Use Docker Compose V2" setting is enabled for you? (as per the upstream issue).

BbrSofiane commented 2 years ago

I was able to reproduce it with docker-compose 2.0.0.

docker-compose -v
Docker Compose version v2.0.0
tutor local start lms -d
docker-compose -f /home/sofiane/tutor_release/env/local/docker-compose.yml -f /home/sofiane/tutor_release/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans --build -d lms
[+] Running 6/7
 ⠿ Container tutor_local_redis_1          Recreated                                                                                                                                                         4.0s
 ⠿ Container tutor_local_mongodb_1        Recreated                                                                                                                                                         3.5s
 ⠿ Container tutor_local_smtp_1           Recreated                                                                                                                                                         3.5s
 ⠿ Container tutor_local_mysql_1          Recreated                                                                                                                                                         4.1s
 ⠿ Container tutor_local_elasticsearch_1  Recreated                                                                                                                                                         3.6s
 ⠿ Container tutor_local_forum_1          Recreated                                                                                                                                                         0.7s
 ⠹ Container tutor_local_lms_1            Recreate                                                                                                                                                          0.2s
Error response from daemon: path /home/sofiane/tutor_release/env/apps/openedx/settings/lms is mounted on / but it is not a shared mount.
Error: Command failed with status 1: docker-compose -f /home/sofiane/tutor_release/env/local/docker-compose.yml -f /home/sofiane/tutor_release/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans --build -d lms
  NAME                   STATE           VERSION
* Ubuntu-18.04           Running         2
  docker-desktop         Running         2
  docker-desktop-data    Running         2

(Don't mind the name, I'm running Ubuntu 20.04)

I was also able to make it work by removing the trailing slashes. Happy to open a PR for it.

regisb commented 2 years ago

This is way over my head, I understand nothing about WSL. Please save us and open the PR @BbrSofiane!

insad commented 2 years ago

Maybe Stackoverflow helping here? https://stackoverflow.com/questions/68273745/how-to-make-a-mount-shared-in-docker

I think to remember had same kind of problem on a Linux machine with an old (1.8.2) docker version, didn't like a slash somewhere in the path.

mrvaghani commented 2 years ago

Some additional information that might be relevant:

Environment: Docker Compose version v2.0.0 WSL2 - Ubuntu 20.04 LTS tutor, version 12.1.6

How to reproduce:

Download the binary

sudo curl -L "https://github.com/overhangio/tutor/releases/download/v12.1.6/tutor-$(uname -s)_$(uname -m)" -o /usr/local/bin/tutor
sudo chmod 0755 /usr/local/bin/tutor

Make root directory for tutor and set it as root

mkdir ~/tutor
export TUTOR_ROOT=~/tutor

Start the program and answer the questions. This results in an error

❯ tutor local quickstart
==================================================
        Interactive platform configuration
==================================================
Are you configuring a production platform? Type 'n' if you are just testing Tutor on your local computer [Y/n] n
As you are not running this platform in production, we automatically set the following configuration values:
    LMS_HOST = local.overhang.io
    CMS_HOST = studio.local.overhang.io
    ENABLE_HTTPS = False
Your platform name/title [My Open edX]
Your public contact email address [contact@local.overhang.io]
The default language code for the platform [en]
Configuration saved to /home/test/tutor/config.yml
Environment generated in /home/test/tutor/env
==============================================
        Stopping any existing platform
==============================================
docker-compose -f /home/test/tutor/env/local/docker-compose.yml -f /home/test/tutor/env/local/docker-compose.prod.yml --project-name tutor_local stop
======================================================
        Starting the platform in detached mode
======================================================
docker-compose -f /home/test/tutor/env/local/docker-compose.yml -f /home/test/tutor/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans --build -d
[+] Running 8/8
 ⠿ Network tutor_local_default            Created                                                                                                                                      0.0s
 ⠿ Container tutor_local-smtp-1           Created                                                                                                                                      0.2s
 ⠿ Container tutor_local-mysql-1          Created                                                                                                                                      0.2s
 ⠿ Container tutor_local-elasticsearch-1  Created                                                                                                                                      0.2s
 ⠿ Container tutor_local-caddy-1          Created                                                                                                                                      0.2s
 ⠿ Container tutor_local-mongodb-1        Created                                                                                                                                      0.1s
 ⠿ Container tutor_local-redis-1          Created                                                                                                                                      0.1s
 ⠿ Container tutor_local-forum-1          Created                                                                                                                                      0.1s
 ⠋ Container tutor_local-lms-1            Creating                                                                                                                                     0.0s
Error response from daemon: path /home/test/tutor/env/apps/openedx/settings/lms is mounted on / but it is not a shared mount.
Error: Command failed with status 1: docker-compose -f /home/test/tutor/env/local/docker-compose.yml -f /home/test/tutor/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans --build -d

As we can see, it's having issues when it reaches the creation of container tutor_local-lms-1. So I go inside the first compose file /home/test/tutor/env/local/docker-compose.yml it generated manually and remove the trailing / from the following configs:

  lms:
    image: docker.io/overhangio/openedx:12.1.6
    environment:
      SERVICE_VARIANT: lms
      UWSGI_WORKERS: 2
      SETTINGS: ${TUTOR_EDX_PLATFORM_SETTINGS:-tutor.production}
    restart: unless-stopped
    volumes:
      - ../apps/openedx/settings/lms/:/openedx/edx-platform/lms/envs/tutor/:ro    # Remove these trailing / at the end
      - ../apps/openedx/settings/cms/:/openedx/edx-platform/cms/envs/tutor/:ro  # Remove these trailing / at the end
      - ../apps/openedx/config/:/openedx/config/:ro                                                 # Remove these trailing / at the end
      - ../../data/lms:/openedx/data
      - ../../data/openedx-media:/openedx/media
    depends_on:
      - mysql
      - elasticsearch
      - forum
      - mongodb
      - redis
      - smtp

Do the same thing as above for these services inside the compose file:

This should fix the issue. But when I tutor local quickstart again, it overwrites the compose files and adds the trailing / once again.

To avoid it bring overwritten, I ran tutor local start and get another error

❯ tutor local start
docker-compose -f /home/test/tutor/env/local/docker-compose.yml -f /home/test/tutor/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans --build
[+] Running 4/3
 ⠿ Container tutor_local-lms-1         Created                                                                                                                                         1.0s
 ⠿ Container tutor_local-lms-worker-1  Created                                                                                                                                         0.1s
 ⠿ Container tutor_local-cms-1         Created                                                                                                                                         0.1s
 ⠋ Container tutor_local-nginx-1       Creating                                                                                                                                        0.1s
 ⠿ Container tutor_local-cms-worker-1  Created                                                                                                                                         0.1s
Error response from daemon: path /home/test/tutor/env/apps/nginx is mounted on / but it is not a shared mount.
Error: Command failed with status 1: docker-compose -f /home/test/tutor/env/local/docker-compose.yml -f /home/test/tutor/env/local/docker-compose.prod.yml --project-name tutor_local up --remove-orphans --build

This was caused by nginx service inside /home/test/tutor/env/local/docker-compose.prod.yml file.

After removing the trailing / after conf.d on line 30, I ran tutor local start and was able to get past all the errors and atleast have the containers start up successfully.

mrvaghani commented 2 years ago

Maybe someone can test this by changing Line88 and other similar lines in docker-compose.yml and docker-compose.prod.yml template files to validate these assumptions?

BbrSofiane commented 2 years ago

@mrvaghani I've already tried a couple of days ago to remove all trailing slashes and it ended up working. I'll ping you once I create the PR so you can test it and let me know if it works for you.

iamCristYe commented 2 years ago

I think the reason I cannot reproduce this issue is I'm not using Docker Desktop, instead, I installed docker in wsl directly. @BbrSofiane have you already started the PR? If not I can help also, as it's just removing a slash.

BbrSofiane commented 2 years ago

I've just created #524. @mrvaghani can you try it and let me know if it works for you?

mrvaghani commented 2 years ago

I've just created #524. @mrvaghani can you try it and let me know if it works for you?

Sure. How should I go about testing the new changes? Do I need to create a new binary? Or is there a way to tell the binary to use a specific git repo branch to pull source code?

BbrSofiane commented 2 years ago

Ah, I think you will need to install tutor from source and checkout the branch I created for the PR.

mrvaghani commented 2 years ago

Ah, I think you will need to install tutor from source and checkout the branch I created for the PR.

Verified. This works and solved my other problem of not initializing the database properly.