Splitted secrets not useable if amount of defined clouds is different between clouds.yaml and secret.yaml

Bug #1586522 reported by NTbc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-client-config
New
Undecided
Unassigned

Bug Description

When using using the "Spitted Secrets" feature and secrets.yaml has more clouds defined than clouds.yaml the result is not useable.

I'm using the Ansible OpenStack dynamic inventory to provision systems. All my private secrets for all clouds (5 in total) i'm connecting to are stored in ~/.config/secrets.yaml. However, within each project folder only a subset of these clouds is defined in clouds.yaml. As a result of the merge of secrets.yaml and clouds.yaml a list of clouds is created that is not "complete".

Example:
# ~/.config/openstack/secrets.yaml
---
clouds:
  cloud-one:
    auth:
      username: someone
      password: topsecret
  cloud-two:
    auth:
      username: someone
      password: topsecret

# ~/project-1/clouds.yaml
---
clouds:
  cloud-one:
    auth:
      auth_url: http://x.x.x.x:5000/v2.0
      project_name: demo

# ~/project-2/clouds.yaml
---
clouds:
  cloud-one:
    auth:
      auth_url: http://x.x.x.x:5000/v2.0
      project_name: demo

The executing of Ansible's OpenStack dynamic inventory (openstack.py) in any of the project folders fails when it tries to connect to the cloud that is not defined within clouds.yaml but in secrets.yaml as parameters like auth_url are missing.

When i put both clouds in clouds.yaml it works fine.

Expected result:
I would expect to merge auth data of secure.yaml only for clouds that are defined within clouds.yaml. I know that secrets.yaml has a higher precedence than clouds.yaml but i guess i'm not the only one using a single secrets.yaml and multiple clouds.yaml.

Revision history for this message
NTbc (ntbc) wrote :

secrets.yaml = secure.yaml. sorry

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.