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

Update policies #57

Merged
merged 71 commits into from
Oct 2, 2024
Merged

Update policies #57

merged 71 commits into from
Oct 2, 2024

Conversation

PizieDust
Copy link
Collaborator

@PizieDust PizieDust commented Sep 30, 2024

This PR adds some new functionality to update policies.

@PizieDust PizieDust requested a review from hannesm September 30, 2024 11:44
@PizieDust PizieDust self-assigned this Sep 30, 2024
@PizieDust PizieDust added the enhancement New feature or request label Sep 30, 2024
@PizieDust PizieDust marked this pull request as ready for review October 1, 2024 09:38
albatross.ml Outdated Show resolved Hide resolved
albatross.ml Outdated Show resolved Hide resolved
albatross.ml Outdated Show resolved Hide resolved
albatross.ml Outdated Show resolved Hide resolved
albatross.ml Outdated Show resolved Hide resolved
albatross.ml Outdated Show resolved Hide resolved
albatross.ml Outdated Show resolved Hide resolved
albatross.ml Outdated Show resolved Hide resolved
albatross.ml Show resolved Hide resolved
@PizieDust
Copy link
Collaborator Author

@hannesm when trying to add a policy I get this error:

Error while querying Albatross: eof from albatross 193.30.40.133:1025 querying [vm: pixie:.] policy add policy: 1 vms 4,12 cpus 50 MB memory 100 MB block, bridges: as250

albatross.ml Outdated Show resolved Hide resolved
@PizieDust PizieDust requested a review from hannesm October 2, 2024 10:56
update_policy.ml Outdated Show resolved Hide resolved
update_policy.ml Outdated Show resolved Hide resolved
@hannesm
Copy link
Contributor

hannesm commented Oct 2, 2024

hmm, no, I don't understand why you now return the unallocated_resources and root_policy -- and fail to understand what the update_policy page should display.

update_policy.ml Outdated Show resolved Hide resolved
update_policy.ml Outdated Show resolved Hide resolved
@PizieDust
Copy link
Collaborator Author

hmm, no, I don't understand why you now return the unallocated_resources and root_policy -- and fail to understand what the update_policy page should display.

My understanding is that:

  • root_policy returns all the resources (unallocated + allocated).
  • unallocated_resources: this is everything that isn't assigned to any policy
  • user_policy: this is the policy of any specific user

So let's say we have two users robur and pixie.

  • root_policy has 10 vms.
  • robur has 5 vms
  • pixie has 3 vms
    If robur wants to update the policy of pixie, what will be on the UI is
  • unallocated_resources : 2 vms.
  • total_available : 7 vms

I'm not sure if this approach was what you had in mind?

@hannesm
Copy link
Contributor

hannesm commented Oct 2, 2024

So let's say we have two users robur and pixie.

* `root_policy` has 10 vms.

* robur has 5 vms

* pixie has 3 vms
  If robur wants to update the policy of pixie, what will be on the UI is

* `unallocated_resources` : 2 vms.

* `total_available` : 7 vms

I'm not sure if this approach was what you had in mind?

For me, the interesting numbers would be "I can specify to allocate up to 7" and "I currently have 5".

@PizieDust
Copy link
Collaborator Author

So let's say we have two users robur and pixie.

* `root_policy` has 10 vms.

* robur has 5 vms

* pixie has 3 vms
  If robur wants to update the policy of pixie, what will be on the UI is

* `unallocated_resources` : 2 vms.

* `total_available` : 7 vms

I'm not sure if this approach was what you had in mind?

For me, the interesting numbers would be "I can specify to allocate up to 7" and "I currently have 5".

great, thank you. I think I understand what you meant earlier.

PizieDust and others added 3 commits October 2, 2024 13:57
@hannesm
Copy link
Contributor

hannesm commented Oct 2, 2024

@PizieDust cool, great. I guess the root_policy can be removed from the update_policy module...

@PizieDust PizieDust requested a review from hannesm October 2, 2024 12:36
@hannesm hannesm merged commit c2ee3dc into main Oct 2, 2024
1 of 2 checks passed
@hannesm hannesm deleted the policy_ branch October 2, 2024 13:08
@hannesm hannesm mentioned this pull request Oct 2, 2024
2 tasks
@hannesm
Copy link
Contributor

hannesm commented Oct 2, 2024

Thanks a lot for your amazing work on this, @PizieDust. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants