1
votes

Trying to connect locally deployed openstack (pike) with fog.

Firstly, curl connection works well with the command: https://hastebin.com/fihojuqize.scala

With this in mind, i've created fog credentials file: https://hastebin.com/hexanixucu.scala and run

fog openstack

Compute[:openstack].servers

This leads to an error like (full text here)

  :status        => 302
  :status_line   => "HTTP/1.1 302 Found\r\n"

    from /var/lib/gems/2.3.0/gems/excon-0.60.0/lib/excon/middlewares/expects.rb:7:in `response_call'
    from /var/lib/gems/2.3.0/gems/excon-0.60.0/lib/excon/middlewares/response_parser.rb:9:in `response_call'
    from /var/lib/gems/2.3.0/gems/excon-0.60.0/lib/excon/connection.rb:414:in `response'
    from /var/lib/gems/2.3.0/gems/excon-0.60.0/lib/excon/connection.rb:263:in `request'
    from /var/lib/gems/2.3.0/gems/fog-core-1.45.0/lib/fog/core/connection.rb:81:in `request'
    from /var/lib/gems/2.3.0/gems/fog-openstack-0.1.23/lib/fog/openstack.rb:610:in `get_version'
    from /var/lib/gems/2.3.0/gems/fog-openstack-0.1.23/lib/fog/openstack.rb:583:in `get_supported_microversion'
    from /var/lib/gems/2.3.0/gems/fog-openstack-0.1.23/lib/fog/openstack/core.rb:122:in `set_microversion'
    from /var/lib/gems/2.3.0/gems/fog-openstack-0.1.23/lib/fog/openstack/core.rb:212:in `authenticate'
    from /var/lib/gems/2.3.0/gems/fog-openstack-0.1.23/lib/fog/compute/openstack.rb:397:in `initialize'
    from /var/lib/gems/2.3.0/gems/fog-core-1.45.0/lib/fog/core/service.rb:115:in `new'
    from /var/lib/gems/2.3.0/gems/fog-core-1.45.0/lib/fog/core/service.rb:115:in `new'
    from /var/lib/gems/2.3.0/gems/fog-core-1.45.0/lib/fog/core/services_mixin.rb:16:in `new'
    from /var/lib/gems/2.3.0/gems/fog-core-1.45.0/lib/fog/compute.rb:54:in `new'
    from /var/lib/gems/2.3.0/gems/fog-core-1.45.0/lib/fog/core/services_mixin.rb:4:in `[]'
    from (irb):1:in `<top (required)>'
    from /var/lib/gems/2.3.0/gems/fog-1.42.0/bin/fog:76:in `block in <top (required)>'
    from /var/lib/gems/2.3.0/gems/fog-1.42.0/bin/fog:76:in `catch'
    from /var/lib/gems/2.3.0/gems/fog-1.42.0/bin/fog:76:in `<top (required)>'
    from /usr/local/bin/fog:23:in `load'
    from /usr/local/bin/fog:23:in `<main>'

First request to "/identity/v3/auth/tokens" was complete, but overall result is bad..

Worth to be mentioned - i've cntlm proxy configured.

1
it looks like after authentication it is trying to visit "/" which aparently has moved to "/dashboard" thus the 302 (redirect) which is not what was expected. Other than that I am unsure if I can help. can you post your actual ruby code? - engineersmnky
actually i'm using latest version (1.42.0) of fog lib (github.com/fog/fog) - ars

1 Answers

0
votes

Export your openrc file which contains authentication information like this

​export OS_USERNAME=admin

​export OS_PASSWORD=ADMIN_PASS

​export OS_TENANT_NAME=admin

​export OS_AUTH_URL=http://controller:35357/v3.0