diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-09-02 14:09:07 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-09-02 14:09:07 +0100 |
commit | b17a3ef12038de50228bade1f05502c74e135321 (patch) | |
tree | 9026dffec53f92cba48ca9a500a4f778e6304380 /sys-cluster/nova | |
parent | 3cf7c3ef441822c889356fd1812ebf2944a59851 (diff) |
gentoo resync : 02.09.2020
Diffstat (limited to 'sys-cluster/nova')
-rw-r--r-- | sys-cluster/nova/Manifest | 6 | ||||
-rw-r--r-- | sys-cluster/nova/files/CVE-2020-17376.patch | 141 | ||||
-rw-r--r-- | sys-cluster/nova/nova-21.0.0-r1.ebuild (renamed from sys-cluster/nova/nova-21.0.0.ebuild) | 5 | ||||
-rw-r--r-- | sys-cluster/nova/nova-21.1.0.ebuild | 217 |
4 files changed, 366 insertions, 3 deletions
diff --git a/sys-cluster/nova/Manifest b/sys-cluster/nova/Manifest index 28fb6fb6578b..1d2dbcd2e897 100644 --- a/sys-cluster/nova/Manifest +++ b/sys-cluster/nova/Manifest @@ -1,11 +1,15 @@ +AUX CVE-2020-17376.patch 6260 BLAKE2B 259dee33c711fb532175cc0f8b445cca5e77949e6c6c225363d5fa9a8b4ebcdb10189f64da9b5d8e4c83ef48ed95a37fd981972b0dfb63a1688e1eea21605cb5 SHA512 aa0e05ecd47b9290cf4d7d7f63ecba1a89b41b6d54a13ea6dbc74f979fc58147a94d7ea54a620550ac0ccf5beef6d3fbe41c39a84b88a6626084effda0e69fea AUX nova-compute.conf 144 BLAKE2B d7e7d6fc972243b49e82a70ee9798a9f44cf78709105b785073cfcf3de71d1e94de6574af6529363c1f5ff8f2029dcea2cb71aeab52964b73674cfc9d498accc SHA512 88d7207f4d7008e909c276f153e2abd66c2fb34fad85c90fe0bcc65a10f9c9c619ac315aee25e486e85896a2dfdc97eda4c9d2c78bd8b4117eaac7d8ebfb0270 AUX nova-sudoers 78 BLAKE2B d2df2db0a2905e3a6aec56dc70afab046933d675715c9c16f0e960cd2c086df1def3a87ccd6ebd0719a16fc66a084e018e8b5b9e7b95be6f90abad6600509756 SHA512 22c0606c6335b2d1a03bd18a319a54f16f76f091b2e8416dbba05ce7c15890beff7f32f0322eb5ba3f2a5c750436cacbe0cee189b390b878e3f0c0df219ef984 AUX nova.initd 747 BLAKE2B 2a20a632fcb66001e68f4d70fa11ba179db9b06a6f412115d7b89a7ac8cff0f897fc224e44e74f80f6b1ddfb7d44c8b399fc442ca2bc3b904a418d0765c240bd SHA512 938300464971847b0d14eb0e54c6443d0041a46d39b276642479cb3d0d9370480f7eb7aa8c20512609c5bf4f6fc54438b451ac4986ad7c93ef8ee5b966c7f2a3 AUX openstack-scsi-disk.rules 134 BLAKE2B c1e3e150d93ab51b4da48caf2a0f83513fe63b5dde1e449a9c4c4dbfad65589b6326c799958736da86390142a914acbf9acf5b78bb1042e2c156eaf01cec8250 SHA512 6c3734d0b9ce9de887e15b1ddd5f5486dd1d0a55f463f9824ef067d3fe64a93d08ad2ef2b9d288f0dd42d570a5061e7a06976f7223df44b98bd321b73f9d036b AUX scsi-openscsi-link.sh 2777 BLAKE2B 84c14df2b1c49fe6210a4abf4387229aaa4fcd0c956b374b719285a20d8309f1bb58d51061084f34d284624d279bc64d53a629ec57702314c23e9b129c4a16b4 SHA512 3e7f6fc872f27b6a4d6c991346bd8eafcbc8f2b74439f1c77e93362e57fa1010ff002813cf21bf12d0550bfc165f79c70430862cd4ed5aaa15056777baf34409 DIST nova-21.0.0.tar.gz 9193053 BLAKE2B efc95ac54a18a7df1530fc61e2478d59e5711e4c2da0156c405945a9a0ccd533255e2733d626f28f3460238cf157d802b79a8573f570623024089dd86ac23abc SHA512 a006a47f10d141df8a2495ae81c98bd0bf7af0b1f790627ba929e9b3e2931e438259f96d8c9391b9717126778f3f72f0bde01db5245bdbe801077fd884ba5a89 +DIST nova-21.1.0.tar.gz 9213435 BLAKE2B e84bc5131c4bd5ca50ab2783b8b6c606eac0abdaf622fb9a32b9c86fb91ac569f92459da199b4d4bbf679710e593f7ce5539c7f85f89446a463064a108b58d3b SHA512 abb6db64bf25806a9037df1b54bb5874e0599654b8cabafbb6ac659358124a5aa62668117e0a529677e1997d7d89b4265fbb9de4613f28d00d71bdfc4e94c471 DIST nova.conf.sample-2020.1.9999 191182 BLAKE2B 99999b1b42b9ecc6a7f404c9874c5065591dfd8e896c97d261307f7f3b5e935e12db1b4650182660cf1eb97bcfb993d41a1f89e079120adc00b339b5a4ac1c98 SHA512 af22ba8dcfbafdb07ba2785bdcb40efd201adb81d47bee15ee11bb76437bc7a5b7c88390f995432ffa92b64b849df754bd15264e97530334f3eac6f8f93e828d DIST nova.conf.sample-21.0.0 191182 BLAKE2B 99999b1b42b9ecc6a7f404c9874c5065591dfd8e896c97d261307f7f3b5e935e12db1b4650182660cf1eb97bcfb993d41a1f89e079120adc00b339b5a4ac1c98 SHA512 af22ba8dcfbafdb07ba2785bdcb40efd201adb81d47bee15ee11bb76437bc7a5b7c88390f995432ffa92b64b849df754bd15264e97530334f3eac6f8f93e828d +DIST nova.conf.sample-21.1.0 191182 BLAKE2B 99999b1b42b9ecc6a7f404c9874c5065591dfd8e896c97d261307f7f3b5e935e12db1b4650182660cf1eb97bcfb993d41a1f89e079120adc00b339b5a4ac1c98 SHA512 af22ba8dcfbafdb07ba2785bdcb40efd201adb81d47bee15ee11bb76437bc7a5b7c88390f995432ffa92b64b849df754bd15264e97530334f3eac6f8f93e828d EBUILD nova-2020.1.9999.ebuild 7628 BLAKE2B 3486d8ff71c4e70391cd416b6ef0cdf346ea8676d79cf594abaae8ea0f91dbe77a9a4a7fc720cbd4c6f910be91180b25251fa196878a33b4c8d114bb382c7e2a SHA512 d2a507f1fa6a00c2260f837cec8f02d6b151efbc7a50aecb6d50f30c1e56bd3cc708245ff7dec1a2d1a2601fb7a12a028a00ab3a7e75ff015500640c4b00c26a -EBUILD nova-21.0.0.ebuild 7626 BLAKE2B 0b6038133b804d49d5164fc5cf6ef28bdba54c058f77a869a8c89d3c2658e534379808d0294f37eb0a42170980beb43b37244f23f4533f858f442e6aaae59e50 SHA512 06b0649cfcb1233e45a24f033e330dc29434b66f4ca263c8f9757940cb1b93db8ce8dd51068a3c19a16a6e394b0805f43b24b8cb9f665cd52d51e8d8d1f1e843 +EBUILD nova-21.0.0-r1.ebuild 7660 BLAKE2B 3f78ed2930e81c882d17e64f1a4e3cb76e49bd8c61a5e9af59299f4d9d52b823266f35dee73262639ab4c8d6ebce52ffad08981ac887c9911774e7127ea5884b SHA512 66e2594c754752715820ce4679a5e2ce5ad3414f66169e778c51f70488c9a49d73a7595db005d5a314333030ec05ca5995c2ef9c84c8342a3ed6097cf705e563 +EBUILD nova-21.1.0.ebuild 7653 BLAKE2B 0eb9a06982266d64a505ae021939ca933ed504335318324a6587e56e6af8ecae55cf12fb98944abbf5c94bfaf89a424ad3f011e067257cd6a3d18ac0759e7bab SHA512 09e0b4650488aad403adad1436cef1a9afe328d3bcd50153b5aec17f85cdc5ef4958ea47d4e40af45f0312e64e0b64626d04c73c784fb21e3ed7dc6d55028720 MISC metadata.xml 1172 BLAKE2B aa85fe6bed1e40717884d721c2633c5f6d380914c69cb8a4a4c31b3e4c779db52b90fdaa5ee63b66ad9bc6694f666dd37dceeffb8de4676014ef3bb688476ef7 SHA512 bb506fa680b064c3d6a48710cac11efedc9e8a340603e234bf5c4c48aaab773e4527d7a8fc66ae36ec894230a1d02a5be995e521d222914f652e03b6f72642e4 diff --git a/sys-cluster/nova/files/CVE-2020-17376.patch b/sys-cluster/nova/files/CVE-2020-17376.patch new file mode 100644 index 000000000000..8cb2d4423f72 --- /dev/null +++ b/sys-cluster/nova/files/CVE-2020-17376.patch @@ -0,0 +1,141 @@ +From bbf9d1de06e9991acd968fceee899a8df3776d60 Mon Sep 17 00:00:00 2001 +From: Lee Yarwood <lyarwood@redhat.com> +Date: Wed, 5 Aug 2020 23:00:06 +0100 +Subject: [PATCH] libvirt: Provide VIR_MIGRATE_PARAM_PERSIST_XML during live + migration + +The VIR_MIGRATE_PARAM_PERSIST_XML parameter was introduced in libvirt +v1.3.4 and is used to provide the new persistent configuration for the +destination during a live migration: + +https://libvirt.org/html/libvirt-libvirt-domain.html#VIR_MIGRATE_PARAM_PERSIST_XML + +Without this parameter the persistent configuration on the destination +will be the same as the original persistent configuration on the source +when the VIR_MIGRATE_PERSIST_DEST flag is provided. + +As Nova does not currently provide the VIR_MIGRATE_PARAM_PERSIST_XML +param but does provide the VIR_MIGRATE_PERSIST_DEST flag this means that +a soft reboot by Nova of the instance after a live migration can revert +the domain back to the original persistent configuration from the +source. + +Note that this is only possible in Nova as a soft reboot actually +results in the virDomainShutdown and virDomainLaunch libvirt APIs being +called that recreate the domain using the persistent configuration. +virDomainReboot does not result in this but is not called at this time. + +The impact of this on the instance after the soft reboot is pretty +severe, host devices referenced in the original persistent configuration +on the source may not exist or could even be used by other users on the +destination. CPU and NUMA affinity could also differ drastically between +the two hosts resulting in the instance being unable to start etc. + +As MIN_LIBVIRT_VERSION is now > v1.3.4 this change simply includes the +VIR_MIGRATE_PARAM_PERSIST_XML param using the same updated XML for the +destination as is already provided to VIR_MIGRATE_PARAM_DEST_XML. + +NOTE(lyarwood): A simple change to test_migrate_v3_unicode is included +as Iccce0ab50eee515e533ab36c8e7adc10cb3f7019 had removed this from +master. + +Co-authored-by: Tadayoshi Hosoya <tad-hosoya@wr.jp.nec.com> +Closes-Bug: #1890501 +Change-Id: Ia3f1d8e83cbc574ce5cb440032e12bbcb1e10e98 +(cherry picked from commit 1bb8ee95d4c3ddc3f607ac57526b75af1b7fbcff) +Signed-off-by: Matthew Thode <prometheanfire@gentoo.org> +--- + nova/tests/unit/virt/libvirt/test_driver.py | 8 +++++++- + nova/tests/unit/virt/libvirt/test_guest.py | 2 ++ + nova/virt/libvirt/guest.py | 1 + + 3 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/nova/tests/unit/virt/libvirt/test_driver.py b/nova/tests/unit/virt/libvirt/test_driver.py +index b416641d362..99ce85a870b 100644 +--- a/nova/tests/unit/virt/libvirt/test_driver.py ++++ b/nova/tests/unit/virt/libvirt/test_driver.py +@@ -11196,6 +11196,7 @@ class LibvirtConnTestCase(test.NoDBTestCase, + 'migrate_disks': disk_paths, + 'bandwidth': _bandwidth, + 'destination_xml': target_xml, ++ 'persistent_xml': target_xml, + } + + # start test +@@ -11303,7 +11304,8 @@ class LibvirtConnTestCase(test.NoDBTestCase, + 'migrate_disks': disk_paths, + 'migrate_uri': 'tcp://127.0.0.2', + 'bandwidth': CONF.libvirt.live_migration_bandwidth, +- 'destination_xml': target_xml ++ 'destination_xml': target_xml, ++ 'persistent_xml': target_xml, + } + + # Start test +@@ -11462,6 +11464,7 @@ class LibvirtConnTestCase(test.NoDBTestCase, + 'migrate_uri': 'tcp://127.0.0.2', + 'bandwidth': CONF.libvirt.live_migration_bandwidth, + 'destination_xml': target_xml, ++ 'persistent_xml': target_xml, + } + + # start test +@@ -11813,6 +11816,7 @@ class LibvirtConnTestCase(test.NoDBTestCase, + 'migrate_disks': ['vda', 'vdb'], + 'bandwidth': CONF.libvirt.live_migration_bandwidth, + 'destination_xml': target_xml, ++ 'persistent_xml': target_xml, + } + + # start test +@@ -11939,6 +11943,7 @@ class LibvirtConnTestCase(test.NoDBTestCase, + 'migrate_disks': device_names, + 'bandwidth': CONF.libvirt.live_migration_bandwidth, + 'destination_xml': '<xml/>', ++ 'persistent_xml': '<xml/>', + } + if not params['migrate_disks']: + del params['migrate_disks'] +@@ -12078,6 +12083,7 @@ class LibvirtConnTestCase(test.NoDBTestCase, + 'migrate_disks': disk_paths, + 'bandwidth': CONF.libvirt.live_migration_bandwidth, + 'destination_xml': '<xml/>', ++ 'persistent_xml': '<xml/>', + } + + # Prepare mocks +diff --git a/nova/tests/unit/virt/libvirt/test_guest.py b/nova/tests/unit/virt/libvirt/test_guest.py +index 55642c66f66..51899b730b3 100644 +--- a/nova/tests/unit/virt/libvirt/test_guest.py ++++ b/nova/tests/unit/virt/libvirt/test_guest.py +@@ -682,6 +682,7 @@ class GuestTestCase(test.NoDBTestCase): + 'an-uri', flags=1, params={'migrate_uri': 'dest-uri', + 'migrate_disks': 'disk1', + 'destination_xml': '</xml>', ++ 'persistent_xml': '</xml>', + 'bandwidth': 2}) + + @testtools.skipIf(not six.PY2, 'libvirt python3 bindings accept unicode') +@@ -699,6 +700,7 @@ class GuestTestCase(test.NoDBTestCase): + 'migrate_disks': ['disk1', + 'disk2'], + 'destination_xml': expect_dest_xml, ++ 'persistent_xml': expect_dest_xml, + 'bandwidth': 2}) + + def test_abort_job(self): +diff --git a/nova/virt/libvirt/guest.py b/nova/virt/libvirt/guest.py +index 0d485eb86d9..46593247303 100644 +--- a/nova/virt/libvirt/guest.py ++++ b/nova/virt/libvirt/guest.py +@@ -638,6 +638,7 @@ class Guest(object): + + if destination_xml: + params['destination_xml'] = destination_xml ++ params['persistent_xml'] = destination_xml + if migrate_disks: + params['migrate_disks'] = migrate_disks + if migrate_uri: +-- +2.26.2 + diff --git a/sys-cluster/nova/nova-21.0.0.ebuild b/sys-cluster/nova/nova-21.0.0-r1.ebuild index 8601ad73fd10..e96174c2c999 100644 --- a/sys-cluster/nova/nova-21.0.0.ebuild +++ b/sys-cluster/nova/nova-21.0.0-r1.ebuild @@ -148,8 +148,9 @@ RDEPEND=" acct-user/nova acct-group/nova" -#PATCHES=( -#) +PATCHES=( + "${FILESDIR}/CVE-2020-17376.patch" +) pkg_setup() { linux-info_pkg_setup diff --git a/sys-cluster/nova/nova-21.1.0.ebuild b/sys-cluster/nova/nova-21.1.0.ebuild new file mode 100644 index 000000000000..7d6ad9d9a1d9 --- /dev/null +++ b/sys-cluster/nova/nova-21.1.0.ebuild @@ -0,0 +1,217 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_7 ) +inherit distutils-r1 eutils linux-info multilib + +DESCRIPTION="Cloud computing fabric controller" +HOMEPAGE="https://launchpad.net/nova" + +if [[ ${PV} == *9999 ]];then + inherit git-r3 + SRC_URI="https://dev.gentoo.org/~prometheanfire/dist/openstack/nova/ussuri/nova.conf.sample -> nova.conf.sample-${PV}" + EGIT_REPO_URI="https://github.com/openstack/nova.git" + EGIT_BRANCH="stable/ussuri" +else + SRC_URI="https://dev.gentoo.org/~prometheanfire/dist/openstack/nova/ussuri/nova.conf.sample -> nova.conf.sample-${PV} + https://tarballs.openstack.org/${PN}/${P}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~x86" +fi + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="+compute compute-only iscsi +memcached +mysql +novncproxy openvswitch postgres +rabbitmq sqlite" +REQUIRED_USE=" + !compute-only? ( || ( mysql postgres sqlite ) ) + compute-only? ( compute !rabbitmq !memcached !mysql !postgres !sqlite )" + +CDEPEND=" + >=dev-python/pbr-2.0.0[${PYTHON_USEDEP}] + !~dev-python/pbr-2.1.0[${PYTHON_USEDEP}]" +DEPEND=" + ${CDEPEND} + app-admin/sudo" + +RDEPEND=" + ${CDEPEND} + compute-only? ( + >=dev-python/sqlalchemy-1.2.19[${PYTHON_USEDEP}] + ) + sqlite? ( + >=dev-python/sqlalchemy-1.2.19[sqlite,${PYTHON_USEDEP}] + ) + mysql? ( + >=dev-python/pymysql-0.7.6[${PYTHON_USEDEP}] + !~dev-python/pymysql-0.7.7[${PYTHON_USEDEP}] + >=dev-python/sqlalchemy-1.2.19[${PYTHON_USEDEP}] + ) + postgres? ( + >=dev-python/psycopg-2.5.0[${PYTHON_USEDEP}] + >=dev-python/sqlalchemy-1.2.19[${PYTHON_USEDEP}] + ) + >=dev-python/decorator-3.4.0[${PYTHON_USEDEP}] + >=dev-python/eventlet-0.20.0[${PYTHON_USEDEP}] + !~dev-python/eventlet-0.20.1[${PYTHON_USEDEP}] + >=dev-python/jinja-2.10[${PYTHON_USEDEP}] + >=dev-python/keystonemiddleware-4.17.0[${PYTHON_USEDEP}] + >=dev-python/lxml-2.4.1[${PYTHON_USEDEP}] + !~dev-python/lxml-3.7.0[${PYTHON_USEDEP}] + >=dev-python/routes-2.3.1[${PYTHON_USEDEP}] + >=dev-python/cryptography-2.7[${PYTHON_USEDEP}] + >=dev-python/webob-1.8.2[${PYTHON_USEDEP}] + >=dev-python/greenlet-0.4.10[${PYTHON_USEDEP}] + !~dev-python/greenlet-0.4.14[${PYTHON_USEDEP}] + >=dev-python/pastedeploy-1.5.0-r1[${PYTHON_USEDEP}] + >=dev-python/paste-2.0.2[${PYTHON_USEDEP}] + >=dev-python/prettytable-0.7.1[${PYTHON_USEDEP}] + <dev-python/prettytable-0.8[${PYTHON_USEDEP}] + >=dev-python/sqlalchemy-migrate-0.13.0[${PYTHON_USEDEP}] + >=dev-python/netaddr-0.7.18[${PYTHON_USEDEP}] + >=dev-python/netifaces-0.10.4[${PYTHON_USEDEP}] + >=dev-python/paramiko-2.0.0[${PYTHON_USEDEP}] + >=dev-python/Babel-2.3.4[${PYTHON_USEDEP}] + !~dev-python/Babel-2.4.0[${PYTHON_USEDEP}] + >=dev-python/iso8601-0.1.11[${PYTHON_USEDEP}] + >=dev-python/jsonschema-2.6.0[${PYTHON_USEDEP}] + >=dev-python/python-cinderclient-3.3.0[${PYTHON_USEDEP}] + !~dev-python/python-cinderclient-4.0.0[${PYTHON_USEDEP}] + >=dev-python/keystoneauth-3.16.0[${PYTHON_USEDEP}] + >=dev-python/python-neutronclient-6.7.0[${PYTHON_USEDEP}] + >=dev-python/python-glanceclient-2.8.0[${PYTHON_USEDEP}] + >=dev-python/requests-2.14.2[${PYTHON_USEDEP}] + >=dev-python/six-1.10.0[${PYTHON_USEDEP}] + >=dev-python/stevedore-1.20.0[${PYTHON_USEDEP}] + >=dev-python/websockify-0.9.0[${PYTHON_USEDEP}] + >=dev-python/oslo-cache-1.26.0[${PYTHON_USEDEP}] + >=dev-python/oslo-concurrency-3.29.0[${PYTHON_USEDEP}] + >=dev-python/oslo-config-6.1.0[${PYTHON_USEDEP}] + >=dev-python/oslo-context-2.21.0[${PYTHON_USEDEP}] + >=dev-python/oslo-log-3.36.0[${PYTHON_USEDEP}] + >=dev-python/oslo-reports-1.18.0[${PYTHON_USEDEP}] + >=dev-python/oslo-serialization-1.21.0[${PYTHON_USEDEP}] + >=dev-python/oslo-upgradecheck-0.1.1[${PYTHON_USEDEP}] + !~dev-python/oslo-serialization-2.19.1[${PYTHON_USEDEP}] + >=dev-python/oslo-utils-4.1.0[${PYTHON_USEDEP}] + >=dev-python/oslo-db-4.44.0[${PYTHON_USEDEP}] + >=dev-python/oslo-rootwrap-5.8.0[${PYTHON_USEDEP}] + >=dev-python/oslo-messaging-10.3.0[${PYTHON_USEDEP}] + >=dev-python/oslo-policy-3.1.0[${PYTHON_USEDEP}] + >=dev-python/oslo-privsep-1.33.2[${PYTHON_USEDEP}] + >=dev-python/oslo-i18n-3.15.3[${PYTHON_USEDEP}] + >=dev-python/oslo-service-1.40.1[${PYTHON_USEDEP}] + >=dev-python/rfc3986-1.1.0[${PYTHON_USEDEP}] + >=dev-python/oslo-middleware-3.31.0[${PYTHON_USEDEP}] + >=dev-python/psutil-3.2.2[${PYTHON_USEDEP}] + >=dev-python/oslo-versionedobjects-1.35.0[${PYTHON_USEDEP}] + >=dev-python/os-brick-3.0.1[${PYTHON_USEDEP}] + >=dev-python/os-resource-classes-0.4.0[${PYTHON_USEDEP}] + >=dev-python/os-traits-2.2.0[${PYTHON_USEDEP}] + >=dev-python/os-vif-1.14.0[${PYTHON_USEDEP}] + >=dev-python/os-win-3.0.0[${PYTHON_USEDEP}] + >=dev-python/castellan-0.16.0[${PYTHON_USEDEP}] + >=dev-python/microversion-parse-0.2.1[${PYTHON_USEDEP}] + >=dev-python/os-xenapi-0.3.3[${PYTHON_USEDEP}] + >=dev-python/tooz-1.58.0[${PYTHON_USEDEP}] + >=dev-python/cursive-0.2.1[${PYTHON_USEDEP}] + >=dev-python/pypowervm-1.1.15[${PYTHON_USEDEP}] + >=dev-python/retrying-1.3.3[${PYTHON_USEDEP}] + >=dev-python/os-service-types-1.7.0[${PYTHON_USEDEP}] + >=dev-python/taskflow-2.16.0[${PYTHON_USEDEP}] + >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}] + >=dev-python/zVMCloudConnector-1.3.0[${PYTHON_USEDEP}] + >=dev-python/openstacksdk-0.35.0[${PYTHON_USEDEP}] + dev-python/libvirt-python[${PYTHON_USEDEP}] + app-emulation/libvirt[iscsi?] + app-emulation/spice-html5 + novncproxy? ( www-apps/novnc ) + sys-apps/iproute2 + openvswitch? ( net-misc/openvswitch ) + rabbitmq? ( net-misc/rabbitmq-server ) + memcached? ( + net-misc/memcached + >=dev-python/python-memcached-1.58 + ) + sys-fs/sysfsutils + sys-fs/multipath-tools + net-misc/bridge-utils + compute? ( + app-cdr/cdrtools + sys-fs/dosfstools + app-emulation/qemu + ) + iscsi? ( + sys-fs/lsscsi + >=sys-block/open-iscsi-2.0.873-r1 + ) + acct-user/nova + acct-group/nova" + +#PATCHES=( +# "${FILESDIR}/filename" +#) + +pkg_setup() { + linux-info_pkg_setup + CONFIG_CHECK_MODULES="BLK_DEV_NBD VHOST_NET IP6_NF_FILTER IP6_NF_IPTABLES IP_NF_TARGET_REJECT \ + IP_NF_MANGLE IP_NF_TARGET_MASQUERADE NF_NAT_IPV4 IP_NF_FILTER IP_NF_IPTABLES \ + NF_CONNTRACK_IPV4 NF_DEFRAG_IPV4 NF_NAT_IPV4 NF_NAT NF_CONNTRACK NETFILTER_XTABLES \ + ISCSI_TCP SCSI_DH DM_MULTIPATH DM_SNAPSHOT" + if linux_config_exists; then + for module in ${CONFIG_CHECK_MODULES}; do + linux_chkconfig_present ${module} || ewarn "${module} needs to be enabled in kernel" + done + fi +} + +python_prepare_all() { + sed -i '/^hacking/d' test-requirements.txt || die + distutils-r1_python_prepare_all +} + +python_install_all() { + distutils-r1_python_install_all + + if use !compute-only; then + for svc in api conductor consoleauth network scheduler spicehtml5proxy xvpvncproxy; do + newinitd "${FILESDIR}/nova.initd" "nova-${svc}" + done + fi + use compute && newinitd "${FILESDIR}/nova.initd" "nova-compute" + use novncproxy && newinitd "${FILESDIR}/nova.initd" "nova-novncproxy" + + diropts -m 0750 -o nova -g qemu + dodir /var/log/nova /var/lib/nova/instances + diropts -m 0750 -o nova -g nova + + insinto /etc/nova + insopts -m 0640 -o nova -g nova + newins "${DISTDIR}/nova.conf.sample-${PV}" "nova.conf.sample" + doins "${FILESDIR}/nova-compute.conf" + doins "${S}/etc/nova/"* + # rootwrap filters + insopts -m 0644 + insinto /etc/nova/rootwrap.d + doins "etc/nova/rootwrap.d/compute.filters" + + # add sudoers definitions for user nova + insinto /etc/sudoers.d/ + insopts -m 0600 -o root -g root + doins "${FILESDIR}/nova-sudoers" + + if use iscsi ; then + # Install udev rules for handle iscsi disk with right links under /dev + udev_newrules "${FILESDIR}/openstack-scsi-disk.rules" 60-openstack-scsi-disk.rules + + insinto /etc/nova/ + doins "${FILESDIR}/scsi-openscsi-link.sh" + fi + rm -r "${ED}/usr/etc" +} + +pkg_postinst() { + if use iscsi ; then + elog "iscsid needs to be running if you want cinder to connect" + fi +} |