Project

General

Profile

Actions

Bug #47291

closed

cephadm: invalid unit.run file generated for iSCSI

Added by Adam King over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Current unit.run generated for iSCSI looks like

set -e
if ! grep -qs /var/lib/ceph/e8918380-ed7a-11ea-aafd-525400ac1279/iscsi.iscsi.vm-02.mndjjs/configfs /proc/mounts; then mount -t configfs none /var/lib/ceph/e8918380-ed7a-11ea-aafd-525400ac1279/iscsi.iscsi.vm-02.mndjjs/configfs; fi
# iscsi tcmu-runnter container
! /bin/podman rm -f ceph-e8918380-ed7a-11ea-aafd-525400ac1279-iscsi.iscsi.vm-02.mndjjs-tcmu
! /bin/podman rm -f --storage ceph-e8918380-ed7a-11ea-aafd-525400ac1279-iscsi.iscsi.vm-02.mndjjs-tcmu
/bin/podman run --rm --net=host --ipc=host -d --conmon-pidfile /run/ceph-e8918380-ed7a-11ea-aafd-525400ac1279@iscsi.iscsi.vm-02.mndjjs.service-pid --cidfile /run/ceph-e8918380-ed7a-11ea-aafd-525400ac1279@iscsi.iscsi.vm-02.mndjjs.service-cid -d --conmon-pidfile /run/ceph-e8918380-ed7a-11ea-aafd-525400ac1279@iscsi.iscsi.vm-02.mndjjs.service-pid --cidfile /run/ceph-e8918380-ed7a-11ea-aafd-525400ac1279@iscsi.iscsi.vm-02.mndjjs.service-cid --privileged --group-add=disk --name ceph-e8918380-ed7a-11ea-aafd-525400ac1279-iscsi.iscsi.vm-02.mndjjs-tcmu -e CONTAINER_IMAGE=docker.io/amk3798/ceph:latest -e NODE_NAME=vm-02 -v /var/lib/ceph/e8918380-ed7a-11ea-aafd-525400ac1279/iscsi.iscsi.vm-02.mndjjs/config:/etc/ceph/ceph.conf:z -v /var/lib/ceph/e8918380-ed7a-11ea-aafd-525400ac1279/iscsi.iscsi.vm-02.mndjjs/keyring:/etc/ceph/keyring:z -v /var/lib/ceph/e8918380-ed7a-11ea-aafd-525400ac1279/iscsi.iscsi.vm-02.mndjjs/iscsi-gateway.cfg:/etc/ceph/iscsi-gateway.cfg:z -v /var/lib/ceph/e8918380-ed7a-11ea-aafd-525400ac1279/iscsi.iscsi.vm-02.mndjjs/configfs:/sys/kernel/config:z -v /var/log/ceph/e8918380-ed7a-11ea-aafd-525400ac1279:/var/log/rbd-target-api:z -v /dev:/dev:z --mount type=bind,source=/lib/modules,destination=/lib/modules,ro=true --entrypoint /usr/bin/tcmu-runner docker.io/amk3798/ceph:latest &
# iscsi.iscsi.vm-02.mndjjs
! /bin/podman rm -f ceph-e8918380-ed7a-11ea-aafd-525400ac1279-iscsi.iscsi.vm-02.mndjjs
! /bin/podman rm -f --storage ceph-e8918380-ed7a-11ea-aafd-525400ac1279-iscsi.iscsi.vm-02.mndjjs
/bin/podman run --rm --net=host --ipc=host -d --conmon-pidfile /run/ceph-e8918380-ed7a-11ea-aafd-525400ac1279@iscsi.iscsi.vm-02.mndjjs.service-pid --cidfile /run/ceph-e8918380-ed7a-11ea-aafd-525400ac1279@iscsi.iscsi.vm-02.mndjjs.service-cid -d --conmon-pidfile /run/ceph-e8918380-ed7a-11ea-aafd-525400ac1279@iscsi.iscsi.vm-02.mndjjs.service-pid --cidfile /run/ceph-e8918380-ed7a-11ea-aafd-525400ac1279@iscsi.iscsi.vm-02.mndjjs.service-cid --privileged --group-add=disk --name ceph-e8918380-ed7a-11ea-aafd-525400ac1279-iscsi.iscsi.vm-02.mndjjs -e CONTAINER_IMAGE=docker.io/amk3798/ceph:latest -e NODE_NAME=vm-02 -v /var/lib/ceph/e8918380-ed7a-11ea-aafd-525400ac1279/iscsi.iscsi.vm-02.mndjjs/config:/etc/ceph/ceph.conf:z -v /var/lib/ceph/e8918380-ed7a-11ea-aafd-525400ac1279/iscsi.iscsi.vm-02.mndjjs/keyring:/etc/ceph/keyring:z -v /var/lib/ceph/e8918380-ed7a-11ea-aafd-525400ac1279/iscsi.iscsi.vm-02.mndjjs/iscsi-gateway.cfg:/etc/ceph/iscsi-gateway.cfg:z -v /var/lib/ceph/e8918380-ed7a-11ea-aafd-525400ac1279/iscsi.iscsi.vm-02.mndjjs/configfs:/sys/kernel/config:z -v /var/log/ceph/e8918380-ed7a-11ea-aafd-525400ac1279:/var/log/rbd-target-api:z -v /dev:/dev:z --mount type=bind,source=/lib/modules,destination=/lib/modules,ro=true --entrypoint /usr/bin/rbd-target-api docker.io/amk3798/ceph:latest

Two containers are trying to use the same conmon pidfile and cidfile which will cause the service to fail to deploy with an error along the lines of "Error: container id file exists. Ensure another container is not using it or delete" in the journalctl logs

Actions #1

Updated by Adam King over 3 years ago

This is specific to hosts using podman. Hosts using docker shouldn't see this.

Actions #2

Updated by Matthew Oliver over 3 years ago

oh interesting, good spot. I deploy using podman and haven't seen that error. But it's true they probably shouldn't be sharing the same pidfile. The iscsi tcmu-container generates the same iscsi container but changes the name.. I guess that didn't propergate. We need to make sure changes the pibfile and cidfile options.

I could whip up a patch quite quickly if you want. But you may already have it covered, so let me know.

Matt

Actions #3

Updated by Michael Fritch over 3 years ago

  • Pull request ID set to 47291
Actions #4

Updated by Adam King over 3 years ago

  • Status changed from In Progress to Fix Under Review
Actions #5

Updated by Adam King over 3 years ago

  • Pull request ID changed from 47291 to 36980
Actions #6

Updated by Adam King over 3 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF