# Copyright Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. [Unit] Description=HotsTac(k)os Cinder Volume Service Documentation=https://github.com/openstack-k8s-operators/hotstack After=hotstack-os-cinder-api.service hotstack-os-cinder-scheduler.service hotstack-os-infra-setup.service Wants=hotstack-os-cinder-api.service hotstack-os-cinder-scheduler.service Requires=hotstack-os-infra-setup.service PartOf=hotstack-os.target [Service] Type=simple Restart=on-failure RestartSec=10 TimeoutStopSec=30 SuccessExitStatus=143 ExecStartPre=-/usr/bin/podman rm -f hotstack-os-cinder-volume ExecStart=/usr/bin/podman run \ --pull=never \ --name hotstack-os-cinder-volume \ --hostname cinder-volume \ --privileged \ --network host \ --user root \ --add-host hotstack-os-mariadb:172.31.0.3 \ --add-host hotstack-os-rabbitmq:172.31.0.4 \ --add-host hotstack-os-memcached:172.31.0.5 \ --env CINDER_DB_PASSWORD=openstack \ --env SERVICE_PASSWORD=openstack \ --env RABBITMQ_USER=openstack \ --env RABBITMQ_PASS=openstack \ --env REGION_NAME=RegionOne \ --volume /var/lib/hotstack-os/runtime/config/cinder/cinder.conf:/etc/cinder/cinder.conf:ro,z \ --volume /var/lib/hotstack-os/runtime/config/cinder/nfs_shares:/etc/cinder/nfs_shares:ro,z \ --volume /var/lib/hotstack-os/runtime/config/mount-wrapper.conf:/etc/hotstack/mount-wrapper.conf:ro,z \ --volume /var/lib/hotstack-os/cinder:/var/lib/cinder:z \ --volume /var/lib/hotstack-os/cinder-nfs:/var/lib/hotstack-os/cinder-nfs:z \ --entrypoint /usr/local/bin/cinder-volume-entrypoint.sh \ localhost/hotstack-os-cinder:latest # Health check: CONTAINER INTERVAL TIMEOUT RETRIES START_PERIOD COMMAND ExecStartPost=-/usr/local/bin/hotstack-healthcheck.sh hotstack-os-cinder-volume 10 5 5 20 sh -c "cinder-volume --version 2>/dev/null || test -f /proc/1/exe" ExecStop=/usr/bin/podman stop -t 30 hotstack-os-cinder-volume ExecStopPost=-/usr/bin/podman rm -f hotstack-os-cinder-volume StandardOutput=journal StandardError=journal [Install] WantedBy=hotstack-os.target