diff options
| author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-10-03 00:20:31 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-10-03 01:16:44 -0400 |
| commit | b625b4c4c3d299e3830951304f468a5399828b51 (patch) | |
| tree | ca62e1ff521cb2be4849930a52dd735d779c6b1b /meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth | |
| parent | 718ecf27999c69acae27992123d2a7fe85d64c77 (diff) | |
| download | meta-cloud-services-b625b4c4c3d299e3830951304f468a5399828b51.tar.gz | |
nova: add novnc console proxy support
With this commit the appropriate daemons are started on a control node boot to
support horizon console access via the novnc proxy.
Additionally, the proper nova configuration is set for boh the control and
compute nodes for out of the box console connectivity between the compute,
control and horizone interface.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth b/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth new file mode 100644 index 0000000..13ad285 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-nova/nova-consoleauth | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | ### BEGIN INIT INFO | ||
| 3 | # Provides: nova-consoleauth | ||
| 4 | # Required-Start: $remote_fs $syslog | ||
| 5 | # Required-Stop: $remote_fs $syslog | ||
| 6 | # Should-Start: libvirt-bin | ||
| 7 | # Should-Stop: libvirt-bin | ||
| 8 | # Default-Start: 2 3 4 5 | ||
| 9 | # Default-Stop: 0 1 6 | ||
| 10 | # Short-Description: nova-consoleauth service | ||
| 11 | # Description: Provides console services for the openstack | ||
| 12 | # cloud computing system | ||
| 13 | ### END INIT INFO | ||
| 14 | |||
| 15 | |||
| 16 | set -e | ||
| 17 | |||
| 18 | DAEMON=/usr/bin/nova-consoleauth | ||
| 19 | DAEMON_ARGS="" | ||
| 20 | PIDFILE=/var/run/nova/nova-consoleauth.pid | ||
| 21 | |||
| 22 | ENABLED=true | ||
| 23 | |||
| 24 | if test -f /etc/default/nova-consoleauth; then | ||
| 25 | . /etc/default/nova-consoleauth | ||
| 26 | fi | ||
| 27 | |||
| 28 | mkdir -p /var/run/nova | ||
| 29 | chown nova:root /var/run/nova/ | ||
| 30 | |||
| 31 | mkdir -p /var/lock/nova | ||
| 32 | chown nova:root /var/lock/nova/ | ||
| 33 | |||
| 34 | #uid="$(getent passwd nova | cut -f3 -d:)" | ||
| 35 | #gid="$(getent passwd nova | cut -f4 -d:)" | ||
| 36 | |||
| 37 | . /lib/lsb/init-functions | ||
| 38 | |||
| 39 | export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" | ||
| 40 | export TMPDIR=/var/lib/nova/tmp | ||
| 41 | |||
| 42 | if ! [ -x ${DAEMON} ] ; then | ||
| 43 | exit 0 | ||
| 44 | fi | ||
| 45 | |||
| 46 | case "$1" in | ||
| 47 | start) | ||
| 48 | test "$ENABLED" = "true" || exit 0 | ||
| 49 | echo "Starting nova console" "nova-consoleauth" | ||
| 50 | start-stop-daemon --start -b -m --pidfile $PIDFILE --exec ${DAEMON} -- ${DAEMON_ARGS} | ||
| 51 | log_end_msg $? | ||
| 52 | ;; | ||
| 53 | stop) | ||
| 54 | test "$ENABLED" = "true" || exit 0 | ||
| 55 | echo "Stopping nova console" "nova-consoleauth" | ||
| 56 | start-stop-daemon --stop --oknodo --pidfile ${PIDFILE} | ||
| 57 | log_end_msg $? | ||
| 58 | ;; | ||
| 59 | restart|force-reload) | ||
| 60 | test "$ENABLED" = "true" || exit 1 | ||
| 61 | $0 stop | ||
| 62 | sleep 1 | ||
| 63 | $0 start | ||
| 64 | ;; | ||
| 65 | status) | ||
| 66 | test "$ENABLED" = "true" || exit 0 | ||
| 67 | status_of_proc -p $PIDFILE $DAEMON nova-consoleauth && exit 0 || exit $? | ||
| 68 | ;; | ||
| 69 | *) | ||
| 70 | echo "Usage: /etc/init.d/nova-consoleauth {start|stop|restart|force-reload|status}" | ||
| 71 | exit 1 | ||
| 72 | ;; | ||
| 73 | esac | ||
| 74 | |||
| 75 | exit 0 | ||
