Skip to content
  • Dimitri Savineau's avatar
    ceph-osd: use OSD id with systemd ceph-disk · bedc0ab6
    Dimitri Savineau authored
    When using containerized deployment we have to create the systemd
    service unit based on a template.
    The current implementation with ceph-disk is using the device name
    as paramater to the systemd service and for the container name too.
    
    $ systemctl start ceph-osd@sdb
    $ docker ps --filter 'name=ceph-osd-*'
    CONTAINER ID IMAGE                        NAMES
    065530d0a27f ceph/daemon:latest-luminous  ceph-osd-strg0-sdb
    
    This is the only scenario (compared to non containerized or
    ceph-volume based deployment) that isn't using the OSD id.
    
    $ systemctl start ceph-osd@0
    $ docker ps --filter 'name=ceph-osd-*'
    CONTAINER ID IMAGE                        NAMES
    d34552ec157e ceph/daemon:latest-luminous  ceph-osd-0
    
    Also if the device mapping doesn't persist to system reboot (ie sdb
    might be remapped to sde) then the OSD service won't come back after
    the reboot.
    
    This patch allows to use the OSD id with the ceph-osd systemd service
    but requires to activate the OSD manually with ceph-disk first in
    order to affect the ID to that OSD.
    
    Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1670734
    
    
    
    Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
    bedc0ab6