node-get-console returns url always start with http

Bug #1458748 reported by baiyuan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
baiyuan

Bug Description

If I use SSL cert(PEM in shellinabox web console, ironic node-get-console <node_uuid> returns url which starts with http, in this case, it should start with https;
Reproduce steps:
1, edit /etc/ironic/ironic.conf, there is certificate.pem in /tmp/ca
[console]
terminal_cert_dir=/tmp/ca

root@byrh05:/# ls /tmp/ca
certificate.pem

2, set node console mode true:
root@byrh05:/# ironic node-set-console-mode fa81dcc8-4679-45a1-b1f0-40a7157df419 true
root@byrh05:/# ironic node-get-console fa81dcc8-4679-45a1-b1f0-40a7157df419
+-----------------+---------------------------------------------------------------------------------------+
| Property | Value |
+-----------------+---------------------------------------------------------------------------------------+
| console_enabled | True |
| console_info | {u'url': u'http://10.4.41.5:8024', u'type': u'shellinabox'} |
+-----------------+---------------------------------------------------------------------------------------+

3, open url in web browser to test it, url "http://10.4.41.5:8024" should be "https://10.4.41.5:8024";

4, check shellinaboxd in ironic conductor, shellinabox use -c option to use SSL support, so http should be https:
root@byrh05:/# ps -ef|grep shellinaboxd |grep 8024
nobody 7064 1 0 01:01 ? 00:00:00 shellinaboxd -c /tmp/ca -p 8024 --background=/tmp/fa81dcc8-4679-45a1-b1f0-40a7157df419.pid -s /:0:0:HOME:console -M localhost c910f04x23
nobody 7065 7064 0 01:01 ? 00:00:00 shellinaboxd -c /tmp/ca -p 8024 --background=/tmp/fa81dcc8-4679-45a1-b1f0-40a7157df419.pid -s /:0:0:HOME:console -M localhost c910f04x23

Revision history for this message
baiyuan (bybai) wrote :

When we use -t option in shellinabox, it means disable ssl, url can start with http;
When we use -c option in shellinabox, it means supporting ssl, url should start with https

Changed in ironic:
assignee: nobody → baiyuan (bybai)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/185520

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/185523

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by baiyuan (<email address hidden>) on branch: master
Review: https://review.openstack.org/185520
Reason: Duped with https://review.openstack.org/#/c/185523/

Changed in ironic:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/185523
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=662bfb4887d5f66352db5eb78d2c2985260c07d1
Submitter: Jenkins
Branch: master

commit 662bfb4887d5f66352db5eb78d2c2985260c07d1
Author: baiyuan <email address hidden>
Date: Tue May 26 03:59:29 2015 -0400

    fix node-get-console returns url always start with http

    When we specify terminal_cert_dir in /etc/ironic/ironic.conf,
    ironic node-get-console returns console_info url which should
    start with https; When we do not specify terminal_cert_dir in
    /etc/ironic/ironic.conf, console_info url should start with http.

    Change-Id: Ief27e87a4f0f583954e54af6a03baf2c0b6d1104
    Closes-Bug: 1458748

Changed in ironic:
status: In Progress → Fix Committed
Changed in ironic:
milestone: none → 4.0.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.