From 5d61012f86a2e036908a2f7441672e43cbd34790 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Tue, 8 Dec 2015 10:28:08 +0000 Subject: Enable per-role SchedulerHints 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 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 --- puppet/ceph-storage.yaml | 6 +++++- puppet/cinder-storage.yaml | 5 +++++ puppet/compute.yaml | 6 +++++- puppet/controller.yaml | 5 +++++ puppet/swift-storage.yaml | 6 +++++- 5 files changed, 25 insertions(+), 3 deletions(-) (limited to 'puppet') diff --git a/puppet/ceph-storage.yaml b/puppet/ceph-storage.yaml index b34d2c02..adbf4bc5 100644 --- a/puppet/ceph-storage.yaml +++ b/puppet/ceph-storage.yaml @@ -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: diff --git a/puppet/cinder-storage.yaml b/puppet/cinder-storage.yaml index 82c0e814..1c05b387 100644 --- a/puppet/cinder-storage.yaml +++ b/puppet/cinder-storage.yaml @@ -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: diff --git a/puppet/compute.yaml b/puppet/compute.yaml index 42c6e276..5e38d1c1 100644 --- a/puppet/compute.yaml +++ b/puppet/compute.yaml @@ -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: diff --git a/puppet/controller.yaml b/puppet/controller.yaml index 97b5456b..fc257069 100644 --- a/puppet/controller.yaml +++ b/puppet/controller.yaml @@ -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: diff --git a/puppet/swift-storage.yaml b/puppet/swift-storage.yaml index a8183f76..840cf540 100644 --- a/puppet/swift-storage.yaml +++ b/puppet/swift-storage.yaml @@ -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: -- cgit 1.2.3-korg