Currently, api.Client().AddLocalCharm() uses utils.GetNonValidatingHTTPClient() to connect to the API server's HTTPS handler for path /charms. This is sub-optimal and needs to be changed to use a proper validating HTTP + TLS client, using the CACert used to connect to the API server. Unfortunately, due to an unknown issue in go 1.1.2, this does not work (but works in later versions), and the request fails with the following error:
cannot upload charm: Post https://127.0.0.1:46369/charms?series=quantal: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs"} ("cannot upload charm: Post https://127.0.0.1:46369/charms?series=quantal: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs
I hit the same issue
root@juju-client:~# juju -v bootstrap -e openstack openstack provider.go:116 opening environment "openstack" 13ed18d1527995f 210b0c9 /10.1.27. 194:8080/ v1/AUTH_ 74406d06ca654bf 4804003942b2f3f 7c/juju- fdc3ca8c6b13ed1 8d1527995f210b0 c9/provider- state /10.1.27. 194:8080/ v1/AUTH_ 74406d06ca654bf 4804003942b2f3f 7c/juju- fdc3ca8c6b13ed1 8d1527995f210b0 c9/provider- state: x509: cannot validate certificate for 10.1.27.194 because it doesn't contain any IP SANs precise- amd64
verbose is deprecated with the current meaning, use show-log
2014-01-09 06:31:45 INFO juju.environs open.go:156 environment info already exists; using New not Prepare
2014-01-09 06:31:45 INFO juju.provider.
2014-01-09 06:31:45 ERROR juju supercommand.go:282 failed to GET object provider-state from container juju-fdc3ca8c6b
caused by: failed executing the request https:/
caused by: Get https:/
root@juju-client:~# juju --version
1.16.5-
Is there a workaround, is this issue expected in 1.16.5 version of juju?