# 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 OVN Controller Service Documentation=https://github.com/openstack-k8s-operators/hotstack After=hotstack-os-ovn-northd.service hotstack-os-infra-setup.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-ovn-controller ExecStart=/usr/bin/podman run \ --pull=never \ --name hotstack-os-ovn-controller \ --hostname ovn-controller \ --privileged \ --network host \ --user root \ --security-opt label=disable \ --env OVN_ENCAP_IP=172.31.0.129 \ --env CHASSIS_HOSTNAME=np0005643487.novalocal \ --volume /run/openvswitch:/run/openvswitch \ --volume /var/lib/hotstack-os/ovn-run:/run/ovn:z \ --entrypoint /usr/local/bin/ovn-controller-entrypoint.sh \ localhost/hotstack-os-ovn:latest # Health check: CONTAINER INTERVAL TIMEOUT RETRIES START_PERIOD COMMAND ExecStartPost=-/usr/local/bin/hotstack-healthcheck.sh hotstack-os-ovn-controller 10 5 5 20 sh -c "test -f /run/ovn/ovn-controller.pid && kill -0 $(cat /run/ovn/ovn-controller.pid)" ExecStop=/usr/bin/podman stop -t 30 hotstack-os-ovn-controller ExecStopPost=-/usr/bin/podman rm -f hotstack-os-ovn-controller StandardOutput=journal StandardError=journal [Install] WantedBy=hotstack-os.target