synergiator opened a new issue #73: URL: https://github.com/apache/cloudstack-cloudmonkey/issues/73
# Summary As it seems, error handling regarding loading API profile is not complete and/or according error message is ambiguous/wrong. # Problem description Consider the following test environment: * Docker image with pytest in a Gitlab CI/CD runner * Step 1: use direct Python call using `cs` * Step 2: call cmk using `subprocess` * Error: "_Please provide either apikey/secretkey or username/password to make an API call Error: failed to authenticate to make API call_" ([from here](https://github.com/apache/cloudstack-cloudmonkey/blob/2d9fd04d3276149331c774cbd1c731a48a9008a9/cmd/network.go#L217)) # Troubleshooting so far What I've tried is: * Login to runner VM and run the test script inside the corresponding Docker container hoping to reproduce the problem * I can't reproduce the problem: as it is, the script is running through without error. If I try to modify test environment e.g. change credentials, then I get error from `cs`. If I change the way how `subprocess` is run, cmk can't be found * After reading the linked source code, I can't understand the logic but it seems to me the problem captured in the `else` block, string length of credentials, does not relate to the error message it issues that there is an auth problem? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org