Replacing disk while retaining osd id - ceph

In a ceph cluster, how do we replace failed disks while keeping the osd id(s)?
Here are the steps followed (unsuccessful):
# 1 destroy the failed osd(s)
for i in 38 41 44 47; do ceph osd destroy $i --yes-i-really-mean-it; done
# 2 create the new ones that take the previous osd ids
ceph orch apply osd -i replace.yaml
# Scheduled osd.ceph_osd_ssd update...
The replace.yaml:
service_type: osd
service_id: ceph_osd_ssd # "ceph_osd_hdd" for hdd
placement:
hosts:
- storage01
data_devices:
paths:
- /dev/sdz
- /dev/sdaa
- /dev/sdab
- /dev/sdac
osd_id_claims:
storage01: ['38', '41', '44', '47']
But nothing happens, the osd id still show as destroyed and devices without osd id(s).
# ceph -s
cluster:
id: db2b7dd0-1e3b-11eb-be3b-40a6b721faf4
health: HEALTH_WARN
failed to probe daemons or devices
5 daemons have recently crashed
I also tried to run this
ceph orch daemon add osd storage01:/dev/sdaa
which gives:
Error EINVAL: Traceback (most recent call last):
File "/usr/share/ceph/mgr/mgr_module.py", line 1177, in _handle_command
return self.handle_command(inbuf, cmd)
File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 141, in handle_command
return dispatch[cmd['prefix']].call(self, cmd, inbuf)
File "/usr/share/ceph/mgr/mgr_module.py", line 318, in call
return self.func(mgr, **kwargs)
File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 103, in <lambda>
wrapper_copy = lambda *l_args, **l_kwargs: wrapper(*l_args, **l_kwargs)
File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 92, in wrapper
return func(*args, **kwargs)
File "/usr/share/ceph/mgr/orchestrator/module.py", line 713, in _daemon_add_osd
raise_if_exception(completion)
File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 643, in raise_if_exception
raise e
RuntimeError: cephadm exited with an error code: 1, stderr:INFO:cephadm:/bin/podman:stderr Running command: /usr/bin/ceph-authtool --gen-print-key
INFO:cephadm:/bin/podman:stderr Running command: /usr/bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring -i - osd new daca7735-179b-4443-acef-412bc39865e3
INFO:cephadm:/bin/podman:stderr Running command: /usr/sbin/lvcreate --yes -l 100%FREE -n osd-block-daca7735-179b-4443-acef-412bc39865e3 ceph-0a533319-def2-4fbe-82f5-e76f971b7f48
INFO:cephadm:/bin/podman:stderr stderr: Calculated size of logical volume is 0 extents. Needs to be larger.
INFO:cephadm:/bin/podman:stderr --> Was unable to complete a new OSD, will rollback changes
INFO:cephadm:/bin/podman:stderr Running command: /usr/bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring osd purge-new osd.38 --yes-i-really-mean-it
INFO:cephadm:/bin/podman:stderr stderr: purged osd.38
INFO:cephadm:/bin/podman:stderr --> RuntimeError: command returned non-zero exit status: 5
Traceback (most recent call last):
File "<stdin>", line 5204, in <module>
File "<stdin>", line 1116, in _infer_fsid
File "<stdin>", line 1199, in _infer_image
File "<stdin>", line 3322, in command_ceph_volume
File "<stdin>", line 878, in call_throws
RuntimeError: Failed command: /bin/podman run --rm --net=host --ipc=host --privileged --group-add=disk -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=storage01 -e CEPH_VOLUME_OSDSPEC_AFFINITY=None -v /var/run/ceph/db2b7dd0-1e3b-11eb-be3b-40a6b721faf4:/var/run/ceph:z -v /var/log/ceph/db2b7dd0-1e3b-11eb-be3b-40a6b721faf4:/var/log/ceph:z -v /var/lib/ceph/db2b7dd0-1e3b-11eb-be3b-40a6b721faf4/crash:/var/lib/ceph/crash:z -v /dev:/dev -v /run/udev:/run/udev -v /sys:/sys -v /run/lvm:/run/lvm -v /run/lock/lvm:/run/lock/lvm -v /tmp/ceph-tmp3vjwl32x:/etc/ceph/ceph.conf:z -v /tmp/ceph-tmpclrbifgb:/var/lib/ceph/bootstrap-osd/ceph.keyring:z --entrypoint /usr/sbin/ceph-volume docker.io/ceph/ceph:v15 lvm prepare --bluestore --data /dev/sdaa --no-systemd
zapping the devices also errors:
ceph orch device zap storage01 /dev/sdaa --force
Error EINVAL: Zap failed: INFO:cephadm:/bin/podman:stderr --> Zapping: /dev/sdaa
INFO:cephadm:/bin/podman:stderr --> Zapping lvm member /dev/sdaa. lv_path is /dev/ceph-0a533319-def2-4fbe-82f5-e76f971b7f48/osd-data-9a23996c-6b99-4a46-b539-1dfe2e9358ae
INFO:cephadm:/bin/podman:stderr Running command: /usr/bin/dd if=/dev/zero of=/dev/ceph-0a533319-def2-4fbe-82f5-e76f971b7f48/osd-data-9a23996c-6b99-4a46-b539-1dfe2e9358ae bs=1M count=10 conv=fsync
INFO:cephadm:/bin/podman:stderr stderr: dd: fsync failed for '/dev/ceph-0a533319-def2-4fbe-82f5-e76f971b7f48/osd-data-9a23996c-6b99-4a46-b539-1dfe2e9358ae': Input/output error
INFO:cephadm:/bin/podman:stderr stderr: 10+0 records in
INFO:cephadm:/bin/podman:stderr 10+0 records out
INFO:cephadm:/bin/podman:stderr 10485760 bytes (10 MB, 10 MiB) copied, 0.00846806 s, 1.2 GB/s
INFO:cephadm:/bin/podman:stderr --> RuntimeError: command returned non-zero exit status: 1
Traceback (most recent call last):
File "<stdin>", line 5203, in <module>
File "<stdin>", line 1115, in _infer_fsid
File "<stdin>", line 1198, in _infer_image
File "<stdin>", line 3321, in command_ceph_volume
File "<stdin>", line 877, in call_throws
RuntimeError: Failed command: /bin/podman run --rm --net=host --ipc=host --privileged --group-add=disk -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=storage01 -v /var/run/ceph/db2b7dd0-1e3b-11eb-be3b-40a6b721faf4:/var/run/ceph:z -v /var/log/ceph/db2b7dd0-1e3b-11eb-be3b-40a6b721faf4:/var/log/ceph:z -v /var/lib/ceph/db2b7dd0-1e3b-11eb-be3b-40a6b721faf4/crash:/var/lib/ceph/crash:z -v /dev:/dev -v /run/udev:/run/udev -v /sys:/sys -v /run/lvm:/run/lvm -v /run/lock/lvm:/run/lock/lvm --entrypoint /usr/sbin/ceph-volume docker.io/ceph/ceph:v15 lvm zap --destroy /dev/sdaa
Here is the relevant documentation for this:
https://docs.ceph.com/en/latest/cephadm/drivegroups/#drivegroups
https://docs.ceph.com/en/latest/mgr/orchestrator_modules/#osd-replacement
https://docs.ceph.com/en/latest/mgr/orchestrator/#orchestrator-cli-placement-spec
https://github.com/ceph/ceph/blob/892c51dd3c5f7108e766bea30cd5e0d801b0abd3/src/python-common/ceph/deployment/drive_group.py#L26
https://github.com/ceph/ceph/blob/892c51dd3c5f7108e766bea30cd5e0d801b0abd3/src/python-common/ceph/deployment/drive_group.py#L38
https://github.com/ceph/ceph/blob/892c51dd3c5f7108e766bea30cd5e0d801b0abd3/src/python-common/ceph/deployment/drive_group.py#L161

lvremove /dev/ceph-0a533319-def2-4fbe-82f5-e76f971b7f48/osd-data-9a23996c-6b99-4a46-b539-1dfe2e9358ae -y
vgremove ceph-0a533319-def2-4fbe-82f5-e76f971b7f48
Do this for all, then rerun the zaps:
for i in '/dev/sdz' '/dev/sdaa' '/dev/sdab' '/dev/sdac'; do ceph orch device zap storage01 $i --force; done
and finally
ceph orch apply osd -i replace.yaml

Related

Error while build image via gitlab cd/cd - Error while fetching server API version

Operation system CentOS Linux release 8.3.2011 x86_64
I try build image when push to master, this is my simple ci/cd config file .gitlab-ci.yml
image:
name: docker/compose:alpine-1.29.2
entrypoint: [""]
stages:
- build
build-job:
stage: build
script:
- echo $(whoami)
- docker -v
- docker-compose --version
- docker-compose build --no-cache
- docker-compose push
- echo "Compile complete."
only:
- master
While pipeline running, i have next error
$ echo $(whoami)
root
$ docker -v
Docker version 19.03.15, build 99e3ed8
$ docker-compose --version
docker-compose version 1.29.2, build 5becea4
$ docker-compose build --no-cache
[21] Failed to execute script docker-compose
Traceback (most recent call last):
File "urllib3/connectionpool.py", line 677, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1277, in request
File "http/client.py", line 1323, in _send_request
File "http/client.py", line 1272, in endheaders
File "http/client.py", line 1032, in _send_output
File "http/client.py", line 972, in send
File "docker/transport/unixconn.py", line 43, in connect
...
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose/cli/main.py", line 81, in main
File "compose/cli/main.py", line 200, in perform_command
File "compose/cli/command.py", line 70, in project_from_options
File "compose/cli/command.py", line 153, in get_project
File "compose/cli/docker_client.py", line 43, in get_client
File "compose/cli/docker_client.py", line 170, in docker_client
File "docker/api/client.py", line 197, in __init__
File "docker/api/client.py", line 222, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
I checked permission on sock files
ls -la /var/run/docker.sock
srw-rw-rw- 1 root docker 0 Feb 1 10:05 /var/run/docker.sock
ls -la /run/containerd/containerd.sock
srw-rw-rw- 1 root root 0 Feb 1 10:05 /run/containerd/containerd.sock
Docker service is running on host machine
systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2022-02-01 10:05:10 MSK; 27min ago
Docs: https://docs.docker.com
Main PID: 10698 (dockerd)
Tasks: 10
Memory: 430.4M
CGroup: /system.slice/docker.service
└─10698 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
...
Have anybody ideas?
I had a same issue .Here is a solution
sudo service docker start
or you can list images
docker images
Need transfer socket from host machine for each gitlab runner in /etc/gitlab-runner/config.toml (default path)
volumes = ["/var/run/docker.sock:/var/run/docker.sock", "/cache"]

Why are docker pgadmin and postgres services named with '.\'?

I am super new to Docker and my first task as an intern is to fix some problems related to docker in a Laravel + Postgres + pgadmin + redis containerized project. I'm running everything on WSL2 Ubuntu 20.04 (since I only have Windows 10 Home)
My questions are simple I believe.
Why postgres and pgadmin volumes names are set with a '.' in the beggining?? And can someone spot a problem with the pgadmin service? It's not working after docker-compose up -d, do I have to do anything else to set it up?
postgres-app:
image: postgres:12
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: recadastramento
volumes:
- .\postgres:/var/lib/postgresql/data
networks:
- app-network
pgadmim-app:
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: "noriakiakiba#gmail.com"
PGADMIN_DEFAULT_PASSWORD: "123456"
ports:
- "16543:80"
depends_on:
- postgres-app
volumes:
- .\pgadmin:/var/lib/pgadmin
networks:
- app-network
networks:
app-network:
driver: bridge
My Dockerfile
# Dockerfile
FROM php:7.4.1-apache
#se nao criar essa pasta dá erro ao instalar openjdk
RUN mkdir /usr/share/man/man1/
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
git-core \
openssl \
libssl-dev \
autoconf \
build-essential \
apt-utils \
zlib1g-dev \
libzip-dev \
unzip \
zip \
libmagick++-dev \
libgraphicsmagick1-dev \
libmagickwand-dev \
libpq-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libwebp-dev \
libxpm-dev \
nano \
gcc \
g++ \
curl \
imagemagick \
git \
zip \
unzip \
libcurl4-openssl-dev \
make \
ant \
apt-transport-https \
ca-certificates \
dirmngr \
wget \
locales
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
# 2. apache configs + document root
ENV APACHE_DOCUMENT_ROOT=/var/www/html/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
# 3. mod_rewrite for URL rewrite and mod_headers for .htaccess extra headers like Access-Control-Allow-Origin-
RUN a2enmod rewrite headers
# 4. start with base php config, then add extensions
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
# Configure php extensions
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
# Install php extensions
RUN docker-php-ext-install \
bcmath \
calendar \
curl \
exif \
gd \
iconv \
intl \
pdo \
pdo_pgsql \
pcntl \
tokenizer \
xml \
zip \
json \
soap
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
#RUN git clone https://github.com/nodejs/node.git \
# && cd node \
# && ./configure \
# && make \
# && sudo make install
RUN chown -R www-data:www-data /var/www/html
RUN echo 'memory_limit = -1' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini;
# Clear package lists
RUN apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - &&\
apt-get -y install nodejs
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_host = host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN pecl install imagick \
&& echo "extension=imagick.so" >> /usr/local/etc/php/php.ini
Ok, as recommended I executed sudo docker-compose up and got the following errors (the last part of postgres is repetead forever):
postgres-app_1 | chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
laravel-app_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
postgres-app_1 | The files belonging to this database system will be owned by user "postgres".
postgres-app_1 | This user must also own the server process.
postgres-app_1 |
postgres-app_1 | The database cluster will be initialized with locale "en_US.utf8".
postgres-app_1 | The default database encoding has accordingly been set to "UTF8".
postgres-app_1 | The default text search configuration will be set to "english".
postgres-app_1 |
postgres-app_1 | Data page checksums are disabled.
postgres-app_1 |
postgres-app_1 | fixing permissions on existing directory /var/lib/postgresql/data ... initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
pgadmim-app_1 | Traceback (most recent call last):
pgadmim-app_1 | File "/pgadmin4/run_pgadmin.py", line 4, in <module>
pgadmim-app_1 | from pgAdmin4 import app
pgadmim-app_1 | File "/pgadmin4/pgAdmin4.py", line 94, in <module>
pgadmim-app_1 | WARNING: Failed to set ACL on the directory containing the configuration database:
pgadmim-app_1 | [Errno 1] Operation not permitted: '/var/lib/pgadmin'
pgadmim-app_1 | HINT : You may need to manually set the permissions on
pgadmim-app_1 | /var/lib/pgadmin to allow pgadmin to write to it.
pgadmim-app_1 | app = create_app()
pgadmim-app_1 | File "/pgadmin4/pgadmin/__init__.py", line 256, in create_app
pgadmim-app_1 | create_app_data_directory(config)
pgadmim-app_1 | File "/pgadmin4/pgadmin/setup/data_directory.py", line 90, in create_app_data_directory
pgadmim-app_1 | os.chmod(config.SESSION_DB_PATH, 0o700)
pgadmim-app_1 | PermissionError: [Errno 1] Operation not permitted: '/var/lib/pgadmin/sessions'
pgadmim-app_1 | [2021-01-28 22:57:21 +0000] [1] [INFO] Starting gunicorn 19.9.0
pgadmim-app_1 | [2021-01-28 22:57:21 +0000] [1] [INFO] Listening at: http://[::]:80 (1)
pgadmim-app_1 | [2021-01-28 22:57:21 +0000] [1] [INFO] Using worker: threads
pgadmim-app_1 | /usr/local/lib/python3.9/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
pgadmim-app_1 | return io.open(fd, *args, **kwargs)
pgadmim-app_1 | [2021-01-28 22:57:21 +0000] [87] [INFO] Booting worker with pid: 87
pgadmim-app_1 | [2021-01-28 22:57:21 +0000] [87] [ERROR] Exception in worker process
pgadmim-app_1 | Traceback (most recent call last):
pgadmim-app_1 | File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
pgadmim-app_1 | worker.init_process()
pgadmim-app_1 | File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/gthread.py", line 104, in init_process
pgadmim-app_1 | super(ThreadWorker, self).init_process()
pgadmim-app_1 | File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 129, in init_process
pgadmim-app_1 | self.load_wsgi()
pgadmim-app_1 | File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
pgadmim-app_1 | self.wsgi = self.app.wsgi()
pgadmim-app_1 | File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
pgadmim-app_1 | self.callable = self.load()
pgadmim-app_1 | File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
pgadmim-app_1 | return self.load_wsgiapp()
pgadmim-app_1 | File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
pgadmim-app_1 | return util.import_app(self.app_uri)
pgadmim-app_1 | File "/usr/local/lib/python3.9/site-packages/gunicorn/util.py", line 350, in import_app
pgadmim-app_1 | __import__(module)
pgadmim-app_1 | File "/pgadmin4/run_pgadmin.py", line 4, in <module>
pgadmim-app_1 | from pgAdmin4 import app
pgadmim-app_1 | File "/pgadmin4/pgAdmin4.py", line 94, in <module>
pgadmim-app_1 | app = create_app()
pgadmim-app_1 | File "/pgadmin4/pgadmin/__init__.py", line 256, in create_app
pgadmim-app_1 | create_app_data_directory(config)
pgadmim-app_1 | File "/pgadmin4/pgadmin/setup/data_directory.py", line 90, in create_app_data_directory
pgadmim-app_1 | os.chmod(config.SESSION_DB_PATH, 0o700)
pgadmim-app_1 | PermissionError: [Errno 1] Operation not permitted: '/var/lib/pgadmin/sessions'
pgadmim-app_1 | [2021-01-28 22:57:21 +0000] [87] [INFO] Worker exiting (pid: 87)
pgadmim-app_1 | WARNING: Failed to set ACL on the directory containing the configuration database:
pgadmim-app_1 | [Errno 1] Operation not permitted: '/var/lib/pgadmin'
pgadmim-app_1 | HINT : You may need to manually set the permissions on
pgadmim-app_1 | /var/lib/pgadmin to allow pgadmin to write to it.
docker_postgres-app_1 exited with code 1
pgadmim-app_1 | [2021-01-28 22:57:21 +0000] [1] [INFO] Shutting down: Master
pgadmim-app_1 | [2021-01-28 22:57:21 +0000] [1] [INFO] Reason: Worker failed to boot.
docker_pgadmim-app_1 exited with code 3
postgres-app_1 | chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
postgres-app_1 | The files belonging to this database system will be owned by user "postgres".
postgres-app_1 | This user must also own the server process.
postgres-app_1 |
postgres-app_1 | The database cluster will be initialized with locale "en_US.utf8".
postgres-app_1 | The default database encoding has accordingly been set to "UTF8".
postgres-app_1 | The default text search configuration will be set to "english".
postgres-app_1 |
postgres-app_1 | Data page checksums are disabled.
postgres-app_1 |
postgres-app_1 | initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted
postgres-app_1 | fixing permissions on existing directory /var/lib/postgresql/data ... chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
I searched for this error and apparently I need to run chown -R 5050:5050 /var/lib in the host in order for pgadmin to run on localhost:16543, but what I want is to fix this automatically (maybe with the Dockerfile?)
I have a similar docker-compose.yml file, but I use named volumes for my db service. Only for my pgadmin service I use bind mount ./pgadmin:/var/lib/pgadmin, to bind the directory ./pgadmin in my windows host machine to the directory /var/lib/pgadmin in container. I find it useful for pgadmin service, because when we generate a backupfile of a database/server, we can take it directly from ./pgadmin in host machine.
Following is a compose file that works perfectly fine for me.
docker-compose.yml
version: "3.7"
services:
db:
image: postgres:12
container_name: db
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=dbname
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
depends_on:
- db
volumes:
- ./pgadmin:/var/lib/pgadmin
ports:
- "5555:80"
environment:
PGADMIN_DEFAULT_EMAIL: pgadmin#domain.de
PGADMIN_DEFAULT_PASSWORD: pgadmin
volumes:
db_data:
permission of directory /var/lib/pgadmin in pgadmin container:
/var/lib $ ls -l
total 20
drwxr-xr-x 2 root root 4096 Dec 16 10:31 apk
drwxr-xr-x 2 root root 4096 Dec 16 10:31 misc
drwxrwxrwx 1 pgadmin pgadmin 0 Jan 29 03:09 pgadmin
drwx------ 1 postfix root 4096 Jan 29 03:09 postfix
drwx--x--x 3 root root 4096 Jan 25 14:35 sudo
drwxr-xr-x 2 root root 4096 Dec 16 10:31 udhcpd

jupyterlab/hub-extension#0.12.0" is not compatible with the current JupyterLab

I want to install the littlest jupyterhub via .gitlab-ci.yml in a subdomain.
Here is my .gitlab-ci.yml. I get this error message. I need a little help to fix this error message. I know the littlest jupyterhub is still in beta.
Is it possible to add packages like pandas, mathplotlib to install with a shell script?
$ curl https://raw.githubusercontent.com/jupyterhub/the-littlest-jupyterhub/master/bootstrap/bootstrap.py | sudo python3 - --admin klein
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 2682 100 2682 0 0 24381 0 --:--:-- --:--:-- --:--:-- 24381
Checking if TLJH is already installed...
Setting up hub environment
Installed python & virtual environment
Set up hub virtual environment
Setting up TLJH installer...
Setup tljh package
Starting TLJH installer...
> /usr/bin/npm pack #jupyterlab/hub-extension
Incompatible extension:
"#jupyterlab/hub-extension#0.12.0" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab Extension Package
>=0.18.3 <0.19.0 >=0.19.1 <0.20.0 #jupyterlab/application
>=0.18.3 <0.19.0 >=0.19.1 <0.20.0 #jupyterlab/apputils
Found compatible version: 0.11.0
> /usr/bin/npm pack #jupyterlab/hub-extension#0.11.0
> node /opt/tljh/user/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install
> node /opt/tljh/user/lib/python3.6/site-packages/jupyterlab/staging/yarn.js run build
System has not been booted with systemd as init system (PID 1). Can't operate.
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 447, in <module>
main()
File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 436, in main
ensure_jupyterhub_service(HUB_ENV_PREFIX)
File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 141, in ensure_jupyterhub_service
systemd.reload_daemon()
File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/systemd.py", line 19, in reload_daemon
], check=True)
File "/usr/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['systemctl', 'daemon-reload']' returned non-zero exit status 1.
Downloading traefik 1.6.5...
ERROR: Job failed: exit code 1
image: ubuntu:latest
before_script:
- apt-get update
- apt-get install -y curl git ssh python3 rsync sudo
- git submodule update --init --recursive
stages:
- test
- deploy
test_job:
stage: test
script:
- curl
https://raw.githubusercontent.com/jupyterhub/the-littlest-jupyterhub/master/bootstrap/bootstrap.py | sudo python3 - --admin admin
deploy:
stage: deploy
script:
- curl
https://raw.githubusercontent.com/jupyterhub/the-littlest jupyterhub/master/bootstrap/bootstrap.py | sudo python3 - --admin adminn
- mkdir .public
- cp -r * .public
- mv .public public
- mkdir "${HOME}/.ssh"
- echo "${SSH_HOST_KEY}" > "${HOME}/.ssh/known_hosts"
- echo "${SSH_PRIVATE_KEY}" > "${HOME}/.ssh/id_rsa"
- chmod 700 "${HOME}/.ssh/id_rsa"
- rsync -hrvz --delete --exclude=_ public/ user#example.com:www/jupyter/
artifacts:
paths:
- public
only:
- master

How to run mongodb docker instance with custom configuration file?

I have executed the command
sudo docker run -p 37017:27017 -v /data:/data/db -v /logs:/var/log/mongodb/ -v /etc/:/etc/ --name mongocustom -d bbed8d0e01c1 --config /etc/newmongod.conf.
but soon the container exited with an error.
docker logs gives following output:
sudo docker logs mongocustom
parse error: Invalid numeric literal at line 1, column 14
parse error: Invalid numeric literal at line 1, column 14
Error parsing YAML config file: yaml-cpp: error at line 16, column 12: illegal map value
try 'mongod --help' for more information
So where I went wrong.

ceph-deploy for CentOS 7 does not find ceph-02:/dev/sdb file

I am trying to activate ceph osd by following command:
ceph-deploy osd prepare ceph-02:/dev/sdb
And found following error
[ceph-02][WARNIN] OSError: [Errno 2] No such file or directory: '/dev/sdb'
[ceph-02][ERROR ] RuntimeError: command returned non-zero exit status: 1
[ceph_deploy.osd][ERROR ] Failed to execute command: /usr/sbin/ceph-disk -v
prepare --cluster ceph --fs-type xfs -- /dev/sdb
[ceph_deploy][ERROR ] GenericError: Failed to create 1 OSDs
step 1 :
parted -s /dev/sdb mklabel gpt mkpart primary xfs 0% 100%
step 2:
reboot
step3:
mkfs.xfs /dev/vdb -f
ceph-deploy osd create --data /dev/sdb server-hostname
its worked i tested this command.