Open EtienneM opened 4 years ago
Thanks for reporting this.
I would say it is a bug!
I see you are using
err := conn.ApplyEnvironment()
I could see how this could happen if you have a storage URL and an auth token in there?
Is that the case?
I can see several mistakes in the auth code now I look at it! I think that bit of code was amongst my first bits of Go code written in 2014 2fd9fd32d665d493927c923efb39fce07d2588c5
The problem is that the mutex went from an inline one to a pointer. This is so that the Connection can be copied without problems fb21762ca71c5da5958efd8426cbbd67df8f7ba9 however not all the places it is used got updated to initialise it.
I could see how this could happen if you have a storage URL and an auth token in there?
Here is the list of environment variables:
OS_USERNAME
OS_PASSWORD
OS_REGION_NAME
OS_AUTH_URL
OS_IDENTITY_API_VERSION=3
OS_USER_DOMAIN_NAME
OS_PROJECT_DOMAIN_NAME
OS_PROJECT_ID
OS_PROJECT_NAME
Can you have a go with the fix-160-auth-panic
branch? I think this will fix it.
I decided I needed to revert #154 which is the underlying cause of the problem.
Lib version used: v1.0.52
Hi,
I'm not sure if it's an issue or me wrongly using the lib. The
Authenticate
documentation states that:Hence, I assumed it's not needed to call the
Authenticate
method as it's automatically called if needed. but in my code I'm doing the following:The code panics with the following logs:
If I update my code like that, it works:
I don't know if the fix is for the lib to call
Authenticate
if needed. Or maybe prevent the panic and return a proper error?Thanks a lot for the lib :)