Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

OpenStack driver doesn't support TanentID #1188

Closed
tobegit3hub opened this issue May 18, 2015 · 13 comments
Closed

OpenStack driver doesn't support TanentID #1188

tobegit3hub opened this issue May 18, 2015 · 13 comments

Comments

@tobegit3hub
Copy link

When I tried to create machine and I got this error.

ERRO[0000] Error removing machine udocker: The base Identity V3 API does not accept authentication by TenantID

Now OpenStack V3 API doesn't support TenantID.

@ehazlett
Copy link
Contributor

/cc @ggiamarchi

@tobegit3hub
Copy link
Author

I think we should use ProjectId instead of TenantID for v3 API.

@tobegit3hub
Copy link
Author

@ggiamarchi Please have a look. I think we should update docker machine to support all kinds of OpenStack API 😃

@ggiamarchi
Copy link
Contributor

@tobegit3hub Sorry for the late reply

At the moment, not the whole v3 API is implemented but using the TenantID attribute in docker machine should work because is it mapped on the v3 project Id attribute in gophercloud implementation. As @stenstad said in #679 we should implement this specification.

I don't manage to reproduce your problem. I need more information and i have a few questions in order to really understand the issue :

  • Do you use an official docker machine build or did you build it yourself ? If so, did you use godep dependencies ? I ask for that because i don't see how possible it is to run into this error regarding to the code. It looks like the gophercloud version you use is older than this PR.
  • You wrote When I tried to create machine and your log shows Error removing machine. Can you explain this point ?
  • Can you provide the full docker-machine command you ran to get into this error (And potentially your environment variables) ?

@tobegit3hub
Copy link
Author

@ggiamarchi Really thanks for your detailed explanation. I just download the release docker-machine binary to run the test. I'm gonna follow your instructions and back to here if I get something.

@stenstad
Copy link

@tobegit3hub Hi, the 0.2.0 release released at 2015-04-16 does not contain the required changes to work properly with Identity V3. We compiled up our own versions and distributed them here:

https://zetta.io/en/help/articles-tutorials/docker-machine/

@tobegit3hub
Copy link
Author

Thanks @stenstad . Your binary looks great but I'm stuck in another issue. I'm not using zetta but another OpenStack provider and have this error.

➜  temp   ./machine create --driver openstack --openstack-flavor-id 6 --openstack-image-id a0403d9a-ad06-45e1-84c4-2ab201c4aa22 --openstack-floatingip-pool Public --openstack-ssh-user ubuntu --openstack-sec-groups default uos_machine
ERRO[0000] Error creating machine: Invalid hostname specified 
WARN[0000] You will want to check the provider to make sure the machine and associated resources were properly removed. 
FATA[0000] Error creating machine

@tobegit3hub
Copy link
Author

I'm gonna close this because all of you have implemented in trunk and it should work in next release.

@ggiamarchi
Copy link
Contributor

@tobegit3hub Your last error is not OpenStack related. It's just because docker machine does not allow _ in machine names. See here.

@tobegit3hub
Copy link
Author

You're right. Thanks @ggiamarchi . I'm using UnitedStack and got this error. Is it possible to access /os-keypairs?

➜  temp  ./machine create --driver openstack --openstack-flavor-id 6 --openstack-image-id a0403d9a-ad06-45e1-84c4-2ab201c4aa22 --openstack-ssh-user ubuntu --openstack-sec-groups default uos-machine  
ERRO[0001] Error creating machine: Expected HTTP response code [200] when accessing [POST https://bj1.compute.api.ustack.com/os-keypairs], but got 404 instead
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

WARN[0001] You will want to check the provider to make sure the machine and associated resources were properly removed. 
FATA[0001] Error creating machine 

@tobegit3hub
Copy link
Author

The document tells we can access keystone by /v2/{project_id}/os-keypairs. So I'm a little confused about this.

@ggiamarchi
Copy link
Contributor

The URL in the documentation is the right one. My guess is the compute service URL in the UnitedStack keystone service catalog is wrong. It looks like there is https://bj1.compute.api.ustack.com instead of https://bj1.compute.api.ustack.com/v2/{projectId}.

I don't have UnitedStack account to confirm my guess. You can easily check that by playing an authentication request and then looking at the catalog in the HTTP response.

@tobegit3hub
Copy link
Author

You save me days! Thanks @ggiamarchi 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants