Can't upgrade mongodb inside container
styfrombrest opened this issue · 4 comments
styfrombrest commented
Description of problem
Can't upgrade mongodb from 3.6.15
to 3.6.23
(or any other) inside container.
How reproducible
Persistent
Steps to Reproduce
I'm following steps from this comment:
$ dokku mongo:info SERVICENAME
=====> SERVICENAME mongo service information
...
Status: running
Version: mongo:3.6.15
$ dokku mongo:stop SERVICENAME
=====> Stopping container
Container stopped
$ docker rm $(dokku mongo:info SERVICENAME --id)
0e91d6702b482daf99a275c24f326fba02e4a14041f1f0f10fc2045c739f4b0f
$ MONGO_IMAGE_VERSION=3.6.23 dokku mongo:start SERVICENAME
=====> Starting container
Waiting for container to be ready
Actual Results
Mongo version still 3.6.15
Expected Results
Mongo version should be updated to 3.6.23
Environment Information
dokku report APP_NAME
output
-----> uname: Linux ubuntu-s-1vcpu-2gb-fra1-01 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
-----> memory:
total used free shared buff/cache available
Mem: 1987 408 215 1 1362 1389
Swap: 0 0 0
-----> docker version:
Client: Docker Engine - Community
Version: 20.10.9
API version: 1.41
Go version: go1.16.8
Git commit: c2ea9bc
Built: Mon Oct 4 16:08:29 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.9
API version: 1.41 (minimum version 1.12)
Go version: go1.16.8
Git commit: 79ea9d3
Built: Mon Oct 4 16:06:37 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 daemon info:
WARNING: No swap limit support
Client:
Context: default
Debug Mode: true
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.6.3-docker)
scan: Docker Scan (Docker Inc., v0.8.0)
Server:
Containers: 32
Running: 5
Paused: 0
Stopped: 27
Images: 87
Server Version: 20.10.9
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 5b46e404f6b9f661a205e28d59c982d3634148f8
runc version: v1.0.2-0-g52b36a2
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 5.4.0-81-generic
Operating System: Ubuntu 20.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.941GiB
Name: ubuntu-s-1vcpu-2gb-fra1-01
ID: PV2C:HGN7:HLL3:RCDR:J44B:4OS7:52QG:26L6:S3PC:MVQK:2FFB:6HHS
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
-----> git version: git version 2.25.1
-----> sigil version: 0.6.0
-----> herokuish version:
herokuish: 0.5.30
buildpacks:
heroku-buildpack-multi v1.0.0
heroku-buildpack-ruby v228
heroku-buildpack-nodejs v185
heroku-buildpack-clojure v87
heroku-buildpack-python v197
heroku-buildpack-java v69
heroku-buildpack-gradle v35
heroku-buildpack-scala v90
heroku-buildpack-play v26
heroku-buildpack-php v196
heroku-buildpack-go v153
buildpack-nginx v14
buildpack-null v3
-----> dokku version: dokku version 0.25.6
-----> plugn version: plugn: 0.6.1
-----> dokku plugins:
00_dokku-standard 0.25.6 enabled dokku core standard plugin
20_events 0.25.6 enabled dokku core events logging plugin
app-json 0.25.6 enabled dokku core app-json plugin
apps 0.25.6 enabled dokku core apps plugin
builder 0.25.6 enabled dokku core builder plugin
builder-dockerfile 0.25.6 enabled dokku core builder-dockerfile plugin
builder-herokuish 0.25.6 enabled dokku core builder-herokuish plugin
builder-null 0.25.6 enabled dokku core builder-null plugin
builder-pack 0.25.6 enabled dokku core builder-pack plugin
buildpacks 0.25.6 enabled dokku core buildpacks plugin
certs 0.25.6 enabled dokku core certificate management plugin
checks 0.25.6 enabled dokku core checks plugin
common 0.25.6 enabled dokku core common plugin
config 0.25.6 enabled dokku core config plugin
cron 0.25.6 enabled dokku core cron plugin
docker-options 0.25.6 enabled dokku core docker-options plugin
domains 0.25.6 enabled dokku core domains plugin
enter 0.25.6 enabled dokku core enter plugin
git 0.25.6 enabled dokku core git plugin
letsencrypt 0.9.4 enabled Automated installation of let's encrypt TLS certificates
logs 0.25.6 enabled dokku core logs plugin
mongo 1.14.2 enabled dokku mongo service plugin
network 0.25.6 enabled dokku core network plugin
nginx-vhosts 0.25.6 enabled dokku core nginx-vhosts plugin
plugin 0.25.6 enabled dokku core plugin plugin
proxy 0.25.6 enabled dokku core proxy plugin
ps 0.25.6 enabled dokku core ps plugin
registry 0.25.6 enabled dokku core registry plugin
repo 0.25.6 enabled dokku core repo plugin
resource 0.25.6 enabled dokku core resource plugin
run 0.25.6 enabled dokku core run plugin
scheduler-docker-local 0.25.6 enabled dokku core scheduler-docker-local plugin
scheduler-null 0.25.6 enabled dokku core scheduler-null plugin
shell 0.25.6 enabled dokku core shell plugin
ssh-keys 0.25.6 enabled dokku core ssh-keys plugin
storage 0.25.6 enabled dokku core storage plugin
tags 0.25.6 enabled dokku core tags plugin
tar 0.25.6 enabled dokku core tar plugin
trace 0.25.6 enabled dokku core trace plugin
=====> SERVICENAME app-json information
App json computed selected: app.json
App json global selected: app.json
App json selected:
=====> SERVICENAME app information
App deploy source:
App dir: /home/dokku/SERVICENAME
App locked: false
=====> SERVICENAME builder information
Builder build dir:
Builder computed build dir:
Builder computed selected:
Builder global build dir:
Builder global selected:
Builder selected:
=====> SERVICENAME builder-dockerfile information
Builder dockerfile computed dockerfile path: Dockerfile
Builder dockerfile global dockerfile path: Dockerfile
Builder dockerfile dockerfile path:
=====> SERVICENAME builder-pack information
Builder pack computed projecttoml path: project.toml
Builder pack global projecttoml path: project.toml
Builder pack projecttoml path:
=====> SERVICENAME buildpacks information
Buildpacks computed stack: gliderlabs/herokuish:latest-20
Buildpacks global stack:
Buildpacks list:
Buildpacks stack:
CN = SERVICENAME
error 20 at 0 depth lookup: unable to get local issuer certificate
=====> SERVICENAME ssl information
Ssl dir: /home/dokku/SERVICENAME/tls
Ssl enabled: true
Ssl hostnames: files.SERVICENAME SERVICENAME
Ssl expires at: Nov 21 15:12:43 2021 GMT
Ssl issuer: C = US, O = Let's Encrypt, CN = R3
Ssl starts at: Aug 23 15:12:44 2021 GMT
Ssl subject: subject=CN = SERVICENAME
Ssl verified: self signed
=====> SERVICENAME checks information
Checks disabled list: none
Checks skipped list: none
=====> SERVICENAME cron information
Cron task count: 0
=====> SERVICENAME docker options information
Docker options build: --link dokku.mongo.styfrombrest:dokku-mongo-styfrombrest
Docker options deploy: --link dokku.mongo.styfrombrest:dokku-mongo-styfrombrest --restart=on-failure:10
Docker options run: --link dokku.mongo.styfrombrest:dokku-mongo-styfrombrest
=====> SERVICENAME domains information
Domains app enabled: true
Domains app vhosts: SERVICENAME files.SERVICENAME
Domains global enabled: false
Domains global vhosts:
=====> SERVICENAME git information
Git deploy branch: master
Git global deploy branch: master
Git keep git dir: false
Git rev env var: GIT_REV
Git sha: ddd721e
Git last updated at: 1615492284
=====> SERVICENAME logs information
Logs computed max size: 10m
Logs global max size: 10m
Logs global vector sink:
Logs max size:
Logs vector sink:
=====> SERVICENAME network information
Network attach post create:
Network attach post deploy:
Network bind all interfaces: false
Network computed attach post create:
Network computed attach post deploy:
Network computed bind all interfaces: false
Network computed initial network:
Network computed tld:
Network global attach post create:
Network global attach post deploy:
Network global bind all interfaces: false
Network global initial network:
Network global tld:
Network initial network:
Network static web listener:
Network tld:
Network web listeners: 172.17.0.7:5000
=====> SERVICENAME nginx information
Nginx access log format:
Nginx access log path: /var/log/nginx/SERVICENAME-access.log
Nginx bind address ipv4:
Nginx bind address ipv6: ::
Nginx client max body size:
Nginx disable custom config: false
Nginx error log path: /var/log/nginx/SERVICENAME-error.log
Nginx global hsts: true
Nginx computed hsts: true
Nginx hsts:
Nginx hsts include subdomains: true
Nginx hsts max age: 15724800
Nginx hsts preload: false
Nginx proxy buffer size: 4096
Nginx proxy buffering: on
Nginx proxy buffers: 8 4096
Nginx proxy busy buffers size: 8192
Nginx proxy read timeout: 60s
Nginx last visited at: 1633617003
Nginx x forwarded for value: $remote_addr
Nginx x forwarded port value: $server_port
Nginx x forwarded proto value: $scheme
Nginx x forwarded ssl:
=====> SERVICENAME proxy information
Proxy enabled: true
Proxy port map: http:80:5000 https:443:5000
Proxy type: nginx
=====> SERVICENAME ps information
Deployed: true
Processes: 1
Ps can scale: true
Ps computed procfile path: Procfile
Ps global procfile path: Procfile
Ps procfile path:
Ps restart policy: on-failure:10
Restore: true
Running: true
Status web 1: running (CID: cc989837c59)
=====> SERVICENAME registry information
Registry computed image repo: dokku/SERVICENAME
Registry computed push on release: false
Registry computed server:
Registry global push on release:
Registry global server:
Registry image repo:
Registry push on release:
Registry server:
Registry tag version:
=====> SERVICENAME resource information
=====> SERVICENAME scheduler-docker-local information
Scheduler docker local disable chown:
Scheduler docker local parallel schedule count:
=====> SERVICENAME storage information
Storage build mounts:
Storage deploy mounts:
Storage run mounts:
How (deb/make/rpm) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:
deb, DigitalOcean
josegonzalez commented
Mind going through that same process again but instead of calling mongo:start as you did before, run the following?
MONGO_IMAGE_VERSION=3.6.23 dokku --trace mongo:start SERVICENAME
You should redact only the passwords in the output - replace them with a bunch of X
s - but please show everything else.
styfrombrest commented
@josegonzalez sorry, didn't think that exact service name is important in this case.
But what's not really clear for me: the line that you suggest to run is exactly the same as I do in 4th step, isn't it?
josegonzalez commented
Sorry, was missing the --trace
.
styfrombrest commented
$ dokku mongo:info styfrombrest
=====> styfrombrest mongo service information
Config dir: /var/lib/dokku/services/mongo/styfrombrest/config
Config options: --storageEngine wiredTiger --auth
Data dir: /var/lib/dokku/services/mongo/styfrombrest/data
Dsn: mongodb://styfrombrest:xxxxxxxxxxxxxxx@dokku-mongo-styfrombrest:27017/styfrombrest
Exposed ports: 27017->15242 27018->3176 27019->10874 28017->15780
Id: 81d37e48ea6da15d5c24358e09a93bb6fe12ecc929140ce1596497f6c033de4f
Internal ip: 172.17.0.2
Links: styfrombrest.tk
Service root: /var/lib/dokku/services/mongo/styfrombrest
Status: running
Version: mongo:3.6.15
$ dokku mongo:stop styfrombrest
=====> Stopping container
Container stopped
$ docker rm $(dokku mongo:info styfrombrest --id)
81d37e48ea6da15d5c24358e09a93bb6fe12ecc929140ce1596497f6c033de4f
$ MONGO_IMAGE_VERSION=3.6.23 dokku mongo:start styfrombrest --trace
+ export DOKKU_HOST_ROOT=/home/dokku
+ DOKKU_HOST_ROOT=/home/dokku
+ export DOKKU_DISTRO
++ . /etc/os-release
++ echo ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOCKER_BIN=docker
+ DOCKER_BIN=docker
+ export DOKKU_IMAGE=gliderlabs/herokuish:latest-20
+ DOKKU_IMAGE=gliderlabs/herokuish:latest-20
+ export DOKKU_CNB_BUILDER=heroku/buildpacks
+ DOKKU_CNB_BUILDER=heroku/buildpacks
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
+ PLUGIN_PATH=/var/lib/dokku/plugins
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ export DOKKU_SYSTEM_GROUP=dokku
+ DOKKU_SYSTEM_GROUP=dokku
+ export DOKKU_SYSTEM_USER=dokku
+ DOKKU_SYSTEM_USER=dokku
+ export DOKKU_API_VERSION=1
+ DOKKU_API_VERSION=1
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10
+ DOKKU_NOT_IMPLEMENTED_EXIT=10
+ export DOKKU_VALID_EXIT=0
+ DOKKU_VALID_EXIT=0
+ export DOKKU_PID=2355364
+ DOKKU_PID=2355364
+ export DOKKU_LOGS_DIR=/var/log/dokku
+ DOKKU_LOGS_DIR=/var/log/dokku
+ export DOKKU_LOGS_HOST_DIR=/var/log/dokku
+ DOKKU_LOGS_HOST_DIR=/var/log/dokku
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ export DOKKU_CONTAINER_LABEL=dokku
+ DOKKU_CONTAINER_LABEL=dokku
+ export 'DOKKU_GLOBAL_BUILD_ARGS=--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ DOKKU_GLOBAL_BUILD_ARGS='--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ export 'DOKKU_GLOBAL_RUN_ARGS=--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ DOKKU_GLOBAL_RUN_ARGS='--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ parse_args mongo:start styfrombrest --trace
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ local flags
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ mongo:start == \-\-\a\p\p ]]
+ [[ mongo:start =~ ^--.* ]]
+ next_index=2
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ styfrombrest == \-\-\a\p\p ]]
+ [[ styfrombrest =~ ^--.* ]]
+ next_index=3
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ export DOKKU_TRACE=1
+ DOKKU_TRACE=1
+ [[ false == \t\r\u\e ]]
+ [[ --trace == \-\-\a\p\p ]]
+ [[ --trace =~ ^--.* ]]
+ flags=' --trace'
+ next_index=4
+ [[ -z --trace ]]
+ return 0
+ args=("$@")
+ skip_arg=false
+ [[ mongo:start =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
+ [[ '' == \t\r\u\e ]]
++ LC_ALL=C
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ mongo:start =~ ^plugin:.* ]]
+ [[ mongo:start == \s\s\h\-\k\e\y\s\:\a\d\d ]]
+ [[ mongo:start == \s\s\h\-\k\e\y\s\:\r\e\m\o\v\e ]]
+ [[ -n '' ]]
+ dokku_auth mongo:start styfrombrest --trace
+ declare 'desc=calls user-auth plugin trigger'
+ export SSH_USER=taras
+ SSH_USER=taras
+ export SSH_NAME=default
+ SSH_NAME=default
++ wc -l
++ find /var/lib/dokku/plugins/enabled/20_events/user-auth
+ local user_auth_count=1
+ [[ 1 == 0 ]]
+ [[ 1 == 1 ]]
+ [[ -f /var/lib/dokku/plugins/enabled/20_events/user-auth ]]
+ return 0
+ case "$1" in
+ execute_dokku_cmd mongo:start styfrombrest --trace
+ declare 'desc=executes dokku sub-commands'
+ local PLUGIN_NAME=mongo:start
+ local PLUGIN_CMD=mongo:start
+ local implemented=0
+ local script
+ argv=("$@")
+ local argv
+ case "$PLUGIN_NAME" in
++ readlink -f /var/lib/dokku/plugins/enabled/mongo
+ [[ /var/lib/dokku/plugins/available/mongo == *core-plugins* ]]
+ [[ -x /var/lib/dokku/plugins/enabled/mongo:start/subcommands/default ]]
+ [[ -x /var/lib/dokku/plugins/enabled/mongo:start/subcommands/mongo:start ]]
+ [[ -x /var/lib/dokku/plugins/enabled/mongo/subcommands/start ]]
+ [[ -n start ]]
+ /var/lib/dokku/plugins/enabled/mongo/subcommands/start mongo:start styfrombrest --trace
+ source /var/lib/dokku/plugins/enabled/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++++ dirname /var/lib/dokku/plugins/enabled/mongo/subcommands/start
+++ cd /var/lib/dokku/plugins/enabled/mongo/subcommands
+++ pwd
++ dirname /var/lib/dokku/plugins/enabled/mongo/subcommands
+ source /var/lib/dokku/plugins/enabled/mongo/functions
++++ dirname /var/lib/dokku/plugins/enabled/mongo/functions
+++ cd /var/lib/dokku/plugins/enabled/mongo
+++ pwd
++ source /var/lib/dokku/plugins/enabled/mongo/config
+++++ dirname /var/lib/dokku/plugins/enabled/mongo/config
++++ cd /var/lib/dokku/plugins/enabled/mongo
++++ pwd
+++ _DIR=/var/lib/dokku/plugins/enabled/mongo
+++ export MONGO_IMAGE=mongo
+++ MONGO_IMAGE=mongo
+++ export MONGO_IMAGE_VERSION=3.6.23
+++ MONGO_IMAGE_VERSION=3.6.23
+++ export MONGO_ROOT=/var/lib/dokku/services/mongo
+++ MONGO_ROOT=/var/lib/dokku/services/mongo
+++ export MONGO_HOST_ROOT=/var/lib/dokku/services/mongo
+++ MONGO_HOST_ROOT=/var/lib/dokku/services/mongo
+++ PLUGIN_UNIMPLEMENTED_SUBCOMMANDS=()
+++ export PLUGIN_UNIMPLEMENTED_SUBCOMMANDS
+++ export PLUGIN_COMMAND_PREFIX=mongo
+++ PLUGIN_COMMAND_PREFIX=mongo
+++ export PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/mongo
+++ PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/mongo
+++ export PLUGIN_DATA_ROOT=/var/lib/dokku/services/mongo
+++ PLUGIN_DATA_ROOT=/var/lib/dokku/services/mongo
+++ export PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/mongo
+++ PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/mongo
+++ PLUGIN_DATASTORE_PORTS=(27017 27018 27019 28017)
+++ export PLUGIN_DATASTORE_PORTS
+++ export PLUGIN_DATASTORE_WAIT_PORT=27017
+++ PLUGIN_DATASTORE_WAIT_PORT=27017
+++ export PLUGIN_DEFAULT_ALIAS=MONGO
+++ PLUGIN_DEFAULT_ALIAS=MONGO
+++ export PLUGIN_DISABLE_PULL=
+++ PLUGIN_DISABLE_PULL=
+++ export PLUGIN_DISABLE_PULL_VARIABLE=MONGO_DISABLE_PULL
+++ PLUGIN_DISABLE_PULL_VARIABLE=MONGO_DISABLE_PULL
+++ export PLUGIN_ALT_ALIAS=DOKKU_MONGO
+++ PLUGIN_ALT_ALIAS=DOKKU_MONGO
+++ export PLUGIN_IMAGE=mongo
+++ PLUGIN_IMAGE=mongo
+++ export PLUGIN_IMAGE_VERSION=3.6.23
+++ PLUGIN_IMAGE_VERSION=3.6.23
+++ export PLUGIN_SCHEME=mongodb
+++ PLUGIN_SCHEME=mongodb
+++ export PLUGIN_SERVICE=MongoDB
+++ PLUGIN_SERVICE=MongoDB
+++ export PLUGIN_VARIABLE=MONGO
+++ PLUGIN_VARIABLE=MONGO
+++ export PLUGIN_BASE_PATH=/var/lib/dokku/plugins
+++ PLUGIN_BASE_PATH=/var/lib/dokku/plugins
+++ export PLUGIN_CONFIG_SUFFIX=config
+++ PLUGIN_CONFIG_SUFFIX=config
+++ [[ -n 1 ]]
+++ export PLUGIN_BASE_PATH=/var/lib/dokku/plugins/enabled
+++ PLUGIN_BASE_PATH=/var/lib/dokku/plugins/enabled
+++ export PLUGIN_BUSYBOX_IMAGE=busybox:1.31.1-uclibc
+++ PLUGIN_BUSYBOX_IMAGE=busybox:1.31.1-uclibc
+++ export PLUGIN_AMBASSADOR_IMAGE=dokku/ambassador:0.3.3
+++ PLUGIN_AMBASSADOR_IMAGE=dokku/ambassador:0.3.3
+++ export PLUGIN_S3BACKUP_IMAGE=dokku/s3backup:0.10.3
+++ PLUGIN_S3BACKUP_IMAGE=dokku/s3backup:0.10.3
+++ export PLUGIN_WAIT_IMAGE=dokku/wait:0.4.3
+++ PLUGIN_WAIT_IMAGE=dokku/wait:0.4.3
+++ export 'MONGO_CONFIG_OPTIONS= --storageEngine wiredTiger --auth '
+++ MONGO_CONFIG_OPTIONS=' --storageEngine wiredTiger --auth '
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++++ dirname /var/lib/dokku/plugins/enabled/mongo/functions
+++ cd /var/lib/dokku/plugins/enabled/mongo
+++ pwd
++ source /var/lib/dokku/plugins/enabled/mongo/common-functions
+++++ dirname /var/lib/dokku/plugins/enabled/mongo/common-functions
++++ cd /var/lib/dokku/plugins/enabled/mongo
++++ pwd
+++ source /var/lib/dokku/plugins/enabled/mongo/config
++++++ dirname /var/lib/dokku/plugins/enabled/mongo/config
+++++ cd /var/lib/dokku/plugins/enabled/mongo
+++++ pwd
++++ _DIR=/var/lib/dokku/plugins/enabled/mongo
++++ export MONGO_IMAGE=mongo
++++ MONGO_IMAGE=mongo
++++ export MONGO_IMAGE_VERSION=3.6.23
++++ MONGO_IMAGE_VERSION=3.6.23
++++ export MONGO_ROOT=/var/lib/dokku/services/mongo
++++ MONGO_ROOT=/var/lib/dokku/services/mongo
++++ export MONGO_HOST_ROOT=/var/lib/dokku/services/mongo
++++ MONGO_HOST_ROOT=/var/lib/dokku/services/mongo
++++ PLUGIN_UNIMPLEMENTED_SUBCOMMANDS=()
++++ export PLUGIN_UNIMPLEMENTED_SUBCOMMANDS
++++ export PLUGIN_COMMAND_PREFIX=mongo
++++ PLUGIN_COMMAND_PREFIX=mongo
++++ export PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/mongo
++++ PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/mongo
++++ export PLUGIN_DATA_ROOT=/var/lib/dokku/services/mongo
++++ PLUGIN_DATA_ROOT=/var/lib/dokku/services/mongo
++++ export PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/mongo
++++ PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/mongo
++++ PLUGIN_DATASTORE_PORTS=(27017 27018 27019 28017)
++++ export PLUGIN_DATASTORE_PORTS
++++ export PLUGIN_DATASTORE_WAIT_PORT=27017
++++ PLUGIN_DATASTORE_WAIT_PORT=27017
++++ export PLUGIN_DEFAULT_ALIAS=MONGO
++++ PLUGIN_DEFAULT_ALIAS=MONGO
++++ export PLUGIN_DISABLE_PULL=
++++ PLUGIN_DISABLE_PULL=
++++ export PLUGIN_DISABLE_PULL_VARIABLE=MONGO_DISABLE_PULL
++++ PLUGIN_DISABLE_PULL_VARIABLE=MONGO_DISABLE_PULL
++++ export PLUGIN_ALT_ALIAS=DOKKU_MONGO
++++ PLUGIN_ALT_ALIAS=DOKKU_MONGO
++++ export PLUGIN_IMAGE=mongo
++++ PLUGIN_IMAGE=mongo
++++ export PLUGIN_IMAGE_VERSION=3.6.23
++++ PLUGIN_IMAGE_VERSION=3.6.23
++++ export PLUGIN_SCHEME=mongodb
++++ PLUGIN_SCHEME=mongodb
++++ export PLUGIN_SERVICE=MongoDB
++++ PLUGIN_SERVICE=MongoDB
++++ export PLUGIN_VARIABLE=MONGO
++++ PLUGIN_VARIABLE=MONGO
++++ export PLUGIN_BASE_PATH=/var/lib/dokku/plugins
++++ PLUGIN_BASE_PATH=/var/lib/dokku/plugins
++++ export PLUGIN_CONFIG_SUFFIX=config
++++ PLUGIN_CONFIG_SUFFIX=config
++++ [[ -n 1 ]]
++++ export PLUGIN_BASE_PATH=/var/lib/dokku/plugins/enabled
++++ PLUGIN_BASE_PATH=/var/lib/dokku/plugins/enabled
++++ export PLUGIN_BUSYBOX_IMAGE=busybox:1.31.1-uclibc
++++ PLUGIN_BUSYBOX_IMAGE=busybox:1.31.1-uclibc
++++ export PLUGIN_AMBASSADOR_IMAGE=dokku/ambassador:0.3.3
++++ PLUGIN_AMBASSADOR_IMAGE=dokku/ambassador:0.3.3
++++ export PLUGIN_S3BACKUP_IMAGE=dokku/s3backup:0.10.3
++++ PLUGIN_S3BACKUP_IMAGE=dokku/s3backup:0.10.3
++++ export PLUGIN_WAIT_IMAGE=dokku/wait:0.4.3
++++ PLUGIN_WAIT_IMAGE=dokku/wait:0.4.3
++++ export 'MONGO_CONFIG_OPTIONS= --storageEngine wiredTiger --auth '
++++ MONGO_CONFIG_OPTIONS=' --storageEngine wiredTiger --auth '
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/plugins/available/config/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++++ source /var/lib/dokku/core-plugins/available/common/functions
+++++ set -eo pipefail
+++++ [[ -n 1 ]]
+++++ set -x
++ source /var/lib/dokku/plugins/enabled/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/plugins/available/config/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++ [[ -f /var/lib/dokku/plugins/available/docker-options/functions ]]
++ source /var/lib/dokku/plugins/available/docker-options/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+++ AVAILABLE_PHASES=(build deploy run)
+ service-start-cmd mongo:start styfrombrest --trace
+ declare 'desc=start a previously stopped MongoDB service'
+ argv=("$@")
+ local cmd=mongo:start argv
+ [[ mongo:start == \m\o\n\g\o\:\s\t\a\r\t ]]
+ shift 1
+ declare SERVICE=styfrombrest
+ [[ -z styfrombrest ]]
+ verify_service_name styfrombrest
+ declare 'desc=verify that a service exists'
+ declare SERVICE=styfrombrest
+ [[ -z styfrombrest ]]
+ [[ ! -d /var/lib/dokku/services/mongo/styfrombrest ]]
+ return 0
+ service_start styfrombrest
+ local SERVICE=styfrombrest
+ local QUIET=
+ local SERVICE_ROOT=/var/lib/dokku/services/mongo/styfrombrest
++ get_service_name styfrombrest
++ declare 'desc=retrieve a docker service label'
++ declare SERVICE=styfrombrest
++ echo dokku.mongo.styfrombrest
+ local SERVICE_NAME=dokku.mongo.styfrombrest
++ docker ps -aq --no-trunc --filter status=running --filter 'name=^/dokku.mongo.styfrombrest$' --format '{{ .ID }}'
+ local ID=
+ [[ -n '' ]]
+ dokku_log_info2_quiet 'Starting container'
+ declare 'desc=log info2 formatter (with quiet option)'
+ [[ -z '' ]]
+ echo '=====> Starting container'
=====> Starting container
++ docker ps -aq --no-trunc --filter status=exited --filter 'name=^/dokku.mongo.styfrombrest$' --format '{{ .ID }}'
+ local PREVIOUS_ID=
++ service_root_password styfrombrest
++ declare 'desc=fetch the root password for a service'
++ declare SERVICE=styfrombrest
++ local SERVICE_ROOT=/var/lib/dokku/services/mongo/styfrombrest
++ local PASSWORD_FILE=/var/lib/dokku/services/mongo/styfrombrest/ROOTPASSWORD
++ [[ -f /var/lib/dokku/services/mongo/styfrombrest/ROOTPASSWORD ]]
++ cat /var/lib/dokku/services/mongo/styfrombrest/ROOTPASSWORD
+ local ROOTPASSWORD=xxxxxxxx
++ service_password styfrombrest
++ declare 'desc=fetch the password for a service'
++ declare SERVICE=styfrombrest
++ local SERVICE_ROOT=/var/lib/dokku/services/mongo/styfrombrest
++ local PASSWORD_FILE=/var/lib/dokku/services/mongo/styfrombrest/PASSWORD
++ [[ -f /var/lib/dokku/services/mongo/styfrombrest/PASSWORD ]]
++ cat /var/lib/dokku/services/mongo/styfrombrest/PASSWORD
+ local PASSWORD=xxxxxxxx
+ [[ -n '' ]]
+ service_image_exists styfrombrest
+ declare 'desc=check if the current image exists'
+ declare SERVICE=styfrombrest
+ local plugin_image=mongo
+ local plugin_image_version=3.6.23
+ [[ -f /var/lib/dokku/services/mongo/styfrombrest/IMAGE ]]
++ cat /var/lib/dokku/services/mongo/styfrombrest/IMAGE
+ plugin_image=mongo
+ [[ -f /var/lib/dokku/services/mongo/styfrombrest/IMAGE_VERSION ]]
++ cat /var/lib/dokku/services/mongo/styfrombrest/IMAGE_VERSION
+ plugin_image_version=3.6.15
+ local IMAGE=mongo:3.6.15
++ docker images -q mongo:3.6.15
+ [[ 5678c4881f43 == '' ]]
+ return 0
+ [[ -n xxxxxxxx ]]
+ [[ -n xxxxxxxx ]]
+ service_create_container styfrombrest
+ local SERVICE=styfrombrest
+ local SERVICE_ROOT=/var/lib/dokku/services/mongo/styfrombrest
+ local SERVICE_HOST_ROOT=/var/lib/dokku/services/mongo/styfrombrest
++ get_service_name styfrombrest
++ declare 'desc=retrieve a docker service label'
++ declare SERVICE=styfrombrest
++ echo dokku.mongo.styfrombrest
+ local SERVICE_NAME=dokku.mongo.styfrombrest
++ service_root_password styfrombrest
++ declare 'desc=fetch the root password for a service'
++ declare SERVICE=styfrombrest
++ local SERVICE_ROOT=/var/lib/dokku/services/mongo/styfrombrest
++ local PASSWORD_FILE=/var/lib/dokku/services/mongo/styfrombrest/ROOTPASSWORD
++ [[ -f /var/lib/dokku/services/mongo/styfrombrest/ROOTPASSWORD ]]
++ cat /var/lib/dokku/services/mongo/styfrombrest/ROOTPASSWORD
+ local ROOTPASSWORD=xxxxxxxx
++ service_password styfrombrest
++ declare 'desc=fetch the password for a service'
++ declare SERVICE=styfrombrest
++ local SERVICE_ROOT=/var/lib/dokku/services/mongo/styfrombrest
++ local PASSWORD_FILE=/var/lib/dokku/services/mongo/styfrombrest/PASSWORD
++ [[ -f /var/lib/dokku/services/mongo/styfrombrest/PASSWORD ]]
++ cat /var/lib/dokku/services/mongo/styfrombrest/PASSWORD
+ local PASSWORD=xxxxxxx
++ get_database_name styfrombrest
++ declare 'desc=retrieve a sanitized database name'
++ declare SERVICE=styfrombrest
++ local SERVICE_ROOT=/var/lib/dokku/services/mongo/styfrombrest
++ [[ ! -f /var/lib/dokku/services/mongo/styfrombrest/DATABASE_NAME ]]
++ cat /var/lib/dokku/services/mongo/styfrombrest/DATABASE_NAME
+ local DATABASE_NAME=styfrombrest
+ [[ -f /var/lib/dokku/services/mongo/styfrombrest/CONFIG_OPTIONS ]]
++ cat /var/lib/dokku/services/mongo/styfrombrest/CONFIG_OPTIONS
+ export 'CONFIG_OPTIONS= --storageEngine wiredTiger --auth '
+ CONFIG_OPTIONS=' --storageEngine wiredTiger --auth '
+ [[ -f /var/lib/dokku/services/mongo/styfrombrest/SERVICE_MEMORY ]]
+ [[ -n '' ]]
+ [[ -f /var/lib/dokku/services/mongo/styfrombrest/SHM_SIZE ]]
+ [[ -n '' ]]
+ [[ -f /var/lib/dokku/services/mongo/styfrombrest/IMAGE ]]
++ cat /var/lib/dokku/services/mongo/styfrombrest/IMAGE
+ PLUGIN_IMAGE=mongo
+ [[ -f /var/lib/dokku/services/mongo/styfrombrest/IMAGE_VERSION ]]
++ cat /var/lib/dokku/services/mongo/styfrombrest/IMAGE_VERSION
+ PLUGIN_IMAGE_VERSION=3.6.15
++ docker run --name dokku.mongo.styfrombrest -v /var/lib/dokku/services/mongo/styfrombrest/data:/data/db --env-file=/var/lib/dokku/services/mongo/styfrombrest/ENV --env MONGO_INITDB_DATABASE=styfrombrest -d --restart always --label dokku=service --label dokku.service=mongo mongo:3.6.15 mongod --storageEngine wiredTiger --auth
+ ID=51656ccfe38bd5f5c6187c916be909aa8ea19ef7633ab05dea40dbfa1497af62
+ echo 51656ccfe38bd5f5c6187c916be909aa8ea19ef7633ab05dea40dbfa1497af62
+ dokku_log_verbose_quiet 'Waiting for container to be ready'
+ declare 'desc=log verbose formatter (with quiet option)'
+ [[ -z '' ]]
+ echo ' Waiting for container to be ready'
Waiting for container to be ready
+ docker run --rm --link dokku.mongo.styfrombrest:mongo dokku/wait:0.4.3 -p 27017
+ docker exec -i dokku.mongo.styfrombrest mongo admin
+ echo 'db.createUser({user:'\''admin'\'',pwd:'\''xxxxxxx'\'',roles:[{role:'\''userAdminAnyDatabase'\'',db:'\''admin'\''},{role:'\''__system'\'',db:'\''admin'\''},{role:'\''root'\'',db:'\''admin'\''}]})'
$ dokku mongo:info styfrombrest
=====> styfrombrest mongo service information
Config dir: /var/lib/dokku/services/mongo/styfrombrest/config
Config options: --storageEngine wiredTiger --auth
Data dir: /var/lib/dokku/services/mongo/styfrombrest/data
Dsn: mongodb://styfrombrest:xxxxxxx@dokku-mongo-styfrombrest:27017/styfrombrest
Exposed ports: 27017->15242 27018->3176 27019->10874 28017->15780
Id: 51656ccfe38bd5f5c6187c916be909aa8ea19ef7633ab05dea40dbfa1497af62
Internal ip: 172.17.0.2
Links: styfrombrest.tk
Service root: /var/lib/dokku/services/mongo/styfrombrest
Status: running
Version: mongo:3.6.15