From ee9b1b5d512384967ea7998b04a250928014d18a Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Wed, 27 Nov 2013 11:11:28 -0500 Subject: python-cliff: uprev to havana nova-api minimum requirements Signed-off-by: Bruce Ashfield --- .../remove-distribute-dependency.patch | 23 ---------------------- .../recipes-devtools/python/python-cliff_1.3.2.bb | 22 --------------------- .../recipes-devtools/python/python-cliff_1.4.5.bb | 21 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 45 deletions(-) delete mode 100644 meta-openstack/recipes-devtools/python/python-cliff/remove-distribute-dependency.patch delete mode 100644 meta-openstack/recipes-devtools/python/python-cliff_1.3.2.bb create mode 100644 meta-openstack/recipes-devtools/python/python-cliff_1.4.5.bb (limited to 'meta-openstack/recipes-devtools/python') diff --git a/meta-openstack/recipes-devtools/python/python-cliff/remove-distribute-dependency.patch b/meta-openstack/recipes-devtools/python/python-cliff/remove-distribute-dependency.patch deleted file mode 100644 index 18aab4c..0000000 --- a/meta-openstack/recipes-devtools/python/python-cliff/remove-distribute-dependency.patch +++ /dev/null @@ -1,23 +0,0 @@ -Index: cliff-1.3.2/setup.py -=================================================================== ---- cliff-1.3.2.orig/setup.py -+++ cliff-1.3.2/setup.py -@@ -5,10 +5,6 @@ PROJECT = 'cliff' - # Change docs/source/conf.py too! - VERSION = '1.3.2' - --# Bootstrap installation of Distribute --import distribute_setup --distribute_setup.use_setuptools() -- - from setuptools import setup, find_packages - - from distutils.util import convert_path -@@ -22,7 +18,6 @@ except IOError: - long_description = '' - - install_requires = [ -- 'distribute', - 'PrettyTable>=0.6,<0.8', - 'cmd2==0.6.4', - ] diff --git a/meta-openstack/recipes-devtools/python/python-cliff_1.3.2.bb b/meta-openstack/recipes-devtools/python/python-cliff_1.3.2.bb deleted file mode 100644 index 05de68b..0000000 --- a/meta-openstack/recipes-devtools/python/python-cliff_1.3.2.bb +++ /dev/null @@ -1,22 +0,0 @@ -DESCRIPTION = "Command Line Interface Formulation Framework" -HOMEPAGE = "https://github.com/dreamhost/cliff" -SECTION = "devel/python" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -PR = "r0" -SRCNAME = "cliff" - -SRC_URI = "https://pypi.python.org/packages/source/c/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \ - file://remove-distribute-dependency.patch" - -SRC_URI[md5sum] = "a42f7894dbc70f42c0979042175f1b8f" -SRC_URI[sha256sum] = "7c0250b5139993d04dcbb8b9d05376094b7271586b3698b4764c7c6f4697e0f8" - -S = "${WORKDIR}/${SRCNAME}-${PV}" - -inherit setuptools - -RDEPENDS_${PN} += "python-prettytable \ - python-cmd2 \ - python-pyparsing" diff --git a/meta-openstack/recipes-devtools/python/python-cliff_1.4.5.bb b/meta-openstack/recipes-devtools/python/python-cliff_1.4.5.bb new file mode 100644 index 0000000..793ceca --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-cliff_1.4.5.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "Command Line Interface Formulation Framework" +HOMEPAGE = "https://github.com/dreamhost/cliff" +SECTION = "devel/python" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +PR = "r0" +SRCNAME = "cliff" + +SRC_URI = "https://pypi.python.org/packages/source/c/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "21743e9e800cf526e88e420f366a4c5c" +SRC_URI[sha256sum] = "0ec2c40e899cbb4d478aa946e1430600bf596ca2a3f12162a9514e9d580935ec" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +RDEPENDS_${PN} += "python-prettytable \ + python-cmd2 \ + python-pyparsing" -- cgit v1.2.3-54-g00ecf From da37bcc10e441a0e4261522696d6f916b4b83e25 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Wed, 27 Nov 2013 11:13:18 -0500 Subject: python-cmd2: uprev to meet havana nova-api requirements Signed-off-by: Bruce Ashfield --- .../recipes-devtools/python/python-cmd2_0.6.4.bb | 19 ------------------- .../recipes-devtools/python/python-cmd2_0.6.7.bb | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 meta-openstack/recipes-devtools/python/python-cmd2_0.6.4.bb create mode 100644 meta-openstack/recipes-devtools/python/python-cmd2_0.6.7.bb (limited to 'meta-openstack/recipes-devtools/python') diff --git a/meta-openstack/recipes-devtools/python/python-cmd2_0.6.4.bb b/meta-openstack/recipes-devtools/python/python-cmd2_0.6.4.bb deleted file mode 100644 index bce95a4..0000000 --- a/meta-openstack/recipes-devtools/python/python-cmd2_0.6.4.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "Extra features for standard library's cmd module" -HOMEPAGE = "http://packages.python.org/cmd2/" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://setup.py;beginline=21;endline=21;md5=25c0f7ede01b1eab41daf880e5791f05" - -PR = "r0" -SRCNAME = "cmd2" - -SRC_URI = "http://pypi.python.org/packages/source/c/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" - -SRC_URI[md5sum] = "60a07255bbcb4342888b1574f46e56ea" -SRC_URI[sha256sum] = "ff52cb800d931bbd0ce4b05bac0b024cf34ec3a04f66eadcb7d3f7dda42429ba" - -S = "${WORKDIR}/${SRCNAME}-${PV}" - -inherit setuptools - -RDEPENDS_${PN} += "python-pyparsing" diff --git a/meta-openstack/recipes-devtools/python/python-cmd2_0.6.7.bb b/meta-openstack/recipes-devtools/python/python-cmd2_0.6.7.bb new file mode 100644 index 0000000..9558cc6 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-cmd2_0.6.7.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Extra features for standard library's cmd module" +HOMEPAGE = "http://packages.python.org/cmd2/" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://setup.py;beginline=21;endline=21;md5=a00047b7e92e0781452d0beba4e7b44e" + +PR = "r0" +SRCNAME = "cmd2" + +SRC_URI = "http://pypi.python.org/packages/source/c/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "842df29ff2f72d64d7f0d917039c0e51" +SRC_URI[sha256sum] = "8e98c7a1cfd106183559240b269e7cd9fe97e8342b5c05295f591aab6fd2f4f0" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +RDEPENDS_${PN} += "python-pyparsing" -- cgit v1.2.3-54-g00ecf From c158209a05d11cdfaf35b13888151777eaf41dba Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Wed, 27 Nov 2013 11:13:49 -0500 Subject: python-pyparsing: uprev to meet havana nova-api requirements Signed-off-by: Bruce Ashfield --- .../recipes-devtools/python/python-pyparsing_1.5.7.bb | 17 ----------------- .../recipes-devtools/python/python-pyparsing_2.0.1.bb | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 meta-openstack/recipes-devtools/python/python-pyparsing_1.5.7.bb create mode 100644 meta-openstack/recipes-devtools/python/python-pyparsing_2.0.1.bb (limited to 'meta-openstack/recipes-devtools/python') diff --git a/meta-openstack/recipes-devtools/python/python-pyparsing_1.5.7.bb b/meta-openstack/recipes-devtools/python/python-pyparsing_1.5.7.bb deleted file mode 100644 index 6db9dbf..0000000 --- a/meta-openstack/recipes-devtools/python/python-pyparsing_1.5.7.bb +++ /dev/null @@ -1,17 +0,0 @@ -DESCRIPTION = "Python parsing module" -HOMEPAGE = "http://pyparsing.wikispaces.com/" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=fb46329938e6bc829b256e37d5c1e31a" - -PR = "r0" -SRCNAME = "pyparsing" - -SRC_URI = "http://pypi.python.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.zip" - -SRC_URI[md5sum] = "b86854857a368d6ccb4d5b6e76d0637f" -SRC_URI[sha256sum] = "8a6329d4679fb249d4e0a4afbae6e041f9abbc299920d6efe5d8c4e9fb1407bc" - -S = "${WORKDIR}/${SRCNAME}-${PV}" - -inherit distutils diff --git a/meta-openstack/recipes-devtools/python/python-pyparsing_2.0.1.bb b/meta-openstack/recipes-devtools/python/python-pyparsing_2.0.1.bb new file mode 100644 index 0000000..32d9ebb --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-pyparsing_2.0.1.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Python parsing module" +HOMEPAGE = "http://pyparsing.wikispaces.com/" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fb46329938e6bc829b256e37d5c1e31a" + +PR = "r0" +SRCNAME = "pyparsing" + +SRC_URI = "http://pypi.python.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.zip" + +SRC_URI[md5sum] = "dc7036a6f1ab01c3baed3d97af8d77c0" +SRC_URI[sha256sum] = "7e1766ee747cca79fe172b670fd53ef58fc55d2b1804fd6c66d857abb62d143a" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit distutils -- cgit v1.2.3-54-g00ecf From 811633754e5cf5e51b26c569f650d3fd115cb089 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Thu, 28 Nov 2013 23:28:04 -0500 Subject: python-nova: run services as nova user instead of root With this change we now run both the nova controller services and compute node agents as the dedicated "nova" user. Changes to configuration were made to relocated locks and logs to nova writeable directories. Wherever possible configuration files and directories have been changed to nova instead of root (with the notable exception of rootwrap configuration). nova has also been granted sudo privileges to run rootwrap commands. And finally, a libvirt system group has been created and nova added to that group. This allows the compute agent to communicate with libvirtd via the "libvirt" group while keeping permissions tight. Signed-off-by: Bruce Ashfield --- .../recipes-devtools/python/python-nova/nova.conf | 2 ++ .../recipes-devtools/python/python-nova/nova.init | 3 ++- .../recipes-devtools/python/python-nova_git.bb | 20 +++++++++++++------- .../recipes-extended/libvirt/libvirt_1.1.2.bbappend | 9 +++++++++ 4 files changed, 26 insertions(+), 8 deletions(-) (limited to 'meta-openstack/recipes-devtools/python') diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova.conf b/meta-openstack/recipes-devtools/python/python-nova/nova.conf index a495a7d..84ef48b 100644 --- a/meta-openstack/recipes-devtools/python/python-nova/nova.conf +++ b/meta-openstack/recipes-devtools/python/python-nova/nova.conf @@ -19,6 +19,8 @@ debug = True verbose = True my_ip = %CONTROLLER_IP% glance_host = %CONTROLLER_IP% +lock_path=/var/lock/nova/ +state_path=/var/run/nova/ #VNC vnc_enabled = true diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova.init b/meta-openstack/recipes-devtools/python/python-nova/nova.init index 3a2bbac..c2882b6 100644 --- a/meta-openstack/recipes-devtools/python/python-nova/nova.init +++ b/meta-openstack/recipes-devtools/python/python-nova/nova.init @@ -30,7 +30,8 @@ start () echo -n "Starting $DESC..." - start-stop-daemon --start --quiet --background \ + sudo -u nova \ + start-stop-daemon --start --quiet --background \ --pidfile ${PIDFILE} --make-pidfile --exec ${DAEMON} if [ $? -eq 0 ]; then diff --git a/meta-openstack/recipes-devtools/python/python-nova_git.bb b/meta-openstack/recipes-devtools/python/python-nova_git.bb index 6a065cb..dd199a7 100644 --- a/meta-openstack/recipes-devtools/python/python-nova_git.bb +++ b/meta-openstack/recipes-devtools/python/python-nova_git.bb @@ -38,7 +38,7 @@ do_install_append() { NOVA_CONF_DIR=${D}/${sysconfdir}/nova install -d ${NOVA_CONF_DIR} - install -m 600 ${S}/etc/nova/policy.json ${NOVA_CONF_DIR}/ + install -o nova -m 664 ${S}/etc/nova/policy.json ${NOVA_CONF_DIR}/ # Deploy filters to /etc/nova/rootwrap.d install -m 755 -d ${NOVA_CONF_DIR}/rootwrap.d @@ -57,8 +57,12 @@ do_install_append() { touch ${D}${sysconfdir}/sudoers.d/nova-rootwrap chmod 0440 ${D}${sysconfdir}/sudoers.d/nova-rootwrap chown root:root ${D}${sysconfdir}/sudoers.d/nova-rootwrap + # root user setup echo "root ALL=(root) NOPASSWD: ${bindir}/nova-rootwrap" > \ ${D}${sysconfdir}/sudoers.d/nova-rootwrap + # nova user setup + echo "nova ALL=(root) NOPASSWD: ${bindir}/nova-rootwrap ${sysconfdir}/nova/rootwrap.conf *" >> \ + ${D}${sysconfdir}/sudoers.d/nova-rootwrap # Configuration options sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ @@ -84,11 +88,11 @@ do_install_append() { sed -e "s:%CONTROLLER_HOST%:${CONTROLLER_HOST}:g" -i ${WORKDIR}/openrc # Copy the configuration file - install -m 664 ${WORKDIR}/nova.conf ${NOVA_CONF_DIR}/nova.conf - install -m 664 ${WORKDIR}/api-paste.ini ${NOVA_CONF_DIR} - install -m 664 ${WORKDIR}/openrc ${NOVA_CONF_DIR} + install -o nova -m 664 ${WORKDIR}/nova.conf ${NOVA_CONF_DIR}/nova.conf + install -o nova -m 664 ${WORKDIR}/api-paste.ini ${NOVA_CONF_DIR} + install -o nova -m 664 ${WORKDIR}/openrc ${NOVA_CONF_DIR} - install -d ${NOVA_CONF_DIR}/instances + install -o nova -d ${NOVA_CONF_DIR}/instances if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/init.d @@ -136,7 +140,7 @@ pkg_postinst_${SRCNAME}-common () { USERADD_PACKAGES = "${PN}" GROUPADD_PARAM_${PN} = "--system nova" -USERADD_PARAM_${PN} = "--system --home /var/lib/nova -g nova \ +USERADD_PARAM_${PN} = "--system --home /var/lib/nova -g nova -G libvirt \ --no-create-home --shell /bin/false nova" PACKAGES += " ${SRCNAME}-setup ${SRCNAME}-common ${SRCNAME}-compute ${SRCNAME}-controller" @@ -185,7 +189,8 @@ FILES_${SRCNAME}-api = " \ ${sysconfdir}/init.d/nova-api \ " -RDEPENDS_${PN} = " python-modules \ +RDEPENDS_${PN} = " libvirt \ + python-modules \ python-misc \ python-argparse \ python-amqplib \ @@ -193,6 +198,7 @@ RDEPENDS_${PN} = " python-modules \ python-babel \ python-boto \ python-cinderclient \ + python-cliff \ python-cheetah \ python-eventlet \ python-feedparser \ diff --git a/meta-openstack/recipes-extended/libvirt/libvirt_1.1.2.bbappend b/meta-openstack/recipes-extended/libvirt/libvirt_1.1.2.bbappend index 3a6634e..eb7a921 100644 --- a/meta-openstack/recipes-extended/libvirt/libvirt_1.1.2.bbappend +++ b/meta-openstack/recipes-extended/libvirt/libvirt_1.1.2.bbappend @@ -2,3 +2,12 @@ PACKAGECONFIG ?= "qemu lxc test remote macvtap libvirtd udev yajl \ python numactl sanlock ebtables \ ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ " + +inherit useradd +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system libvirt" + +do_install_append() { + sed -e "s:^#unix_sock_group =:unix_sock_group =:g" -i ${D}/etc/libvirt/libvirtd.conf + sed -e "s:^#unix_sock_rw_perms =:unix_sock_rw_perms =:g" -i ${D}/etc/libvirt/libvirtd.conf +} -- cgit v1.2.3-54-g00ecf From 6e5ff0a599e4e181a524b94447bcf0a054055e23 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Mon, 2 Dec 2013 16:05:45 -0500 Subject: openstack: update bbappends to match oe-core/meta-networing/meta-virtualization master Signed-off-by: Bruce Ashfield --- .../recipes-devtools/python/python-setuptools_1.4.bbappend | 4 ++++ meta-openstack/recipes-support/dnsmasq/dnsmasq_2.63.bbappend | 9 +++++++++ meta-openstack/recipes-support/iproute2/iproute2_3.11.0.bbappend | 2 ++ 3 files changed, 15 insertions(+) create mode 100644 meta-openstack/recipes-devtools/python/python-setuptools_1.4.bbappend create mode 100644 meta-openstack/recipes-support/dnsmasq/dnsmasq_2.63.bbappend create mode 100644 meta-openstack/recipes-support/iproute2/iproute2_3.11.0.bbappend (limited to 'meta-openstack/recipes-devtools/python') diff --git a/meta-openstack/recipes-devtools/python/python-setuptools_1.4.bbappend b/meta-openstack/recipes-devtools/python/python-setuptools_1.4.bbappend new file mode 100644 index 0000000..3c691d3 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-setuptools_1.4.bbappend @@ -0,0 +1,4 @@ +# conflicting file prevention +do_install_append() { + rm -f ${D}${libdir}/python*/site-packages/site.py* +} \ No newline at end of file diff --git a/meta-openstack/recipes-support/dnsmasq/dnsmasq_2.63.bbappend b/meta-openstack/recipes-support/dnsmasq/dnsmasq_2.63.bbappend new file mode 100644 index 0000000..52eab54 --- /dev/null +++ b/meta-openstack/recipes-support/dnsmasq/dnsmasq_2.63.bbappend @@ -0,0 +1,9 @@ +do_install_append() { + cd ${S}/contrib/wrt + oe_runmake + + install -m 0755 ${S}/contrib/wrt/dhcp_release ${D}${bindir} + + # Remove /var/run as it is created on startup + rm -rf ${D}${localstatedir}/run +} diff --git a/meta-openstack/recipes-support/iproute2/iproute2_3.11.0.bbappend b/meta-openstack/recipes-support/iproute2/iproute2_3.11.0.bbappend new file mode 100644 index 0000000..34ad5b8 --- /dev/null +++ b/meta-openstack/recipes-support/iproute2/iproute2_3.11.0.bbappend @@ -0,0 +1,2 @@ +RRECOMMENDS_${PN} += "kernel-module-veth \ + " -- cgit v1.2.3-54-g00ecf From e0927d68cb468b43238c799d27237f4649f45e34 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Mon, 2 Dec 2013 19:08:50 -0500 Subject: python-nova: add libvirt to DEPENDS Since python-nova uses the group "libvirt", which is created by the libvirt recipe, we must specify libvirt explicitly in DEPENDS. Signed-off-by: Bruce Ashfield --- meta-openstack/recipes-devtools/python/python-nova_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta-openstack/recipes-devtools/python') diff --git a/meta-openstack/recipes-devtools/python/python-nova_git.bb b/meta-openstack/recipes-devtools/python/python-nova_git.bb index dd199a7..9fb1daa 100644 --- a/meta-openstack/recipes-devtools/python/python-nova_git.bb +++ b/meta-openstack/recipes-devtools/python/python-nova_git.bb @@ -4,7 +4,7 @@ SECTION = "devel/python" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2" -DEPENDS = "sudo" +DEPENDS = "sudo libvirt" PR = "r0" SRCNAME = "nova" -- cgit v1.2.3-54-g00ecf