6.3. Managing Districts

Districts facilitate gear movement between node hosts in order to manage resource usage. See Section 6.2, “Capacity Planning and Districts” for more information on the concepts behind districts.

6.3.1. Enabling Districts

MCollective is responsible for communication between the broker and node hosts. This communication can fail unless the MCollective plug-in on the broker host is configured to enable districts.
The following parameters in the /etc/openshift/plugins.d/openshift-origin-msg-broker-mcollective.conf file on the broker host enable and enforce district use, all of which are set to true by default:
DISTRICTS_ENABLED=true
NODE_PROFILE_ENABLED=true
DISTRICTS_REQUIRE_FOR_APP_CREATE=true

Note

Though not supported for production deployments, you can disable districts by setting the above parameters to false and restarting the openshift-broker service.
The default value of true for the DISTRICTS_REQUIRE_FOR_APP_CREATE parameter prevents gear placement if no district exists with capacity for the chosen gear profile, therefore preventing the use of node hosts that are outside of districts. Setting the value to false and restarting the openshift-broker service enables immediate use of node hosts without having to understand or implement districts. While this immediate usage may be helpful in an evaluation setting, it is neither desirable nor recommended in a production setting where districts are used to place gears on a node host before being placed in a district. This is because nodes cannot be placed in a district after they are hosting gears.