Skip to content

MRPHS-4262: Update CreateVMs call to use round-robin strategy for placements of vm on available hosts in cluster#79

Open
avnish30jn wants to merge 1 commit intoapporbit:masterfrom
avnish30jn:round_robin
Open

MRPHS-4262: Update CreateVMs call to use round-robin strategy for placements of vm on available hosts in cluster#79
avnish30jn wants to merge 1 commit intoapporbit:masterfrom
avnish30jn:round_robin

Conversation

@avnish30jn
Copy link

@avnish30jn avnish30jn commented Jan 4, 2018

Jira-id

MRPHS-4262

Problem

Create vms in halo should use round-robin strategy to place the vms on hosts for which we need a list of hosts filtered on the basis of the networks to be assigned to the vm.

Resolution

Implemented a method to return the list of filtered hosts based on the networks to be assigned to the vm.

Testing

In progress

Copy link

@nirav1007 nirav1007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments inline.

err = vm.collector.Retrieve(vm.ctx, filteredHosts, []string{
"name"}, &hsMos)
if err != nil {
return err

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty hosts list should also be returned.

}

// GetFilteredHosts: Lists the hosts compatible with the network and datastores
func GetFilteredHosts(vm *VM) ([]string, error) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is understood that we are using filterHosts method at core and thus named it GetFilteredHosts, but will renaming it to compatibleHosts & GetCompatibleHosts make more sense?

@avnish30jn avnish30jn changed the base branch from c3vmware to master February 9, 2018 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants