Serial-console proxy missing

Bug #1696701 reported by coolkil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Wishlist
coolkil

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??)

Revision history for this message
coolkil (coolkil) wrote :
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) 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).

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

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
Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :

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

Any contributor welcome!

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

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.

Revision history for this message
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

Revision history for this message
coolkil (coolkil) wrote :

ok so i made some changes to these files. however i seem to be missing something for the following step wich throws the following error
TASK [os_nova : Create TEMP run dir
fatal: [aio1_nova_console_container-5f0e7062]: FAILED! => {
    "failed": true,
    "msg": "The conditional check 'inventory_hostname in groups[item.value.group]' failed. The error was: error while evaluating conditional (inventory_hostname in groups[item.value.group]): 'item' is undefined\n\nThe error appears to have been in '/etc/ansible/roles/os_nova/tasks/nova_init_systemd.yml': line 16, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create TEMP run dir\n ^ here\n"
}

nova_init_systemd.yml this seems to be missing a variable but i dont know wich one exactly

Revision history for this message
coolkil (coolkil) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_nova (master)

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

Changed in openstack-ansible:
assignee: nobody → coolkil (coolkil)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_nova (master)

Reviewed: https://review.openstack.org/479844
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_nova/commit/?id=0aefe6ab27a7a46220064b852108c67c823a9f0e
Submitter: Jenkins
Branch: master

commit 0aefe6ab27a7a46220064b852108c67c823a9f0e
Author: Chris Beukers <email address hidden>
Date: Mon Jul 3 07:25:03 2017 -0700

    Adding serial console support

    This change is to add serial console support
    serial console is needed in the case the underlying platform
    does not support the spice or novnc option.

    Another benefit is more extended configurations options users
    have more options in how their Openstack enviroment is configured

    Defaults for serialconsole are added to /defaults/main.yml

    /templates/nova.conf.j2 template has been changed so new variables
    can be imported

    the file nova_install.yml has been changed: added conditional to
    ensure no new console playbooks are loaded.

    Change-Id: I02dc48a8d562d20f37b21e03207e91a220b6dbaf
    Partial-Bug: #1696701
    Depends-On: I30f91b20b195e578647ea2a0cfe087bdac2b5b6b

Changed in openstack-ansible:
status: In Progress → 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.