Enable per-role SchedulerHints
authorSteven Hardy <shardy@redhat.com>
Tue, 8 Dec 2015 10:28:08 +0000 (10:28 +0000)
committerSteven Hardy <shardy@redhat.com>
Tue, 8 Dec 2015 10:28:08 +0000 (10:28 +0000)
This adds a parameter for each role, where optional scheduler hints
may be passed to nova.  One potential use-case for this is using
the ComputeCapabilities to pin deployment to a specific node (not
just a specific role/profile mapping to a pool of nodes like we
have currently documented in the ahc-match docs).

This could work as follows:

1. Tag a specific node as "node:controller-0" in Ironic:

ironic node-update <id> replace properties/capabilities='node:controller-0,boot_option:local'

2. Create a heat environment file which uses %index%

parameters:
  ControllerSchedulerHints:
    'capabilities:node': 'controller-%index%'

Change-Id: I79251dde719b4bb5c3b0cce90d0c9d1581ae66f2

overcloud.yaml
puppet/ceph-storage.yaml
puppet/cinder-storage.yaml
puppet/compute.yaml
puppet/controller.yaml
puppet/swift-storage.yaml

index faec16d..aa150a5 100644 (file)
@@ -368,6 +368,10 @@ parameters:
     default: true
     description: Whether to enable Swift Storage on the Controller
     type: boolean
+  ControllerSchedulerHints:
+    type: json
+    description: Optional scheduler hints to pass to nova
+    default: {}
   ExtraConfig:
     default: {}
     description: |
@@ -585,6 +589,10 @@ parameters:
     default: ''
     description: Libvirt VIF driver configuration for the network
     type: string
+  NovaComputeSchedulerHints:
+    type: json
+    description: Optional scheduler hints to pass to nova
+    default: {}
   NovaEnableRbdBackend:
     default: false
     description: Whether to enable or not the Rbd backend for Nova
@@ -659,6 +667,11 @@ parameters:
       BlockStorage specific configuration to inject into the cluster. Same
       structure as ExtraConfig.
     type: json
+  BlockStorageSchedulerHints:
+    type: json
+    description: Optional scheduler hints to pass to nova
+    default: {}
+
 
 # Object storage specific parameters
   ObjectStorageCount:
@@ -678,7 +691,10 @@ parameters:
       ObjectStorage specific configuration to inject into the cluster. Same
       structure as ExtraConfig.
     type: json
-
+  ObjectStorageSchedulerHints:
+    type: json
+    description: Optional scheduler hints to pass to nova
+    default: {}
 
 # Ceph storage specific parameters
   CephStorageCount:
@@ -699,6 +715,11 @@ parameters:
       CephStorage specific configuration to inject into the cluster. Same
       structure as ExtraConfig.
     type: json
+  CephStorageSchedulerHints:
+    type: json
+    description: Optional scheduler hints to pass to nova
+    default: {}
+
 
   # Hostname format for each role
   # Note %index% is translated into the index of the node, e.g 0/1/2 etc
@@ -936,6 +957,7 @@ resources:
                 '%stackname%': {get_param: 'OS::stack_name'}
           NodeIndex: '%index%'
           ServerMetadata: {get_param: ServerMetadata}
+          SchedulerHints: {get_param: ControllerSchedulerHints}
 
   Compute:
     type: OS::Heat::ResourceGroup
@@ -1011,6 +1033,7 @@ resources:
                 '%stackname%': {get_param: 'OS::stack_name'}
           CloudDomain: {get_param: CloudDomain}
           ServerMetadata: {get_param: ServerMetadata}
+          SchedulerHints: {get_param: NovaComputeSchedulerHints}
 
   BlockStorage:
     type: OS::Heat::ResourceGroup
@@ -1050,6 +1073,7 @@ resources:
           BlockStorageExtraConfig: {get_param: BlockStorageExtraConfig}
           CloudDomain: {get_param: CloudDomain}
           ServerMetadata: {get_param: ServerMetadata}
+          SchedulerHints: {get_param: BlockStorageSchedulerHints}
 
   ObjectStorage:
     type: OS::Heat::ResourceGroup
@@ -1080,6 +1104,7 @@ resources:
           ObjectStorageExtraConfig: {get_param: ObjectStorageExtraConfig}
           CloudDomain: {get_param: CloudDomain}
           ServerMetadata: {get_param: ServerMetadata}
+          SchedulerHints: {get_param: ObjectStorageSchedulerHints}
 
   CephStorage:
     type: OS::Heat::ResourceGroup
@@ -1105,6 +1130,7 @@ resources:
           CephStorageExtraConfig: {get_param: CephStorageExtraConfig}
           CloudDomain: {get_param: CloudDomain}
           ServerMetadata: {get_param: ServerMetadata}
+          SchedulerHints: {get_param: CephStorageSchedulerHints}
 
   ControllerIpListMap:
     type: OS::TripleO::Network::Ports::NetIpListMap
index b34d2c0..adbf4bc 100644 (file)
@@ -71,7 +71,10 @@ parameters:
       Extra properties or metadata passed to Nova for the created nodes in
       the overcloud. It's accessible via the Nova metadata API.
     type: json
-
+  SchedulerHints:
+    type: json
+    description: Optional scheduler hints to pass to nova
+    default: {}
 
 resources:
   CephStorage:
@@ -87,6 +90,7 @@ resources:
       user_data: {get_resource: UserData}
       name: {get_param: Hostname}
       metadata: {get_param: ServerMetadata}
+      scheduler_hints: {get_param: SchedulerHints}
 
   # Combine the NodeAdminUserData and NodeUserData mime archives
   UserData:
index 82c0e81..1c05b38 100644 (file)
@@ -124,6 +124,10 @@ parameters:
       Extra properties or metadata passed to Nova for the created nodes in
       the overcloud. It's accessible via the Nova metadata API.
     type: json
+  SchedulerHints:
+    type: json
+    description: Optional scheduler hints to pass to nova
+    default: {}
 
 
 resources:
@@ -140,6 +144,7 @@ resources:
       user_data: {get_resource: UserData}
       name: {get_param: Hostname}
       metadata: {get_param: ServerMetadata}
+      scheduler_hints: {get_param: SchedulerHints}
 
   # Combine the NodeAdminUserData and NodeUserData mime archives
   UserData:
index 42c6e27..5e38d1c 100644 (file)
@@ -296,13 +296,16 @@ parameters:
     description: >
       The DNS domain used for the hosts. This should match the dhcp_domain
       configured in the Undercloud neutron. Defaults to localdomain.
-
   ServerMetadata:
     default: {}
     description: >
       Extra properties or metadata passed to Nova for the created nodes in
       the overcloud. It's accessible via the Nova metadata API.
     type: json
+  SchedulerHints:
+    type: json
+    description: Optional scheduler hints to pass to nova
+    default: {}
 
 resources:
 
@@ -321,6 +324,7 @@ resources:
       user_data: {get_resource: UserData}
       name: {get_param: Hostname}
       metadata: {get_param: ServerMetadata}
+      scheduler_hints: {get_param: SchedulerHints}
 
   # Combine the NodeAdminUserData and NodeUserData mime archives
   UserData:
index 97b5456..fc25706 100644 (file)
@@ -644,6 +644,10 @@ parameters:
       Extra properties or metadata passed to Nova for the created nodes in
       the overcloud. It's accessible via the Nova metadata API.
     type: json
+  SchedulerHints:
+    type: json
+    description: Optional scheduler hints to pass to nova
+    default: {}
 
 resources:
 
@@ -660,6 +664,7 @@ resources:
       user_data: {get_resource: UserData}
       name: {get_param: Hostname}
       metadata: {get_param: ServerMetadata}
+      scheduler_hints: {get_param: SchedulerHints}
 
   # Combine the NodeAdminUserData and NodeUserData mime archives
   UserData:
index a8183f7..840cf54 100644 (file)
@@ -94,7 +94,10 @@ parameters:
       Extra properties or metadata passed to Nova for the created nodes in
       the overcloud. It's accessible via the Nova metadata API.
     type: json
-
+  SchedulerHints:
+    type: json
+    description: Optional scheduler hints to pass to nova
+    default: {}
 
 resources:
 
@@ -110,6 +113,7 @@ resources:
       user_data: {get_resource: UserData}
       name: {get_param: Hostname}
       metadata: {get_param: ServerMetadata}
+      scheduler_hints: {get_param: SchedulerHints}
 
   # Combine the NodeAdminUserData and NodeUserData mime archives
   UserData: