Skip to content
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

Added allocations to dispatchers #288

Merged
merged 7 commits into from
May 28, 2021
Merged

Added allocations to dispatchers #288

merged 7 commits into from
May 28, 2021

Conversation

jshaofuturewei
Copy link
Collaborator

@jshaofuturewei jshaofuturewei commented May 17, 2021

Added allocations to dispatchers

Run "hack/globalscheduler/globalscheduler-up.sh"
Run "cluster/kubectl.sh apply -f globalscheduler/test/yaml/sample_2_schedulers.yaml"
Run "cluster/kubectl.sh apply -f globalscheduler/test/yaml/sample_4_clusters.yaml"
Run "cluster/kubectl.sh apply -f globalscheduler/test/yaml/sample_2_distributors.yaml"
Run "cluster/kubectl.sh apply -f globalscheduler/test/yaml/sample_2_dispatchers.yaml"
Run "cluster/kubectl.sh apply -f globalscheduler/test/yaml/sample_2_allocations.yaml"
Run "cluster/kubectl.sh get allocations" and found the 2 allocations status phases have changed to "Scheduled"
Go to "http://18.236.217.191/dashboard/project/instances/" and found 5 instances have been created.
Run "cluster/kubectl.sh delete -f globalscheduler/test/yaml/sample_2_allocations.yaml"
Run "cluster/kubectl.sh get allocations" and found the 2 allocations have been deleted.
Go to "http://18.236.217.191/dashboard/project/instances/" and found 5 instances have been deleted.

NicName string `json:"nic_name"`
ClusterNames []string `json:"cluster_names"`
ClusterNamespaces []string `json:"cluster_namespaces"`
Image string `json:"image"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Image, SecurityGroupId, NicName and ClusterInstances are not resource.
Resource is defined as cpu, memeory, storage, and eip. Other modules implemented by the definition. This definition change may affect other modules including scheduling framework and scheduler, etc..

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In allocation spec, resources are defined as pod to create openstack vm. Therefore I add Image, security group id, nic name at the resource/pod level. Image is a kind of resource. Security Group, Nic Name are for clusters, also, ClusterInstances are for cluster as well. There are three level of allocation objects. Allocation, resource group, and resources. It looks like we can only put those attributes in resources which can map to clusters.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Originally, allocation resource includes only "cpu, memeory, storage, and eip" which is defined site resource. If data structure is different, it will be better to use different name to avoid confusion. This new data structure breaks consistency. Image, security group id, nic name are site info instead of site resource.

Copy link
Collaborator Author

@jshaofuturewei jshaofuturewei May 17, 2021

Choose a reason for hiding this comment

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

It might be true for all the resources. However, the vm resource are for openstack clusters. Therefore, we need image, security group id, nic names, and instance information at resource level. I have created a VirtualMachine struct under resource level for openstack resources. Please let me know if you have any other concerns.

Copy link
Collaborator

@kimeunju108 kimeunju108 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@pdgetrf pdgetrf left a comment

Choose a reason for hiding this comment

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

LGTM

some minor comments

@jshaofuturewei jshaofuturewei merged commit 64b7175 into CentaurusInfra:master May 28, 2021
@jshaofuturewei jshaofuturewei linked an issue May 28, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement batch POD request
3 participants