Adding more than one server groups in scheduler_hints

asked 2016-11-18 07:41:01 -0600

Pranshu gravatar image

Hi, Could someone please help me to understand if we can add two server groups in scheduler_hints for a resource in heat template.

Is it valid to add it as below?

scheduler_hints: group:group1,group2

Below is my scenario,

I have 4 VMs, suppose A,B,C,D.

A & C should be on same host(affinity).

B & D should be on same host(affinity).

A & B should not be on same host(anti-affinity).

C & D should not be on same host(anti-affinity).

I was thinking to create total 3 server groups.

gr1 - affinity - A & C.

gr2 - affinity - B & D.

gr3 - anti-affinity - A & B ( this will assure that C & D will also not be on same host).

So , VM A & B will belong to 2 server groups.

I want to know if it is possible to add two server groups in scheduler_hints in the heat template.

Please also let me know, if there is any better way to do this.

Note: I only want to impact heat template to achieve this behaviour.

BR, Pranshu

edit retag flag offensive close merge delete

Comments

Sorry. Tried to add two server groups in scheduler_hints in heat template and launch a stack. But it did not work. Used this in my hot template: scheduler_hints: group: {get_resource: AFFINITY, get_resource: AVAILABILITY}

Please any one help !!!

Sharmistha gravatar imageSharmistha ( 2016-11-21 07:51:02 -0600 )edit

Hi Sharmistha,

Thanks a lot for confirming .

BR, Pranshu

Pranshu gravatar imagePranshu ( 2016-11-22 04:07:51 -0600 )edit

Sorry Pranshu !!!

Sharmistha gravatar imageSharmistha ( 2016-12-07 07:03:53 -0600 )edit

Hi Sharmistha,

Thanks for testing.

BR, Pranshu

Pranshu gravatar imagePranshu ( 2016-12-15 06:18:12 -0600 )edit