aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/py-nova
diff options
context:
space:
mode:
authornovel <novel@FreeBSD.org>2017-01-21 12:14:35 +0800
committernovel <novel@FreeBSD.org>2017-01-21 12:14:35 +0800
commit6b2ef35c3c348074aa7873cdb83378def3f9d791 (patch)
tree766d378b27a1a5b3aae26cb779c92d80a2313767 /emulators/py-nova
parent1a1a62fef989e64aa2c90a6f52c5caa06b87d352 (diff)
downloadfreebsd-ports-gnome-6b2ef35c3c348074aa7873cdb83378def3f9d791.tar.gz
freebsd-ports-gnome-6b2ef35c3c348074aa7873cdb83378def3f9d791.tar.zst
freebsd-ports-gnome-6b2ef35c3c348074aa7873cdb83378def3f9d791.zip
emulators/py-nova: update to 14.0.3
- update to 14.0.3 - add nova-novncproxy service - fix booting from cinder volumes PR: 216314 Submitted by: maintainer
Diffstat (limited to 'emulators/py-nova')
-rw-r--r--emulators/py-nova/Makefile8
-rw-r--r--emulators/py-nova/distinfo6
-rw-r--r--emulators/py-nova/files/07-fix-xen-xvd.patch18
-rw-r--r--emulators/py-nova/files/nova-novncproxy.in53
4 files changed, 79 insertions, 6 deletions
diff --git a/emulators/py-nova/Makefile b/emulators/py-nova/Makefile
index bf8db9b6e010..a8d4c7d8de2b 100644
--- a/emulators/py-nova/Makefile
+++ b/emulators/py-nova/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= nova
-PORTVERSION= 14.0.2
+PORTVERSION= 14.0.3
CATEGORIES= emulators python
MASTER_SITES= https://fossies.org/linux/misc/openstack/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -79,7 +79,8 @@ EXTRA_PATCHES= ${FILESDIR}/01-firewall-manager.patch:-p1 \
${FILESDIR}/03-nova-conf.patch:-p1 \
${FILESDIR}/04-xen-phy.patch:-p1 \
${FILESDIR}/05-online-cpus.patch:-p1 \
- ${FILESDIR}/06-freebsd-net.patch:-p1
+ ${FILESDIR}/06-freebsd-net.patch:-p1 \
+ ${FILESDIR}/07-fix-xen-xvd.patch:-p1
ONLY_FOR_ARCHS= amd64
@@ -94,7 +95,8 @@ USE_RC_SUBR= nova-api \
nova-compute \
nova-cert \
nova-cells \
- nova-serialproxy
+ nova-serialproxy \
+ nova-novncproxy
USERS= nova
GROUPS= nova
diff --git a/emulators/py-nova/distinfo b/emulators/py-nova/distinfo
index 584c6e6b86c7..edbc9a71ca9d 100644
--- a/emulators/py-nova/distinfo
+++ b/emulators/py-nova/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1478994869
-SHA256 (nova-14.0.2.tar.gz) = e98291734b4b16615fb1518161c89749f09ad33b6344feb70d62b69e8161a50d
-SIZE (nova-14.0.2.tar.gz) = 5574197
+TIMESTAMP = 1484666036
+SHA256 (nova-14.0.3.tar.gz) = e5a93e747824cb77a0d389a3e74eaaa63954048530df942533c68bda1534e826
+SIZE (nova-14.0.3.tar.gz) = 5584926
diff --git a/emulators/py-nova/files/07-fix-xen-xvd.patch b/emulators/py-nova/files/07-fix-xen-xvd.patch
new file mode 100644
index 000000000000..188deb3636d3
--- /dev/null
+++ b/emulators/py-nova/files/07-fix-xen-xvd.patch
@@ -0,0 +1,18 @@
+diff --git a/nova/virt/block_device.py b/nova/virt/block_device.py
+index f6ed6a3..6539fca 100644
+--- a/nova/virt/block_device.py
++++ b/nova/virt/block_device.py
+@@ -228,7 +228,12 @@ class DriverVolumeBlockDevice(DriverBlockDevice):
+ {k: v for k, v in six.iteritems(self._bdm_obj)
+ if k in self._new_fields | set(['delete_on_termination'])}
+ )
+- self['mount_device'] = self._bdm_obj.device_name
++
++ device_name = self._bdm_obj.device_name
++ if self['disk_bus'] == 'xen':
++ device_name = device_name.replace("/dev/vd", "/dev/xvd")
++ self['mount_device'] = device_name
++
+ try:
+ self['connection_info'] = jsonutils.loads(
+ self._bdm_obj.connection_info)
diff --git a/emulators/py-nova/files/nova-novncproxy.in b/emulators/py-nova/files/nova-novncproxy.in
new file mode 100644
index 000000000000..d23113601dd8
--- /dev/null
+++ b/emulators/py-nova/files/nova-novncproxy.in
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: nova_novncproxy
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable nova_novncproxy:
+#
+# nova_novncproxy_enable="YES"
+#
+# nova_novncproxy_enable (bool):
+# Set it to "YES" to enable nova_novncproxy.
+# Default is "NO".
+#
+# nova_novncproxy_logdir (str):
+# Set it to chagge log directory
+# Default is "/var/log/nova"
+#
+# nova_novncproxy_args (str):
+# Set it to change command line arguments.
+# Default is "--log-file ${nova_novncproxy_logdir}/nova-novncproxy.log"
+#
+
+. /etc/rc.subr
+
+name=nova_novncproxy
+rcvar=nova_novncproxy_enable
+
+PATH=%%PREFIX%%/bin:%%PREFIX%%/sbin:$PATH
+
+pidfile="/var/run/nova-novncproxy.pid"
+procname="%%PREFIX%%/bin/python2.7"
+
+start_precmd=nova_precmd
+
+load_rc_config $name
+
+: ${nova_novncproxy_enable:="NO"}
+: ${nova_novncproxy_logdir:="/var/log/nova"}
+: ${nova_novncproxy_args:="--log-file ${nova_novncproxy_logdir}/nova-novncproxy.log"}
+
+command="/usr/sbin/daemon"
+command_args="-f -p ${pidfile} nova-novncproxy ${nova_novncproxy_args}"
+
+nova_precmd() {
+ mkdir -p ${nova_novncproxy_logdir}
+}
+
+run_rc_command "$1"