From 6c38caebfdf2cb3b0e4e00870a7a83fed9957dc0 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Tue, 24 Feb 2015 17:49:39 +0000 Subject: Enable nova serial console access This allows the local system to access the serial console using https://github.com/larsks/novaconsole/, so it's possible to debug whether the system has network access. --- openstack/etc/nova/nova.conf | 8 ++++++ .../system/openstack-nova-serialproxy.service | 11 ++++++++ openstack/manifest | 1 + openstack/usr/share/openstack/openstack-nova-setup | 29 +++++----------------- 4 files changed, 26 insertions(+), 23 deletions(-) create mode 100644 openstack/etc/systemd/system/openstack-nova-serialproxy.service diff --git a/openstack/etc/nova/nova.conf b/openstack/etc/nova/nova.conf index b703591f..0d6cdf92 100644 --- a/openstack/etc/nova/nova.conf +++ b/openstack/etc/nova/nova.conf @@ -629,3 +629,11 @@ allow_resize_to_same_host=True # Actual testing hardware does not support hardware acceleration # so in this step we will configure libvirt to use qemu instead of KVM virt_type=qemu + +################## +# SERIAL CONSOLE # +################## +# Enable serial console proxy for serial console access from the host only +[serial_console] +serialproxy_host=127.0.0.1 +enabled=true diff --git a/openstack/etc/systemd/system/openstack-nova-serialproxy.service b/openstack/etc/systemd/system/openstack-nova-serialproxy.service new file mode 100644 index 00000000..2557dc2b --- /dev/null +++ b/openstack/etc/systemd/system/openstack-nova-serialproxy.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenStack Nova Serial Proxy +After=syslog.target network.target + +[Service] +Type=simple +User=nova +ExecStart=/usr/bin/nova-serialproxy --config-file /etc/nova/nova.conf + +[Install] +WantedBy=multi-user.target diff --git a/openstack/manifest b/openstack/manifest index 4bb39cdc..491bc9f2 100644 --- a/openstack/manifest +++ b/openstack/manifest @@ -47,6 +47,7 @@ 0100644 0 0 /etc/systemd/system/openstack-nova-scheduler.service 0100644 0 0 /etc/systemd/system/openstack-nova-consoleauth.service 0100644 0 0 /etc/systemd/system/openstack-nova-novncproxy.service +0100644 0 0 /etc/systemd/system/openstack-nova-serialproxy.service 0100644 0 0 /etc/systemd/system/openstack-nova-cert.service 0100644 0 0 /etc/systemd/system/openstack-rabbitmq-setup.service 0100644 0 0 /etc/systemd/system/openstack-rabbitmq-server.service diff --git a/openstack/usr/share/openstack/openstack-nova-setup b/openstack/usr/share/openstack/openstack-nova-setup index 7168e7c2..5935b13e 100644 --- a/openstack/usr/share/openstack/openstack-nova-setup +++ b/openstack/usr/share/openstack/openstack-nova-setup @@ -96,38 +96,21 @@ usermod -a -G libvirt nova rm /etc/systemd/system/multi-user.target.wants/openstack-nova-setup.service # Start nova services -systemctl start openstack-nova-compute # [1] Never enable openstack-nova-conductor service in a node with # openstack-nova-compute or the security benefits of removing # database access from nova-compute will be negated #systemctl start openstack-nova-conductor -systemctl start openstack-nova-api -systemctl start openstack-nova-cert -systemctl start openstack-nova-consoleauth -systemctl start openstack-nova-scheduler -systemctl start openstack-nova-novncproxy +for service in compute api cert consoleauth scheduler novncproxy serialproxy; do + systemctl start openstack-nova-$service.service +done #systemctl start openstack-nova-xvpnvncproxy # Create the links to run nova services when system start next times. -ln -s "/etc/systemd/system/openstack-nova-compute.service" \ - "/etc/systemd/system/multi-user.target.wants/openstack-nova-compute.service" +for service in compute api cert consoleauth scheduler novncproxy serialproxy; do + systemctl enable openstack-nova-$service.service +done # See description of why this shouldn't run in a openstack in one node in [1] #ln -s "/etc/systemd/system/openstack-nova-conductor.service" \ # "/etc/systemd/system/multi-user.target.wants/openstack-nova-conductor.service" -ln -s "/etc/systemd/system/openstack-nova-api.service" \ - "/etc/systemd/system/multi-user.target.wants/openstack-nova-api.service" - -ln -s "/etc/systemd/system/openstack-nova-cert.service" \ - "/etc/systemd/system/multi-user.target.wants/openstack-nova-cert.service" - -ln -s "/etc/systemd/system/openstack-nova-consoleauth.service" \ - "/etc/systemd/system/multi-user.target.wants/openstack-nova-consoleauth.service" - -ln -s "/etc/systemd/system/openstack-nova-scheduler.service" \ - "/etc/systemd/system/multi-user.target.wants/openstack-nova-scheduler.service" - -ln -s "/etc/systemd/system/openstack-nova-novncproxy.service" \ - "/etc/systemd/system/multi-user.target.wants/openstack-nova-novncproxy.service" - exit 0 -- cgit v1.2.1