Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 14:55
    theopenlab-ci[bot] commented #488
  • Jan 31 2019 14:46
    vadimstroganov starred fog/fog-openstack
  • Jan 31 2019 14:41
    vadimstroganov commented #487
  • Jan 31 2019 14:40
    vadimstroganov commented #487
  • Jan 31 2019 14:38
    vadimstroganov opened #488
  • Jan 31 2019 14:33
  • Jan 31 2019 12:24
    vadimstroganov opened #487
  • Jan 31 2019 09:36
    aufi labeled #486
  • Jan 31 2019 09:35

    aufi on master

    Created explicit mock and real … Merge pull request #486 from gi… (compare)

  • Jan 31 2019 09:35
    aufi closed #486
  • Jan 30 2019 16:38
    gildub closed #482
  • Jan 30 2019 16:38

    gildub on master

    Add multiattach parameter to vo… Merge pull request #482 from ma… (compare)

  • Jan 30 2019 16:38
    gildub commented #482
  • Jan 30 2019 16:23
    theopenlab-ci[bot] commented #486
  • Jan 30 2019 16:07
    gildub synchronize #486
  • Jan 30 2019 15:54
    gildub review_requested #486
  • Jan 30 2019 15:53
    gildub opened #486
  • Jan 30 2019 15:22

    gildub on master

    Fixed a couple of path to clear… Merge pull request #485 from gi… (compare)

  • Jan 30 2019 15:22
    gildub closed #485
  • Jan 30 2019 12:06
Jonas Wielicki
@horazont

Heyo. I am probably stupid, but to me fog-openstack 0.2.0 is broken beyond usability.
This is what I do:

require 'fog/openstack'

conn = Fog::Identity::OpenStack.new(
  openstack_auth_url: 'https://identity.service.example',
  openstack_username: 'my-username',
  openstack_api_key: 'my-password',
  openstack_project_name: 'my-project',
  openstack_domain_id: 'default'
)

print(conn.domains)

I get the following error:

excon.error.response
  :body          => "{\"error\": {\"message\": \"(https://identity.service.example:35357/v3/v3/domains): The resource could not be found.\", \"code\": 404, \"title\": \"Not Found\"}}"
  :cookies       => [
  ]
  :headers       => {
    "Content-Length"         => "154"
    "Content-Type"           => "application/json"
    "Date"                   => "Wed, 29 Aug 2018 11:59:40 GMT"
    "Server"                 => "Apache/2.4.18 (Ubuntu)"
    "Vary"                   => "X-Auth-Token"
    "x-openstack-request-id" => "req-c158339b-10bb-480b-b470-c664f6ea62e4"
  }
  :host          => "identity.service.example"
  :local_address => "192.168.100.177"
  :local_port    => 50442
  :path          => "/v3/v3/domains"
  :port          => 35357
  :reason_phrase => "Not Found"
  :remote_ip     => "185.x.y.z"
  :status        => 404
  :status_line   => "HTTP/1.1 404 Not Found\r\n"
        from /home/jssfr/.chefdk/gem/ruby/2.3.0/gems/excon-0.62.0/lib/excon/middlewares/response_parser.rb:9:in `response_call'
        from /home/jssfr/.chefdk/gem/ruby/2.3.0/gems/excon-0.62.0/lib/excon/connection.rb:414:in `response'
        from /home/jssfr/.chefdk/gem/ruby/2.3.0/gems/excon-0.62.0/lib/excon/connection.rb:263:in `request'
        from /home/jssfr/.chefdk/gem/ruby/2.3.0/gems/fog-core-1.45.0/lib/fog/core/connection.rb:81:in `request'
        from /home/jssfr/.chefdk/gem/ruby/2.3.0/gems/fog-openstack-0.2.0/lib/fog/openstack/core.rb:53:in `request'
        from /home/jssfr/.chefdk/gem/ruby/2.3.0/gems/fog-openstack-0.2.0/lib/fog/identity/openstack/v3/requests/list_domains.rb:7:in `list_domains'
        from /home/jssfr/.chefdk/gem/ruby/2.3.0/gems/fog-openstack-0.2.0/lib/fog/identity/openstack/v3/models/domains.rb:18:in `all'
        from /home/jssfr/.chefdk/gem/ruby/2.3.0/gems/fog-core-1.45.0/lib/fog/core/collection.rb:112:in `lazy_load'
        from /home/jssfr/.chefdk/gem/ruby/2.3.0/gems/fog-core-1.45.0/lib/fog/core/collection.rb:16:in `to_s'
        from test.rb:11:in `write'
        from test.rb:11:in `print'
        from test.rb:11:in `<main>'

The same thing works in fog-openstack 0.1.27 if I add v3/auth/tokens to the URL.

Jonas Wielicki
@horazont
So am I stupid or has this issue somehow slipped into a release?
(it also seems to affect other operations, e.g. conn.users, conn.projects, …)
Gilles Dubreuil
@gildub
@horazont, are you sure there is no other fog-openstack version still in play?
Jonas Wielicki
@horazont
yeah, I specifically uninstalled all other versions
Gilles Dubreuil
@gildub
Your snippet is working for me (although my current test set doesn't use SSL)
Jonas Wielicki
@horazont
huh, that’s weird
could the version of fog itself play a role?
Gilles Dubreuil
@gildub
Yeah
Jonas Wielicki
@horazont
right, that could be the issue then
which version is required?
Gilles Dubreuil
@gildub
fog-core '~> 1.45.0'
Could you please add those lines at the top of your snippet:
gem 'fog-core', '1.45.0'
gem 'fog-openstack', '0.2.0'
Jonas Wielicki
@horazont
same issue
Gilles Dubreuil
@gildub
Is your environment accesible?
Jonas Wielicki
@horazont
what do you mean by accessible?
Gilles Dubreuil
@gildub
Can I log in and debug?
Jonas Wielicki
@horazont
unfortunately not
this is my local work machine
we’re having this issue on all of our chef-using machines though; based on chefdk 1.6.1 (rather old, I know)
so you might be able to recreate by installing chefdk 1.6.1 and using chef exec ruby test.rb
(chefdk comes with a bundled ruby)
Gilles Dubreuil
@gildub
So chefdk 1.6.1 has fog-openstack wrapped within bundler, correct?
Jonas Wielicki
@horazont
I’m not sure what that means. I manage the installed gems with chef gem {install,uninstall,list}
Gilles Dubreuil
@gildub
fog-openstack gem is managed by chef using bundle. Just trying to locate the gem in question and look inside it's the right one
Jonas Wielicki
@horazont
the ruby environment bundled by chefdk is in /opt/chef/embedded/lib/ruby, that much I know. when using chef gem {install,uninstall}, gems end up/get removed from there
Gilles Dubreuil
@gildub
Okay, let's put chef on the side for a minute.
Jonas Wielicki
@horazont
right
would it help if I tried to recreate the issue within a clean ubuntu:16.04 docker container or something like that?
Gilles Dubreuil
@gildub
If you use a blank (new) user, (assuming it has access to ruby and gem), you should be able to gem install fog-openstack and run your snippet.
Jonas Wielicki
@horazont
I can reproduce this with a fresh ubuntu 16.04 (via docker)
I start to suspect that this might have to do with how the endpoints on that openstack are defined
Gilles Dubreuil
@gildub
Could you please print the catalog? openstack catalog list
Or at least the endpoint for the Identity service?
Jonas Wielicki
@horazont
| keystone       | identity        | f1a                                                                                                  |
|                |                 |   public: https://identity-f1a.cloudandheat.com:5000/v3                                              |
|                |                 | f1a                                                                                                  |
|                |                 |   internal: https://identity-f1a.cloudandheat.com:5000/v3                                            |
|                |                 | f1a                                                                                                  |
|                |                 |   admin: https://identity-f1a.cloudandheat.com:35357/v3                                              |
|                |                 |                                                                                                      |
Gilles Dubreuil
@gildub
Ok, so I added a patch to work around 'versionned' endpoints. Let me check.
Could you set openstack_auth_url: using your endpoint value?
https://identity-f1a.cloudandheat.com:5000/v3
Jonas Wielicki
@horazont
like, openstack_auth_url: "https://identity-f1a.cloudandheat.com:5000/v3"?
Gilles Dubreuil
@gildub
Yes
Jonas Wielicki
@horazont
same issue
should I have had updated something inbetween?
Gilles Dubreuil
@gildub
I don' t think so, the auth_url should be the same value as the endpoint. So that's good
Now the fact that it contains 'v3' is filtered by 0.2.0
I've just checked that
But I need to test with a 'versionned' endpoint, hold on.
And I can recreate the issue!
Jonas Wielicki
@horazont
\o/
Gilles Dubreuil
@gildub
Thanks for bringing it!