Serial-console proxy missing

Bug #1696701 reported by coolkil on 2017-06-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-ansible
Wishlist
Unassigned

Bug Description

When working on s390x support for spice and vnc is missing. the alternative is using something called a serial-console. As described here https://specs.openstack.org/openstack/nova-specs/specs/juno/implemented/serial-ports.html

Openstack-ansible is currently not offering an option to implement this feature but for as far as I can tell all the needed packages are provided in /openstack/venvs/nova-15.1.3/bin/nova-serialproxy

It is possible to lauch the service using the following systemd service file

[Unit]
Description=nova openstack service
After=syslog.target
After=network.target

[Service]
Type=simple
User=nova
Group=nova

ExecStart=/openstack/venvs/nova-15.1.3/bin/nova-serialproxy --log-file=/var/log/nova/nova-serialproxy.log

# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=120
Restart=on-failure
RestartSec=2

# This creates a specific slice which all nova services will operate from
# The accounting options give us the ability to see resource usage through
# the `systemd-cgtop` command.
Slice=nova.slice
CPUAccounting=true
BlockIOAccounting=true
MemoryAccounting=false
TasksAccounting=true

[Install]
WantedBy=multi-user.target

what is needed:
ansible playbook to create systemd service file
changis to nova.conf to support serialconsole-proxy
playbook to set configuration options for serialconsole-proxy???? (is using nova.conf??)

coolkil (coolkil) wrote :

Two services need to be configured:
* nova-serialproxy (on controller node)
* nova-compute (on compute nodes)

The needed config options in "nova.conf" are all defined in the
section [serial_console] at:
https://github.com/openstack/nova/blob/master/nova/conf/serial_console.py

`nova-serialproxy` reads:
    serialproxy_host
    serialproxy_port

`nova-compute` reads:
    enabled
    port_range
    base_url
    proxyclient_address

Example nova-compute nova.conf:
    [DEFAULT]
    my_ip=192.168.12.75
    [serial_console]
    enabled=True
    port_range=10000:20000
    base_url=ws://192.168.12.10:6083/
    proxyclient_address=192.168.12.75

Example nova-serialproxy "nova.conf":
    [DEFAULT]
    my_ip=192.168.12.10
    [serial_console]
    serialproxy_host=192.168.12.10
    serialproxy_port=6083

This example uses `192.168.12.10` as publicly accessible IP address
of the controller node. That's the IP address any user/client would
use to connect to the nova API (or other API services). The IP address
`192.168.12.75` is the address the `nova-serialproxy` will use internally
to establish a connection to the serial console of the instance of *that*
compute node.

Be aware that the code in Nova is confusing in that area. If the
documentation in the nova sample config isn't helpful enough, please
let me know (via IRC).

As a simple test if the configuration you made is usable, you can use larsks's "novaconsole": https://github.com/larsks/novaconsole/

Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → Wishlist
tags: added: low-hanging-fruit

I've tagged this bug as low hanging fruit, as many implementation details are expressed here.

Any contributor welcome!

FWIW, I think the code needs to go at: https://github.com/openstack/openstack-ansible-os_nova/blob/4d347885432f5c99b439157f71b2aba94b0ebfac/defaults/main.yml#L219-L237

But I haven't yet developed any openstack-ansible code, so take it with a grain of salt.

coolkil (coolkil) wrote :

Markus you are right!
Next to that we need to create an entry in Service name-group mapping
https://github.com/openstack/openstack-ansible-os_nova/blob/4d347885432f5c99b439157f71b2aba94b0ebfac/defaults/main.yml#L428-L470 this creates the needed systemd file

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers