Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to open openstack vm console #17619

Closed
easyljy opened this issue Jun 20, 2018 · 4 comments
Closed

failed to open openstack vm console #17619

easyljy opened this issue Jun 20, 2018 · 4 comments
Labels

Comments

@easyljy
Copy link

easyljy commented Jun 20, 2018

version: Gapri-3

When click vm console of Openstack, got the following error

Console access failed: Expected([200, 202]) <=> Actual(404 Not Found) excon.error.response :body => "{"itemNotFound": {"message": "The resource could not be found.", "code": 404}}" :cookies => [ ] :headers => { "Connection" => "close" "Content-Length" => "78" "Content-Type" => "application/json; charset=UTF-8" "Date" => "Mon, 18 Jun 2018 18:59:43 GMT" "Openstack-Api-Version" => "compute 2.15" "Vary" => "OpenStack-API-Version, X-OpenStack-Nova-API-Version" "X-Compute-Request-Id" => "req-dfb58721-a72e-4aec-92b3-1267561bc3c6" "X-Openstack-Nova-Api-Version" => "2.15" "X-Openstack-Request-Id" => "req-dfb58721-a72e-4aec-92b3-1267561bc3c6" } :host => "ctlrvip.mydomain.com" :local_address => "x.x.x.x" :local_port => 57226 :path => "/v2.1/8d3b1b63abc14579a832386aac5e128b/servers/d1f5e983-6e91-4eb6-bbfc-c30b85c77045/action" :port => 8774 :reason_phrase => "Not Found" :remote_ip => "x.x.x.x" :status => 404 :status_line => "HTTP/1.1 404 Not Found\r\n"

The action os-getVNCConsole is deprecated in microversion 2.5 and superseded by the API Server Remote Consoles in microversion 2.6. The new API offers a unified API for different console types

In Gapri-3, apparently it uses microversion 2.15. I fixed it as below temperarily

update file /usr/local/lib/ruby/gems/2.3.0/gems/fog-openstack-0.1.25/lib/fog/compute/openstack/requests/get_vnc_console.rb

diff get_vnc_console.rb.bak get_vnc_console.rb
17,19c17,23
<             'os-getVNCConsole' => {
<               'type' => console_type
<             }
---
> #            'os-getVNCConsole' => {
> #              'type' => console_type
> #            }
>              'remote_console' => {
>                'protocol' => 'vnc',
>                'type' => console_type
>              }
21c25,30
<           server_action(server_id, body)
---
>           request(
>             :body    => Fog::JSON.encode(body),
>             :expects => [200, 202],
>             :method  => 'POST',
>             :path    => "servers/#{server_id}/remote-consoles"
>           )
41d49
<

update file /usr/local/lib/ruby/gems/2.3.0/bundler/gems/manageiq-providers-openstack-a8b9d0b4cdac/app/models/manageiq/providers/openstack/cloud_manager/vm/remote_console.rb

diff remote_console.rb.bak remote_console.rb
22,23c22,23
<         return nil if response.body.fetch_path('console', 'type') != 'novnc'
<         response.body.fetch_path('console', 'url')
---
>         return nil if response.body.fetch_path('remote_console', 'type') != 'novnc'
>         response.body.fetch_path('remote_console', 'url')
@miq-bot miq-bot added the stale label Jan 7, 2019
@miq-bot
Copy link
Member

miq-bot commented Jan 7, 2019

This issue has been automatically marked as stale because it has not been updated for at least 6 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions!

@JPrause
Copy link
Member

JPrause commented Jan 23, 2019

@easyljy is this still a valid issue. If not can you close.
If there's no update by next week, I'll be closing this issue.

@easyljy
Copy link
Author

easyljy commented Jan 23, 2019 via email

@JPrause
Copy link
Member

JPrause commented Jan 23, 2019

@miq-bot close_issue

@miq-bot miq-bot closed this as completed Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants