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 Invoicing to allow for power outage (or similar breaks during the month) #53

Open
2 tasks done
joachimweyl opened this issue May 20, 2024 · 11 comments
Open
2 tasks done
Assignees

Comments

@joachimweyl
Copy link
Contributor

joachimweyl commented May 20, 2024

Motivation

We need to figure out a way to not bill during time when NERC OpenShift & OpenStack are not live. For example during a power outage.

Completion Criteria

invoicing can be given days (hour?) that we are not live.

Description

  • Design rules for when and how this script might work
    • How much harder is it to do it by hours instead of days?
    • Receive input from @knikolla & @naved001 on the ideas you come up with for OpenStack and OpenShift respectively.
  • Create a PR once you have a full understanding of how you wish to approach this

Completion dates

Desired - 2024-05-29
Required - 2025-02-05

@naved001
Copy link
Collaborator

We need to figure out a way to not bill during time when NERC OpenShift & OpenStack are not live

This would happen in the code where those reports are generated and not in process_csv_report.

How much harder is it to do it by hours instead of days?

It's easy to ignore full days in openshift as of now, we just don't feed the scripts metrics for those days. Doing it by hours would require code changes.

Another thing to keep in mind, that while the openshift cluster is down so is prometheus and no data is collected during that time, so I think those hours will not be billed because prometheus wouldn't return any data for that time.

@joachimweyl
Copy link
Contributor Author

Another thing to keep in mind, that while the openshift cluster is down so is prometheus and no data is collected during that time, so I think those hours will not be billed because prometheus wouldn't return any data for that time.

This sounds like something we should test, because if it is the case that would make things much easier on the OpenShift side. Do we have an easy way to test this?

@knikolla
Copy link
Contributor

Another thing to keep in mind, that while the openshift cluster is down so is prometheus and no data is collected during that time, so I think those hours will not be billed because prometheus wouldn't return any data for that time.

This sounds like something we should test, because if it is the case that would make things much easier on the OpenShift side. Do we have an easy way to test this?

This is a policy question.

The hours that Prometheus is unavailable to collect and report metrics is likely going to be smaller than the hours/days of announced outage (Prometheus and OpenShift may be stopped early/late and started early/late).

Therefore, should we be billing users for hours that they didn't have a expectation whether the hardware would still be up or not but that Prometheus is reporting as up?

@naved001
Copy link
Collaborator

Do we have an easy way to test this?

I will test this when the clusters come back up and see what hours are missed/skipped in the prometheus data. But I agree with @knikolla's comment and that we need to be sure for what time we want to bill.

@naved001 naved001 self-assigned this May 29, 2024
@naved001
Copy link
Collaborator

I will test this when the clusters come back up and see what hours are missed/skipped in the prometheus data.

Prometheus has no data for the time the cluster was turned off.

@QuanMPhm
Copy link
Contributor

I'll unassign this from myself, since I'm guessing this is outside of process_csv_report

@QuanMPhm QuanMPhm removed their assignment Jun 11, 2024
@msdisme
Copy link

msdisme commented Aug 30, 2024

We will schedule this work either before the next planned outage unless dev has reasons to do it sooner.

@naved001
Copy link
Collaborator

@joachimweyl This feature was added to the openshift usage scripts via this PR CCI-MOC/openshift-usage-scripts#82 It now accepts command line arguments to ignore hours to not bill for.

@knikolla do we have this feature in openstack and the storage invoicing tools?

@knikolla
Copy link
Contributor

@joachimweyl
Copy link
Contributor Author

@knikolla would changing OpenStack so it checks by hour be a good way for @hakasapl to get deeper into invoice development?

@knikolla
Copy link
Contributor

@joachimweyl absolutely!

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

No branches or pull requests

5 participants