CCI-MOC / openstack-billing-from-db

Simple billing from the database
Apache License 2.0
1 stars 3 forks source link

Update the OpenStack Invoice Script to include VMs that are shut off #18

Closed joachimweyl closed 9 months ago

joachimweyl commented 11 months ago

Motivation

The decision was made to bill on VMs that are shut off as they retain the resources and block others from using them.

Completion Criteria

Invoice Script returned VM time is no longer only for VMs that are on. VM time is calculated for all time a VM exists.

Description

Update the Invoice Script to include time that VMs are shut off in the calculation of hours to bill on.

Notes

Completion dates

Desired - 2023/11/22 Required - 2023/11/29

knikolla commented 11 months ago

@joachimweyl Will the price be the same for both on and off VMs?

joachimweyl commented 11 months ago

@knikolla for now, it will be the same price. If it is easy enough to code it might be worth having it be 2 separate variables in case.

msdisme commented 10 months ago

Notes from discussion with Wayne and Orran: OpenStack Charging change

knikolla commented 10 months ago

Notes from discussion with Wayne and Orran:

OpenStack Charging change

  • Issue around it’s not just turning off VMs, will need to free up allocation to not be charged for A100. May decide to be lenient on CPU, but not GPU.

  • Can we make changes to release it and not turn it on if GPU is not available?

So you're saying to not count shut off time for cpu su, but only for gpu su?

joachimweyl commented 10 months ago

For now, we will count all shut-off time CPU and GPU. There may be a future time when we decide to "be Leinient" and not charge for shut-off time for CPUs.

knikolla commented 10 months ago

@joachimweyl in that case the time estimate seems realistic provided the attached PR receives reviews.

joachimweyl commented 10 months ago

We will not merge the change until 2023/12/01. That being said once we have both approvals needed for the merge we can close this issue.

knikolla commented 10 months ago

@joachimweyl Instead of not merging this until Dec 1, I will extend the code in the PR to include a command line argument to toggle the behavior.

joachimweyl commented 10 months ago

that works, or just set the variable that tracks shut-off VMs to 0. whichever you prefer.

joachimweyl commented 10 months ago

@knikolla please add a note as to what approach you plan to take, add a toggle, or set the value of shut-off VMs to 0 until after we gather our November data on Dec 1st.