BD2KGenomics / dcc-ops

The UCSC Genomics Institute's Computational Genomics Platform (CGP). This repo contains the Docker compose-based deployment process.
https://ucsc-cgp.org
Apache License 2.0
2 stars 4 forks source link

Research Invoice dcc-ops error #121

Closed achave11-ucsc closed 6 years ago

caaespin commented 6 years ago

Found some promising stack trace:

Scrolling...
Scroll Size: 0
Scrolling...
Scroll Size: 0
Traceback (most recent call last):
  File "generate_billings.py", line 554, in <module>
    main()
  File "generate_billings.py", line 549, in main
    generate_daily_reports("")
  File "generate_billings.py", line 519, in generate_daily_reports
    compute_costs = get_compute_costs(compute_cost_search)
  File "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 41, in calculate_compute_cost
    ProductDescriptions=[str(instance_description)])
  File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 310, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 599, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (UnauthorizedOperation) when calling the DescribeSpotPriceHistory operation: You are not authorized to perform this operation.
Removing existing validated.jsonl.gz and fb_index.jsonl.gz
caaespin commented 6 years ago

It seems that we need to ask Eric to expand the role of redwood to allow it to read spot pricing history.

caaespin commented 6 years ago

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'
caaespin commented 6 years ago

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

achave11-ucsc commented 6 years ago

Sys. Admin needs to authorize the box/instance to access spot-price data! Note for automatization and portability.