Closed achave11-ucsc closed 7 years ago
It seems that we need to ask Eric to expand the role of redwood to allow it to read spot pricing history.
I'm also getting this error (on a testing VM):
Scroll Size: 0
Traceback (most recent call last):
File "testbills.py", line 6, in <module>
generate_billings.generate_daily_reports("2017/09/30")
File "/app/dcc-metadata-indexer/generate_billings.py", line 519, in generate_daily_reports
compute_costs = get_compute_costs(compute_cost_search)
File "/app/dcc-metadata-indexer/generate_billings.py", line 365, in get_compute_costs
compute_costs += calculta_spot_instance_cost(str(start_time), str(stop_time), str(vm_type), str(vm_region))
File "/app/dcc-metadata-indexer/compute_function.py", line 56, in calculate_compute_cost
if ((startDatetime <= spot_price['Timestamp']) and (startDatetime >= last_time_checked['Timestamp'])):
KeyError: 'Timestamp'
Other error seems to be that the timestamp formatting is hard because of inconsistencies returned by the metadata. Seems to be some edge case that needs to be accounted for (e.g. "%Y-%m-%dT%H:%M:%S.%fZ"
or "%Y-%m-%d %H:%M:%S.%f"
format
Sys. Admin needs to authorize the box/instance to access spot-price data! Note for automatization and portability.
Found some promising stack trace: