In the MCP Build ID 2019.2.0, by default, one worker of the contrail-api
service is used. Starting from the MCP 2019.2.3 maintenance update, six workers
are used by default.
If needed, you can change the default configuration using the instruction below. This section also describes how to stop, start, or restart multiple workers.
To set multiple contrail-api workers for the MCP version 2019.2.3 or later:
Open your Git project repository with the Reclass model on the cluster level.
In cluster/<cluster name>/opencontrail/control.yml
, set the required
amount of workers:
parameters:
_param:
opencontrail_api_workers_count: <required_amount_of_workers>
Log in to the Salt Master node.
Refresh pillars:
salt '*' saltutil.refresh_pillar
salt-call state.sls reclass.storage
Apply the Reclass model changes:
salt -C 'I@opencontrail:control' state.apply opencontrail
To set multiple contrail-api workers for the Build ID 2019.2.0:
Caution
Using the configuration below, you can start setting network entities in a newly created OpenStack project only one minute after this project is created.
Open your Git project repository with the Reclass model on the cluster level.
In cluster/<cluster name>/opencontrail/control.yml
, set the required
amount of workers:
parameters:
_param:
opencontrail_api_workers_count: <required_amount_of_workers>
Log in to the Salt Master node.
Refresh pillars:
salt '*' saltutil.refresh_pillar
salt-call state.sls reclass.storage
Apply the Reclass model changes:
salt -C 'I@opencontrail:control' state.apply opencontrail
Log in to any ntw
node.
In /etc/contrail/contrail-api.conf
, change the following parameter:
[KEYSTONE]
keystone_sync_on_demand=true
to
[KEYSTONE]
keystone_sync_on_demand=false
Restart the OpenContrail controller Docker container:
cd /etc/docker/compose/opencontrail/; docker-compose down; docker-compose up -d
Wait until all OpenContrail controller services are up and running. To verify the OpenContrail services status, refer to Verify the OpenContrail status.
Repeat the steps 7-9 on the remaining ntw
nodes.
To stop, start, or restart multiple workers:
Caution
We recommend that you do not stop, start, or restart the
contrail-api
workers by executing the service
command as it may cause an unstable workers behavior such as an
incorrect number of running workers and race conditions.
To stop all contrail-api
workers on the target node:
systemctl stop contrail-api@*
To start all contrail-api
workers on the target node:
systemctl start contrail-api@*
To restart all contrail-api
workers on the target node:
systemctl restart contrail-api@*
Note
You may stop, start, or restart a certain worker by using the worker
ID instead of the *
character.