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

Correct credentials not being used. #182

Open
nuwang opened this issue Nov 29, 2019 · 0 comments
Open

Correct credentials not being used. #182

nuwang opened this issue Nov 29, 2019 · 0 comments

Comments

@nuwang
Copy link
Member

nuwang commented Nov 29, 2019

This error was encountered by Jessica when trying to launch with both saved and temp credentials. Strangely, the keypairs were fetched, but the vm_types always error out.

She had 2 set of credentials saved with none set as default. Using temp credentials also did not help.

Could be related to: #115

Setting one set of credentials as default solved the problem. This seems incorrect, since it should always respect selected credentials or temp credentials.

Logs revealed following:

ERROR:django.request:Internal Server Error: /cloudlaunch/api/v1/infrastructure/clouds/nectar/regions/melbourne/zones/melbourne-qh2-uom/compute/vm_types/
Traceback (most recent call last):
  File "/app/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/app/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/app/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/app/venv/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/app/venv/lib/python3.6/site-packages/rest_framework/viewsets.py", line 114, in view
    return self.dispatch(request, *args, **kwargs)
  File "/app/venv/lib/python3.6/site-packages/rest_framework/views.py", line 505, in dispatch
    response = self.handle_exception(exc)
  File "/app/venv/lib/python3.6/site-packages/rest_framework/views.py", line 465, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/app/venv/lib/python3.6/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
    raise exc
  File "/app/venv/lib/python3.6/site-packages/rest_framework/views.py", line 502, in dispatch
    response = handler(request, *args, **kwargs)
  File "/app/venv/lib/python3.6/site-packages/rest_framework/mixins.py", line 38, in list
    queryset = self.filter_queryset(self.get_queryset())
  File "/app/venv/lib/python3.6/site-packages/djcloudbridge/drf_helpers.py", line 34, in get_queryset
    return self.list_objects()
  File "/app/venv/lib/python3.6/site-packages/djcloudbridge/views.py", line 343, in list_objects
    provider = view_helpers.get_cloud_provider(self)
  File "/app/venv/lib/python3.6/site-packages/djcloudbridge/view_helpers.py", line 19, in get_cloud_provider
    request_creds = get_credentials(cloud, view.request)
  File "/app/venv/lib/python3.6/site-packages/djcloudbridge/view_helpers.py", line 33, in get_credentials
    return get_credentials_from_profile(cloud, request)
  File "/app/venv/lib/python3.6/site-packages/djcloudbridge/view_helpers.py", line 231, in get_credentials_from_profile
    raise ValueError("Too many credentials to choose from.")
ValueError: Too many credentials to choose from.
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

1 participant