Comment 1 for bug 1694937

Revision history for this message
Javier Peña (jpena-c) wrote :

I've been doing some more research on the bug. The issue is that class OpenStackConfig from [1] is initialized twice, at [2] and [3], with OS_CLOUD_NAME passed as an environment variable.

The first time it is initialized, the configuration gets inside self.cloud_config, and since the environment variable is still around, the second time it fails in [4].

We could either remove the check in [4] or make the OpenStackConfig init code resilient to multiple initializations. I'm not familiar enough with the codebase to decide which option is better.

[1] - https://github.com/openstack/os-client-config/blob/990cfa3ce24d0a92c7578b52ae1fea02d69f7e87/os_client_config/config.py#L177
[2] - https://github.com/openstack/python-openstackclient/blob/ef99f444628282d06feae04514bd2a6328d87b93/openstackclient/shell.py#L137
[3] - https://github.com/openstack/python-openstackclient/blob/ef99f444628282d06feae04514bd2a6328d87b93/openstackclient/shell.py#L146-L152
[4] - https://github.com/openstack/os-client-config/blob/990cfa3ce24d0a92c7578b52ae1fea02d69f7e87/os_client_config/config.py#L250-L256