CCI-MOC / process_csv_report

Some scripts to help process our billing reports
0 stars 3 forks source link

Update Invoicing to allow for power outage (or similar breaks during the month) #53

Open joachimweyl opened 4 months ago

joachimweyl commented 4 months ago

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

Completion dates

Desired - 2024-05-29 Required - TBD

naved001 commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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 commented 3 months ago

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

msdisme commented 1 month ago

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