Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[Contrail] How to restart contrail services in 5.x and later versions

0

0

Article ID: KB36163 KB Last Updated: 22 Apr 2021Version: 1.0
Summary:

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.

Solution:

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.

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.

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
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search