Why the gears not created in a correct node profile of a district?
Environment
- Openshift Enterprise
- 2.1
Issue
- When an application is created by mentioning the gear size using -g option the gears don't get created in correct node profile of a district
1. Create a districts and add 2 nodes each with a profile name.
2. Create another district and add 2 nodes with different profile name.
3. Create an application with -g flag
4. nslookup the application to see which host the application went to.
- Why the application not created in the correct node profile having the gear size as mentioned with -g flag as below:
rhc app create <APP-NAME> <Web-Cartidge-Name> -g <Gear-Size>
Resolution
- Set the following values to TRUE in
/etc/openshift/plugins.d/openshift-origin-msg-broker-mcollective.conf
DISTRICTS_ENABLED=true
NODE_PROFILE_ENABLED=true or NODE_PROFILE_ENABLED=1
Root Cause
-
DISTRICTS_ENABLED=truemeans use districts when placing gears and moving them between hosts. -
NODE_PROFILE_ENABLED=trueplaces gears on nodes with the requested profile. A false value means gear profiles are ignored and gears are placed arbitrarily.
Diagnostic Steps
- Run the following commands-
a. Create an application with -g option
$ rhc app create test perl -g <node_profile>
b. From the following command's output you can check the node on which the gear gets created.
$ nslookup test-testapps.example.com
- To check nodes attached to a district fire the following command on broker
oo-admin-ctl-district
- Check whether the values of DISTRICTS_ENABLED and NODE_PROFILE_ENABLED in /etc/openshift/plugins.d/openshift-origin-msg-broker-mcollective.conf are true
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
