[ 
https://issues.apache.org/jira/browse/LIBCLOUD-244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13452475#comment-13452475
 ] 

Tomaz Muraus edited comment on LIBCLOUD-244 at 9/11/12 8:44 AM:
----------------------------------------------------------------

It looks like Libcloud is unable to verify that the hostname specified in the 
SSL certificate returned by the server matches the one you are actually hiting.

Can you please include the output of LIBCLOUD_DEBUG=/dev/stderr salt-cloud 
--list-sizes joyent?

Thanks.

Edit: I think it's a bug in Libcloud SSL verification code - our verification 
code is too strict and doesn't allow "-" character in the sub-domain part (the 
driver is actually hitting <region>..api.joyentcloud.com, e.g. 
us-east-1.api.joyentcloud.com).
                
      was (Author: kami):
    It looks like Libcloud is unable to verify that the hostname specified in 
the SSL certificate returned by the server matches the one you are actually 
hiting.

Can you please include the output of LIBCLOUD_DEBUG=/dev/stderr salt-cloud 
--list-sizes joyent?

Thanks.
                  
> SSLError trying to query JoyEnt
> -------------------------------
>
>                 Key: LIBCLOUD-244
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-244
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.10.1
>         Environment: Arch Linux on Linode (libcloud 0.11.1)
>            Reporter: Joseph Hall
>            Priority: Blocker
>
> Affected version is actually libcloud 0.11.1, but that version was not 
> available in Jira.
> Trying to query JoyEnt API. Works fine directly from curl:
> curl -is -u user:pass -H "Accept: application/json" -H "X-Api-Version: ~6.5" 
> https://api.joyentcloud.com/my/packages
> [...Successful response...]
> [root@limejack ~]# pacman -Q apache-libcloud
> apache-libcloud 0.11.1-1
> [root@limejack ~]# salt-cloud --list-images joyent
> Traceback (most recent call last):
>   File "/usr/bin/salt-cloud", line 14, in <module>
>     main()
>   File "/usr/bin/salt-cloud", line 10, in main
>     cloud.run()
>   File "/usr/lib/python2.7/site-packages/saltcloud/cli.py", line 222, in run
>     mapper.image_list(self.opts['list_images'])
>   File "/usr/lib/python2.7/site-packages/saltcloud/cloud.py", line 87, in 
> image_list
>     images[prov] = self.clouds[fun]()
>   File "/usr/lib/python2.7/site-packages/saltcloud/libcloudfuncs.py", line 
> 51, in avail_images
>     images = conn.list_images()
>   File "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/joyent.py", 
> line 115, in list_images
>     result = self.connection.request('/my/datasets').object
>   File "/usr/lib/python2.7/site-packages/libcloud/common/base.py", line 577, 
> in request
>     raise ssl.SSLError(str(e))
> ssl.SSLError: Failed to verify hostname
> It should be noted that salt-cloud uses the same functions between all of its 
> providers, and no errors occur with AWS or Linode.
> Same error appears with /my/packages API call.
> [root@limejack ~]# salt-cloud --list-sizes joyent
> Traceback (most recent call last):
>   File "/usr/bin/salt-cloud", line 14, in <module>
>     main()
>   File "/usr/bin/salt-cloud", line 10, in main
>     cloud.run()
>   File "/usr/lib/python2.7/site-packages/saltcloud/cli.py", line 226, in run
>     mapper.size_list(self.opts['list_sizes'])
>   File "/usr/lib/python2.7/site-packages/saltcloud/cloud.py", line 106, in 
> size_list
>     sizes[prov] = self.clouds[fun]()
>   File "/usr/lib/python2.7/site-packages/saltcloud/libcloudfuncs.py", line 
> 68, in avail_sizes
>     sizes = conn.list_sizes()
>   File "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/joyent.py", 
> line 128, in list_sizes
>     result = self.connection.request('/my/packages').object
>   File "/usr/lib/python2.7/site-packages/libcloud/common/base.py", line 577, 
> in request
>     raise ssl.SSLError(str(e))
> ssl.SSLError: Failed to verify hostname
> [root@limejack ~]# 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to