This article explains to stop/start contrail services in 5.x and later version which do not have the command equivalent of service <service name> restart .
service <service name> restart
In the Contrail versions 3.x and earlier, services were divided into categories such as Contrail Control, Contrail Analytics, Contrail Config, Contrail Config, etc. All related services could be restarted on a particular node by running the command service supervisor-**** restart . For example, restarting all services related to Contrail Control could be done by the command, service supervisor-control restart . This would trigger a restart for all services in a particular order, which prevents any inconsistencies.
service supervisor-**** restart
service supervisor-control restart
Since 5.x and later versions are based on a micro-services architecture, the service *** restart command cannot be used. Instead, services can be restarted with the same effect using the docker-compose command.
service *** restart
docker-compose
Example:
cd /etc/contrail/ ls -lah [root@CONTROLLER1 contrail]# ls -l total 24 drwxr-xr-x. 2 root root 33 Aug 16 15:19 analytics drwxr-xr-x. 2 root root 33 Aug 16 15:10 analytics_database -rw-r--r--. 1 root root 902 Aug 16 15:46 common_analytics.env -rw-r--r--. 1 root root 902 Aug 16 15:44 common_config.env -rw-r--r--. 1 root root 902 Aug 16 15:45 common_control.env -rw-r--r--. 1 root root 902 Aug 16 14:48 common.env -rw-r--r--. 1 root root 902 Aug 16 15:44 common_webui.env drwxr-xr-x. 2 root root 6 Aug 16 14:48 compose drwxr-xr-x. 2 root root 33 Aug 16 14:54 config drwxr-xr-x. 2 root root 33 Aug 16 14:52 config_database drwxr-xr-x. 2 root root 33 Aug 16 15:09 control -rw-r--r--. 1 root root 1 Aug 16 14:48 defaults.env drwxr-xr-x. 2 root root 33 Aug 16 14:48 redis drwxr-xr-x. 2 1999 1999 6 Aug 16 14:52 ssl drwxr-xr-x. 2 root root 33 Aug 16 15:08 webui cd control [root@CONTROLLER1 control]# ls docker-compose.yaml [root@CONTROLLER1 contrail]# docker-compose -f /etc/contrail/control/docker-compose.yaml down Stopping control_named_1 ... done Stopping control_dns_1 ... done Stopping control_nodemgr_1 ... done Stopping control_control_1 ... done Stopping control_provisioner_1 ... done Removing control_named_1 ... done Removing control_dns_1 ... done Removing control_nodemgr_1 ... done Removing control_control_1 ... done Removing control_provisioner_1 ... done Removing control_node-init_1 ... done [root@CONTROLLER1 contrail]# docker-compose -f /etc/contrail/control/docker-compose.yaml up -d Creating control_node-init_1 ... done Creating control_dns_1 ... done Creating control_control_1 ... done Creating control_nodemgr_1 ... done Creating control_provisioner_1 ... done