Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Unable to pull saved credentials.yaml from keyvault after 3.5.0b2 changes #214

Closed
j-dahl opened this issue Jun 19, 2018 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@j-dahl
Copy link

j-dahl commented Jun 19, 2018

Shipyard 3.5.0b1 is installed on one machine and the following works, whereas on systems with 3.5.0b3 the following fails. I'm assuming this is related to the changes introduced in 3.5.0b2 regarding the account key/aad change in the batch section based on the error I'm seeing but I'm not sure why it's failing.

I have a credentials.yaml file I've saved in keyvault that I'm trying to pull that looks like the following:

credentials:
  aad:
    directory_id: 
    application_id: 
  batch:
    account_service_url: 
    resource_group: 
  storage:
    jdstorageaccount:
       account: 
       endpoint: core.windows.net
       resource_group: 
  management:
    aad:
      directory_id: 
    subscription_id: 

I have another credential file that pulls this information that looks like the following and references the above:

credentials:
  aad:
    directory_id: 
    application_id: 
  keyvault:
    credentials_secret_id: 
    uri: 

I'm using service principal auth and I specify the service principal auth key as a CLI option when I try to run any shipyard command with the second credential file (which pulls the first one from keyvault).

e.g. shipyard account list --aad-auth-key $AUTHKEY

On the latest version of shipyard, I get an error that says batch credentials not specified or invalid:

Traceback (most recent call last):
  File "/home/jd/batch-shipyard/shipyard.py", line 2274, in <module>
    cli()
  File "/home/jd/batch-shipyard/.shipyard/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/jd/batch-shipyard/.shipyard/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/jd/batch-shipyard/.shipyard/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/jd/batch-shipyard/.shipyard/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/jd/batch-shipyard/.shipyard/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/jd/batch-shipyard/.shipyard/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/jd/batch-shipyard/.shipyard/lib/python3.5/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/home/jd/batch-shipyard/.shipyard/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/jd/batch-shipyard/shipyard.py", line 861, in account_list
    ctx.initialize_for_batch()
  File "/home/jd/batch-shipyard/shipyard.py", line 183, in initialize_for_batch
    skip_monitor_config=True, fs_storage=False)
  File "/home/jd/batch-shipyard/shipyard.py", line 388, in _init_config
    convoy.settings.credentials_batch(self.config)
  File "/home/jd/batch-shipyard/convoy/settings.py", line 1591, in credentials_batch
    raise ValueError('batch credentials not specified or invalid')
ValueError: batch credentials not specified or invalid

The latest changes mentioned that aad and batch account keys aren't supported in the same credentials file, but I don't think that's the issue as I'm not specifying the batch account key. I'm not sure if there's something else I'm doing incorrectly.

Thanks,
JD

@j-dahl j-dahl changed the title Unable to pull saved credentials.yaml in keyvault after 3.5.0b2 changes Unable to pull saved credentials.yaml from keyvault after 3.5.0b2 changes Jun 19, 2018
@alfpark alfpark self-assigned this Jun 19, 2018
@alfpark alfpark added the defect label Jun 19, 2018
@alfpark alfpark added this to the 3.5 milestone Jun 19, 2018
@alfpark
Copy link
Collaborator

alfpark commented Jun 19, 2018

If you can try the develop branch, please let me know if this resolves your issue.

@j-dahl
Copy link
Author

j-dahl commented Jun 19, 2018

Thanks for the prompt reply, confirming that resolved the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants