dokku / dokku-clickhouse

a clickhouse plugin for dokku
MIT License
25 stars 3 forks source link

clickhouse:create fails with "Please specify a valid name for the service." #77

Closed salomvary closed 10 months ago

salomvary commented 11 months ago

Description of problem

dokku clickhouse:create fails with a valid service name with the following error message: "Please specify a valid name for the service. Valid characters are: [A-Za-z0-9_]+".

How reproducible

# dokku clickhouse:create lollipop
 !     Please specify a valid name for the service. Valid characters are: [A-Za-z0-9_]+

Steps to Reproduce

See above.

Actual Results

Error message, no Clickhouse service created.

Expected Results

Clickhouse service created, no error message.

Environment Information

dokku report output

# dokku report
-----> uname: Linux dokku-2 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
-----> memory: 
                      total        used        free      shared  buff/cache   available
       Mem:            1916         313         184          32        1418        1377
       Swap:              0           0           0
-----> docker version: 
       Client: Docker Engine - Community
        Version:           24.0.7
        API version:       1.43
        Go version:        go1.20.10
        Git commit:        afdd53b
        Built:             Thu Oct 26 09:07:41 2023
        OS/Arch:           linux/amd64
        Context:           default

       Server: Docker Engine - Community
        Engine:
         Version:          24.0.7
         API version:      1.43 (minimum version 1.12)
         Go version:       go1.20.10
         Git commit:       311b9ff
         Built:            Thu Oct 26 09:07:41 2023
         OS/Arch:          linux/amd64
         Experimental:     false
        containerd:
         Version:          1.6.24
         GitCommit:        61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
        runc:
         Version:          1.1.9
         GitCommit:        v1.1.9-0-gccaecfc
        docker-init:
         Version:          0.19.0
         GitCommit:        de40ad0
-----> docker daemon info: 
       Client: Docker Engine - Community
        Version:    24.0.7
        Context:    default
        Debug Mode: true
        Plugins:
         buildx: Docker Buildx (Docker Inc.)
           Version:  v0.11.2
           Path:     /usr/libexec/docker/cli-plugins/docker-buildx
         compose: Docker Compose (Docker Inc.)
           Version:  v2.21.0
           Path:     /usr/libexec/docker/cli-plugins/docker-compose

       Server:
        Containers: 3
         Running: 3
         Paused: 0
         Stopped: 0
        Images: 11
        Server Version: 24.0.7
        Storage Driver: overlay2
         Backing Filesystem: extfs
         Supports d_type: true
         Using metacopy: false
         Native Overlay Diff: true
         userxattr: false
        Logging Driver: json-file
        Cgroup Driver: systemd
        Cgroup Version: 2
        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 runc
        Default Runtime: runc
        Init Binary: docker-init
        containerd version: 61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
        runc version: v1.1.9-0-gccaecfc
        init version: de40ad0
        Security Options:
         apparmor
         seccomp
          Profile: builtin
         cgroupns
        Kernel Version: 5.15.0-88-generic
        Operating System: Ubuntu 22.04.3 LTS
        OSType: linux
        Architecture: x86_64
        CPUs: 1
        Total Memory: 1.871GiB
        Name: dokku-2
        ID: 89976e4a-8f93-4603-a7fa-e2bda8d9b780
        Docker Root Dir: /var/lib/docker
        Debug Mode: false
         File Descriptors: 41
         Goroutines: 47
         System Time: 2023-11-13T16:44:57.309867198Z
         EventsListeners: 0
        Experimental: false
        Insecure Registries:
         127.0.0.0/8
        Live Restore Enabled: false

-----> herokuish version: 
       herokuish: v0.7.2
       buildpacks:
         heroku-buildpack-multi     v1.2.0
         heroku-buildpack-ruby      v259
         heroku-buildpack-nodejs    v224
         heroku-buildpack-clojure   v91
         heroku-buildpack-python    v237
         heroku-buildpack-java      v73
         heroku-buildpack-gradle    v39
         heroku-buildpack-scala     v96
         heroku-buildpack-play      v26
         heroku-buildpack-php       v239
         heroku-buildpack-go        v181
         heroku-buildpack-nginx     v24
         buildpack-null             v3
-----> dokku version: dokku version 0.32.3
-----> dokku-event-listener version: 0.15.0build+5268732                                                             
-----> dokku-update version: dokku-update 0.7.2
-----> docker-container-healthchecker version: 0.7.2                                                                           
-----> docker-image-labeler version: 0.6.1build+c6e15a9                                                              
-----> git version: git version 2.34.1
-----> lambda-builder version:        0.5.0                                                                           
-----> netrc version: 0.7.1build+677c033
 !     pack binary is not available
-----> plugn version: plugn: 0.13.0build+fd5297a
-----> sigil version: 0.10.1build+e443be0
-----> sshcommand version: sshcommand 0.17.1
-----> dokku plugins: 
         00_dokku-standard    0.32.3 enabled    dokku core standard plugin
         20_events            0.32.3 enabled    dokku core events logging plugin
         app-json             0.32.3 enabled    dokku core app-json plugin
         apps                 0.32.3 enabled    dokku core apps plugin
         builder              0.32.3 enabled    dokku core builder plugin
         builder-dockerfile   0.32.3 enabled    dokku core builder-dockerfile plugin
         builder-herokuish    0.32.3 enabled    dokku core builder-herokuish plugin
         builder-lambda       0.32.3 enabled    dokku core builder-lambda plugin
         builder-nixpacks     0.32.3 enabled    dokku core builder-nixpacks plugin
         builder-null         0.32.3 enabled    dokku core builder-null plugin
         builder-pack         0.32.3 enabled    dokku core builder-pack plugin
         buildpacks           0.32.3 enabled    dokku core buildpacks plugin
         caddy-vhosts         0.32.3 enabled    dokku core caddy-vhosts plugin
         certs                0.32.3 enabled    dokku core certificate management plugin
         checks               0.32.3 enabled    dokku core checks plugin
         clickhouse           1.36.0 enabled    dokku postgres service plugin
         common               0.32.3 enabled    dokku core common plugin
         config               0.32.3 enabled    dokku core config plugin
         cron                 0.32.3 enabled    dokku core cron plugin
         docker-options       0.32.3 enabled    dokku core docker-options plugin
         domains              0.32.3 enabled    dokku core domains plugin
         enter                0.32.3 enabled    dokku core enter plugin
         git                  0.32.3 enabled    dokku core git plugin
         haproxy-vhosts       0.32.3 enabled    dokku core haproxy-vhosts plugin
         letsencrypt          0.20.3 enabled    Automated installation of let's encrypt TLS certificates
         logs                 0.32.3 enabled    dokku core logs plugin
         network              0.32.3 enabled    dokku core network plugin
         nginx-vhosts         0.32.3 enabled    dokku core nginx-vhosts plugin
         openresty-vhosts     0.32.3 enabled    dokku core openresty-vhosts plugin
         plugin               0.32.3 enabled    dokku core plugin plugin
         ports                0.32.3 enabled    dokku core ports plugin
         postgres             1.36.0 enabled    dokku postgres service plugin
         proxy                0.32.3 enabled    dokku core proxy plugin
         ps                   0.32.3 enabled    dokku core ps plugin
         registry             0.32.3 enabled    dokku core registry plugin
         repo                 0.32.3 enabled    dokku core repo plugin
         resource             0.32.3 enabled    dokku core resource plugin
         run                  0.32.3 enabled    dokku core run plugin
         scheduler            0.32.3 enabled    dokku core scheduler plugin
         scheduler-docker-local 0.32.3 enabled    dokku core scheduler-docker-local plugin
         scheduler-null       0.32.3 enabled    dokku core scheduler-null plugin
         shell                0.32.3 enabled    dokku core shell plugin
         ssh-keys             0.32.3 enabled    dokku core ssh-keys plugin
         storage              0.32.3 enabled    dokku core storage plugin
         trace                0.32.3 enabled    dokku core trace plugin
         traefik-vhosts       0.32.3 enabled    dokku core traefik-vhosts plugin

How (deb/make) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:

Using https://github.com/dokku/ansible-dokku on a new cloud server.

Additional information

# DOKKU_TRACE=1 dokku clickhouse:create lollipop
+ 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-22
+ DOKKU_IMAGE=gliderlabs/herokuish:latest-22
+ export DOKKU_CNB_BUILDER=heroku/builder:22
+ DOKKU_CNB_BUILDER=heroku/builder:22
+ 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=169892
+ DOKKU_PID=169892
+ 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 clickhouse:create lollipop
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=('clickhouse:create' 'lollipop')
+ local args
+ local flags
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ clickhouse:create == \-\-\a\p\p ]]
+ [[ clickhouse:create =~ ^--.* ]]
+ next_index=2
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ lollipop == \-\-\a\p\p ]]
+ [[ lollipop =~ ^--.* ]]
+ next_index=3
+ [[ -z '' ]]
++ sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
++ echo -e ''
+ export DOKKU_GLOBAL_FLAGS=
+ DOKKU_GLOBAL_FLAGS=
+ return 0
+ args=("$@")
+ skip_arg=false
+ [[ clickhouse:create =~ ^--.* ]]
+ 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
+ [[ root != \d\o\k\k\u ]]
+ unset TMP TMPDIR TEMP TEMPDIR
+ [[ ! clickhouse:create =~ plugin:* ]]
+ [[ clickhouse:create != \s\s\h\-\k\e\y\s\:\a\d\d ]]
+ [[ clickhouse:create != \s\s\h\-\k\e\y\s\:\r\e\m\o\v\e ]]
++ id -un
+ export SSH_USER=root
+ SSH_USER=root
+ sudo -u dokku -E -H /usr/bin/dokku clickhouse:create lollipop
+ 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-22
+ DOKKU_IMAGE=gliderlabs/herokuish:latest-22
+ export DOKKU_CNB_BUILDER=heroku/builder:22
+ DOKKU_CNB_BUILDER=heroku/builder:22
+ 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=169903
+ DOKKU_PID=169903
+ 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 clickhouse:create lollipop
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=('clickhouse:create' 'lollipop')
+ local args
+ local flags
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ clickhouse:create == \-\-\a\p\p ]]
+ [[ clickhouse:create =~ ^--.* ]]
+ next_index=2
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ lollipop == \-\-\a\p\p ]]
+ [[ lollipop =~ ^--.* ]]
+ next_index=3
+ [[ -z '' ]]
++ sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
++ echo -e ''
+ export DOKKU_GLOBAL_FLAGS=
+ DOKKU_GLOBAL_FLAGS=
+ return 0
+ args=("$@")
+ skip_arg=false
+ [[ clickhouse:create =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
+ [[ '' == \t\r\u\e ]]
++ LC_ALL=C
++ /usr/bin/tty
+ [[ /dev/pts/1 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ clickhouse:create =~ ^plugin:.* ]]
+ [[ clickhouse:create == \s\s\h\-\k\e\y\s\:\a\d\d ]]
+ [[ clickhouse:create == \s\s\h\-\k\e\y\s\:\r\e\m\o\v\e ]]
+ [[ -n '' ]]
+ dokku_auth clickhouse:create lollipop
+ declare 'desc=calls user-auth plugin trigger'
+ export SSH_USER=root
+ SSH_USER=root
+ export SSH_NAME=default
+ SSH_NAME=default
+ export DOKKU_COMMAND=clickhouse:create
+ DOKKU_COMMAND=clickhouse:create
++ 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 clickhouse:create lollipop
+ declare 'desc=executes dokku sub-commands'
+ local PLUGIN_NAME=clickhouse:create
+ local PLUGIN_CMD=clickhouse:create
+ local implemented=0
+ local script
+ argv=('clickhouse:create' 'lollipop')
+ local argv
+ case "$PLUGIN_NAME" in
++ readlink -f /var/lib/dokku/plugins/enabled/clickhouse
+ [[ /var/lib/dokku/plugins/available/clickhouse == *core-plugins* ]]
+ [[ -x /var/lib/dokku/plugins/enabled/clickhouse:create/subcommands/default ]]
+ [[ -x /var/lib/dokku/plugins/enabled/clickhouse:create/subcommands/clickhouse:create ]]
+ [[ -x /var/lib/dokku/plugins/enabled/clickhouse/subcommands/create ]]
+ [[ -n create ]]
+ /var/lib/dokku/plugins/enabled/clickhouse/subcommands/create clickhouse:create lollipop
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++++ dirname /var/lib/dokku/plugins/enabled/clickhouse/subcommands/create
+++ cd /var/lib/dokku/plugins/enabled/clickhouse/subcommands
+++ pwd
++ dirname /var/lib/dokku/plugins/enabled/clickhouse/subcommands
+ source /var/lib/dokku/plugins/enabled/clickhouse/functions
++++ dirname /var/lib/dokku/plugins/enabled/clickhouse/functions
+++ cd /var/lib/dokku/plugins/enabled/clickhouse
+++ pwd
++ source /var/lib/dokku/plugins/enabled/clickhouse/config
+++++ dirname /var/lib/dokku/plugins/enabled/clickhouse/config
++++ cd /var/lib/dokku/plugins/enabled/clickhouse
++++ pwd
+++ _DIR=/var/lib/dokku/plugins/enabled/clickhouse
+++ export POSTGRES_IMAGE=postgres
+++ POSTGRES_IMAGE=postgres
+++ export POSTGRES_IMAGE_VERSION=16.0
+++ POSTGRES_IMAGE_VERSION=16.0
+++ export POSTGRES_ROOT=/var/lib/dokku/services/postgres
+++ POSTGRES_ROOT=/var/lib/dokku/services/postgres
+++ export DOKKU_LIB_HOST_ROOT=/var/lib/dokku
+++ DOKKU_LIB_HOST_ROOT=/var/lib/dokku
+++ export POSTGRES_HOST_ROOT=/var/lib/dokku/services/postgres
+++ POSTGRES_HOST_ROOT=/var/lib/dokku/services/postgres
+++ PLUGIN_UNIMPLEMENTED_SUBCOMMANDS=()
+++ export PLUGIN_UNIMPLEMENTED_SUBCOMMANDS
+++ export PLUGIN_COMMAND_PREFIX=postgres
+++ PLUGIN_COMMAND_PREFIX=postgres
+++ export PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/postgres
+++ PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/postgres
+++ export PLUGIN_DATA_ROOT=/var/lib/dokku/services/postgres
+++ PLUGIN_DATA_ROOT=/var/lib/dokku/services/postgres
+++ export PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/postgres
+++ PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/postgres
+++ PLUGIN_DATASTORE_PORTS=('5432')
+++ export PLUGIN_DATASTORE_PORTS
+++ export PLUGIN_DATASTORE_WAIT_PORT=5432
+++ PLUGIN_DATASTORE_WAIT_PORT=5432
+++ export PLUGIN_DEFAULT_ALIAS=DATABASE
+++ PLUGIN_DEFAULT_ALIAS=DATABASE
+++ export PLUGIN_DISABLE_PULL=
+++ PLUGIN_DISABLE_PULL=
+++ export PLUGIN_DISABLE_PULL_VARIABLE=POSTGRES_DISABLE_PULL
+++ PLUGIN_DISABLE_PULL_VARIABLE=POSTGRES_DISABLE_PULL
+++ export PLUGIN_ALT_ALIAS=DOKKU_POSTGRES
+++ PLUGIN_ALT_ALIAS=DOKKU_POSTGRES
+++ export PLUGIN_IMAGE=postgres
+++ PLUGIN_IMAGE=postgres
+++ export PLUGIN_IMAGE_VERSION=16.0
+++ PLUGIN_IMAGE_VERSION=16.0
+++ export PLUGIN_SCHEME=postgres
+++ PLUGIN_SCHEME=postgres
+++ export PLUGIN_SERVICE=Postgres
+++ PLUGIN_SERVICE=Postgres
+++ export PLUGIN_VARIABLE=POSTGRES
+++ PLUGIN_VARIABLE=POSTGRES
+++ export PLUGIN_BASE_PATH=/var/lib/dokku/plugins
+++ PLUGIN_BASE_PATH=/var/lib/dokku/plugins
+++ export PLUGIN_CONFIG_SUFFIX=data
+++ PLUGIN_CONFIG_SUFFIX=data
+++ [[ -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.34.1-uclibc
+++ PLUGIN_BUSYBOX_IMAGE=busybox:1.34.1-uclibc
+++ export PLUGIN_AMBASSADOR_IMAGE=dokku/ambassador:0.5.0
+++ PLUGIN_AMBASSADOR_IMAGE=dokku/ambassador:0.5.0
+++ export PLUGIN_S3BACKUP_IMAGE=dokku/s3backup:0.14.0
+++ PLUGIN_S3BACKUP_IMAGE=dokku/s3backup:0.14.0
+++ export PLUGIN_WAIT_IMAGE=dokku/wait:0.6.0
+++ PLUGIN_WAIT_IMAGE=dokku/wait:0.6.0
+++ export POSTGRES_CONFIG_OPTIONS=
+++ POSTGRES_CONFIG_OPTIONS=
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
++++ dirname /var/lib/dokku/plugins/enabled/clickhouse/functions
+++ cd /var/lib/dokku/plugins/enabled/clickhouse
+++ pwd
++ source /var/lib/dokku/plugins/enabled/clickhouse/common-functions
+++++ dirname /var/lib/dokku/plugins/enabled/clickhouse/common-functions
++++ cd /var/lib/dokku/plugins/enabled/clickhouse
++++ pwd
+++ source /var/lib/dokku/plugins/enabled/clickhouse/config
++++++ dirname /var/lib/dokku/plugins/enabled/clickhouse/config
+++++ cd /var/lib/dokku/plugins/enabled/clickhouse
+++++ pwd
++++ _DIR=/var/lib/dokku/plugins/enabled/clickhouse
++++ export POSTGRES_IMAGE=postgres
++++ POSTGRES_IMAGE=postgres
++++ export POSTGRES_IMAGE_VERSION=16.0
++++ POSTGRES_IMAGE_VERSION=16.0
++++ export POSTGRES_ROOT=/var/lib/dokku/services/postgres
++++ POSTGRES_ROOT=/var/lib/dokku/services/postgres
++++ export DOKKU_LIB_HOST_ROOT=/var/lib/dokku
++++ DOKKU_LIB_HOST_ROOT=/var/lib/dokku
++++ export POSTGRES_HOST_ROOT=/var/lib/dokku/services/postgres
++++ POSTGRES_HOST_ROOT=/var/lib/dokku/services/postgres
++++ PLUGIN_UNIMPLEMENTED_SUBCOMMANDS=()
++++ export PLUGIN_UNIMPLEMENTED_SUBCOMMANDS
++++ export PLUGIN_COMMAND_PREFIX=postgres
++++ PLUGIN_COMMAND_PREFIX=postgres
++++ export PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/postgres
++++ PLUGIN_CONFIG_ROOT=/var/lib/dokku/config/postgres
++++ export PLUGIN_DATA_ROOT=/var/lib/dokku/services/postgres
++++ PLUGIN_DATA_ROOT=/var/lib/dokku/services/postgres
++++ export PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/postgres
++++ PLUGIN_DATA_HOST_ROOT=/var/lib/dokku/services/postgres
++++ PLUGIN_DATASTORE_PORTS=('5432')
++++ export PLUGIN_DATASTORE_PORTS
++++ export PLUGIN_DATASTORE_WAIT_PORT=5432
++++ PLUGIN_DATASTORE_WAIT_PORT=5432
++++ export PLUGIN_DEFAULT_ALIAS=DATABASE
++++ PLUGIN_DEFAULT_ALIAS=DATABASE
++++ export PLUGIN_DISABLE_PULL=
++++ PLUGIN_DISABLE_PULL=
++++ export PLUGIN_DISABLE_PULL_VARIABLE=POSTGRES_DISABLE_PULL
++++ PLUGIN_DISABLE_PULL_VARIABLE=POSTGRES_DISABLE_PULL
++++ export PLUGIN_ALT_ALIAS=DOKKU_POSTGRES
++++ PLUGIN_ALT_ALIAS=DOKKU_POSTGRES
++++ export PLUGIN_IMAGE=postgres
++++ PLUGIN_IMAGE=postgres
++++ export PLUGIN_IMAGE_VERSION=16.0
++++ PLUGIN_IMAGE_VERSION=16.0
++++ export PLUGIN_SCHEME=postgres
++++ PLUGIN_SCHEME=postgres
++++ export PLUGIN_SERVICE=Postgres
++++ PLUGIN_SERVICE=Postgres
++++ export PLUGIN_VARIABLE=POSTGRES
++++ PLUGIN_VARIABLE=POSTGRES
++++ export PLUGIN_BASE_PATH=/var/lib/dokku/plugins
++++ PLUGIN_BASE_PATH=/var/lib/dokku/plugins
++++ export PLUGIN_CONFIG_SUFFIX=data
++++ PLUGIN_CONFIG_SUFFIX=data
++++ [[ -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.34.1-uclibc
++++ PLUGIN_BUSYBOX_IMAGE=busybox:1.34.1-uclibc
++++ export PLUGIN_AMBASSADOR_IMAGE=dokku/ambassador:0.5.0
++++ PLUGIN_AMBASSADOR_IMAGE=dokku/ambassador:0.5.0
++++ export PLUGIN_S3BACKUP_IMAGE=dokku/s3backup:0.14.0
++++ PLUGIN_S3BACKUP_IMAGE=dokku/s3backup:0.14.0
++++ export PLUGIN_WAIT_IMAGE=dokku/wait:0.6.0
++++ PLUGIN_WAIT_IMAGE=dokku/wait:0.6.0
++++ export POSTGRES_CONFIG_OPTIONS=
++++ POSTGRES_CONFIG_OPTIONS=
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/property-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
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/core-plugins/available/common/property-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-create-cmd clickhouse:create lollipop
+ declare 'desc=create a Postgres service'
+ argv=('clickhouse:create' 'lollipop')
+ local cmd=postgres:create argv
+ [[ clickhouse:create == \p\o\s\t\g\r\e\s\:\c\r\e\a\t\e ]]
+ CREATE_FLAGS_LIST=('lollipop')
+ declare SERVICE=clickhouse:create CREATE_FLAGS_LIST
+ service_create clickhouse:create lollipop
+ local SERVICE=clickhouse:create
+ is_valid_service_name clickhouse:create
+ declare 'desc=validate a service name'
+ declare SERVICE=clickhouse:create
+ [[ -z clickhouse:create ]]
+ [[ clickhouse:create =~ ^[A-Za-z0-9_-]+$ ]]
+ return 1
+ dokku_log_fail 'Please specify a valid name for the service. Valid characters are: [A-Za-z0-9_]+'
+ declare 'desc=log fail formatter'
+ echo ' !     Please specify a valid name for the service. Valid characters are: [A-Za-z0-9_]+'
 !     Please specify a valid name for the service. Valid characters are: [A-Za-z0-9_]+
+ exit 1
nerg4l commented 11 months ago

In your case, it looks like the postgres plugin is run instead of the clickhouse one.

...
++++ _DIR=/var/lib/dokku/plugins/enabled/clickhouse
++++ export POSTGRES_IMAGE=postgres
++++ POSTGRES_IMAGE=postgres
++++ export POSTGRES_IMAGE_VERSION=16.0
++++ POSTGRES_IMAGE_VERSION=16.0
...

+ declare 'desc=create a Postgres service'
+ argv=('clickhouse:create' 'lollipop')
+ local cmd=postgres:create argv
...
josegonzalez commented 10 months ago

Seems like you installed the postgres plugin as the clickhouse one:

         clickhouse           1.36.0 enabled    dokku postgres service plugin

You'll want to uninstall it and install the correct one.