-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add opt-in support for per bosh deployment DRS rules #378
Comments
See related cloudfoundry#378 Extracted from https://www.pivotaltracker.com/n/projects/1133984/stories/133642741 > We can create a DRS rule based on env.bosh.group (skip if this field is not provided).
See related cloudfoundry#378 Extracted from https://www.pivotaltracker.com/n/projects/1133984/stories/133642741 > We can create a DRS rule based on env.bosh.group (skip if this field is not provided).
See related #378 Extracted from https://www.pivotaltracker.com/n/projects/1133984/stories/133642741 > We can create a DRS rule based on env.bosh.group (skip if this field is not provided).
@selzoc would you accept a PR implementing this proposal ? |
Well, it's not up to me! But I see this issue is in the |
@cunnie would you by chance have historical background to review and comment this updated proposal, in particular the |
Feature Request
Detailed Description
Given dynamically created bosh deployments (e.g. mysql-cluster-1, mysql-cluster-2, ... mysql-cluster-N) with an instance group "mysql" with 3 instances,
In order for DRS to avoid scheduling mysql instances of a given deployment on the same vsphere esx
I need that vsphere bosh cpi supports a DRS rule per deployment
Currently, either
https://github.com/cloudfoundry/docs-bosh/blob/96fdb6fff79d7eed1f78b6fb05ce064de2acfea0/content/vsphere-cpi.md?plain=1#L15-L17
bosh-vsphere-cpi-release/jobs/vsphere_cpi/spec
Lines 26 to 28 in da8f3fc
bosh-vsphere-cpi-release/src/vsphere_cpi/lib/cloud/vsphere/vm_creator.rb
Lines 364 to 376 in bf35f00
bosh-vsphere-cpi-release/src/vsphere_cpi/lib/cloud/vsphere/vm_config.rb
Lines 145 to 151 in bf35f00
Given that
env.bosh.group
is systematically defined by bosh director in https://github.com/cloudfoundry/bosh/blob/dec31de320fcd29a574db8685f6abf697138f788/src/bosh-director/lib/bosh/director/deployment_plan/steps/create_vm_step.rb#L135 This results into DRS rules being created for each instance group of each deployment. The DRS rules are named from template:<bosh-director-name>-<bosh-deployment-name>-<instance-group-name>
This results into a large number of auto-created DRS rules for bosh directors with a existing large number of deployments
While theoretically there is no limit to number of DRS rules, it seems not recommended to enable this property on a bosh director with a large number of deployments (unless every single instance group in all deployments require an anti-affinity DRS rule )
https://communities.vmware.com/t5/VMware-vCenter-Discussions/Maximum-Number-of-DRS-Rules-per-Cluster/td-p/2744546
Context
In order to benefit from vsphere HA support from distinct esx instances, I need DRS anti affinity on relevant instance groups of selected deployments. This is important for many dynamic bosh deployments which can not leverage static DRS rules declared in the cloud-config.
Alternative Implementations
VM Types / VM Extensions support for enable_auto_anti_affinity_drs_rules
In addition to supporting the
enable_auto_anti_affinity_drs_rules=true
at the global level, this property would also be supported in avm_types
orvm_extensions
block, overriding the global value.Inspiration from similar property
upgrade_hw_version
bosh-vsphere-cpi-release/src/vsphere_cpi/lib/cloud/vsphere/vm_creator.rb
Lines 240 to 242 in bf35f00
bosh-vsphere-cpi-release/src/vsphere_cpi/lib/cloud/vsphere/vm_config.rb
Lines 13 to 15 in bf35f00
https://github.com/orange-cloudfoundry/bosh-vsphere-cpi-release/blob/87b8474f18046e6920d4c44478138f084cb3cdf3/src/vsphere_cpi/spec/unit/cloud/vsphere/vm_config_spec.rb#L24-L50
New cpi propertyEDIT: likely too complex proposal
Add new cpi flag
vcenter.restrict_auto_anti_affinity_drs_rules_to_marked_instance_groups
which adds new opt-in behavior without introducing breaking changes to existing behaviorComplexity
The text was updated successfully, but these errors were encountered: