From 05afafab71a5c99a99b3a069bcc6145dd4aeab40 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Wed, 30 Jun 2010 16:45:41 +0200 Subject: [PATCH 01/24] Use separate configuration files for the different daemons. --- debian/nova-api.conf | 3 +++ debian/nova-api.init | 4 ++-- debian/nova-api.install | 1 + debian/nova-compute.conf | 3 +++ debian/nova-compute.init | 4 ++-- debian/nova-compute.install | 1 + debian/nova-objectstore.conf | 5 +++++ debian/nova-objectstore.init | 4 ++-- debian/nova-objectstore.install | 1 + debian/nova-volume.conf | 5 +++++ debian/nova-volume.init | 4 ++-- debian/nova-volume.install | 1 + 12 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 debian/nova-api.conf create mode 100644 debian/nova-compute.conf create mode 100644 debian/nova-objectstore.conf create mode 100644 debian/nova-volume.conf diff --git a/debian/nova-api.conf b/debian/nova-api.conf new file mode 100644 index 000000000000..62bfd016d4b6 --- /dev/null +++ b/debian/nova-api.conf @@ -0,0 +1,3 @@ +--daemonize=1 +--ca_path=/usr/share/nova/CA +--fake_users=1 diff --git a/debian/nova-api.init b/debian/nova-api.init index 925c92c5e3fb..77d9b24428da 100644 --- a/debian/nova-api.init +++ b/debian/nova-api.init @@ -13,10 +13,10 @@ set -e DAEMON=/usr/bin/nova-api -DAEMON_ARGS="--flagfile=/etc/nova.conf" +DAEMON_ARGS="--flagfile=/etc/nova-api.conf" PIDFILE=/var/run/nova-api.pid -ENABLED=false +ENABLED=true if test -f /etc/default/nova-api; then . /etc/default/nova-api diff --git a/debian/nova-api.install b/debian/nova-api.install index 757235b11110..d1f5d7d5afe2 100644 --- a/debian/nova-api.install +++ b/debian/nova-api.install @@ -1 +1,2 @@ bin/nova-api usr/bin +debian/nova-api.conf etc diff --git a/debian/nova-compute.conf b/debian/nova-compute.conf new file mode 100644 index 000000000000..62bfd016d4b6 --- /dev/null +++ b/debian/nova-compute.conf @@ -0,0 +1,3 @@ +--daemonize=1 +--ca_path=/usr/share/nova/CA +--fake_users=1 diff --git a/debian/nova-compute.init b/debian/nova-compute.init index 89d0e5fce640..820cf3d36668 100644 --- a/debian/nova-compute.init +++ b/debian/nova-compute.init @@ -13,10 +13,10 @@ set -e DAEMON=/usr/bin/nova-compute -DAEMON_ARGS="--flagfile=/etc/nova.conf" +DAEMON_ARGS="--flagfile=/etc/nova-compute.conf" PIDFILE=/var/run/nova-compute.pid -ENABLED=false +ENABLED=true if test -f /etc/default/nova-compute; then . /etc/default/nova-compute diff --git a/debian/nova-compute.install b/debian/nova-compute.install index 6387cef07f79..20db74f145d5 100644 --- a/debian/nova-compute.install +++ b/debian/nova-compute.install @@ -1 +1,2 @@ bin/nova-compute usr/bin +debian/nova-compute.conf etc diff --git a/debian/nova-objectstore.conf b/debian/nova-objectstore.conf new file mode 100644 index 000000000000..4b74efe0e9e6 --- /dev/null +++ b/debian/nova-objectstore.conf @@ -0,0 +1,5 @@ +--daemonize=1 +--ca_path=/usr/share/nova/CA +--fake_users=1 +--images_path=/var/lib/nova/images +--buckets_path=/var/lib/nova/buckets diff --git a/debian/nova-objectstore.init b/debian/nova-objectstore.init index be7d32d8e014..7f37ac8ac6ca 100644 --- a/debian/nova-objectstore.init +++ b/debian/nova-objectstore.init @@ -13,10 +13,10 @@ set -e DAEMON=/usr/bin/nova-objectstore -DAEMON_ARGS="--flagfile=/etc/nova.conf" +DAEMON_ARGS="--flagfile=/etc/nova-objectstore.conf" PIDFILE=/var/run/nova-objectstore.pid -ENABLED=false +ENABLED=true if test -f /etc/default/nova-objectstore; then . /etc/default/nova-objectstore diff --git a/debian/nova-objectstore.install b/debian/nova-objectstore.install index ccc60fcccc5a..14a6dd37f8c6 100644 --- a/debian/nova-objectstore.install +++ b/debian/nova-objectstore.install @@ -1 +1,2 @@ bin/nova-objectstore usr/bin +debian/nova-objectstore.conf etc diff --git a/debian/nova-volume.conf b/debian/nova-volume.conf new file mode 100644 index 000000000000..4b74efe0e9e6 --- /dev/null +++ b/debian/nova-volume.conf @@ -0,0 +1,5 @@ +--daemonize=1 +--ca_path=/usr/share/nova/CA +--fake_users=1 +--images_path=/var/lib/nova/images +--buckets_path=/var/lib/nova/buckets diff --git a/debian/nova-volume.init b/debian/nova-volume.init index 80da3f70c613..069b47818c0d 100644 --- a/debian/nova-volume.init +++ b/debian/nova-volume.init @@ -13,10 +13,10 @@ set -e DAEMON=/usr/bin/nova-volume -DAEMON_ARGS="--flagfile=/etc/nova.conf" +DAEMON_ARGS="--flagfile=/etc/nova-volume.conf" PIDFILE=/var/run/nova-volume.pid -ENABLED=false +ENABLED=true if test -f /etc/default/nova-volume; then . /etc/default/nova-volume diff --git a/debian/nova-volume.install b/debian/nova-volume.install index 37b535c0343b..e7e172019a27 100644 --- a/debian/nova-volume.install +++ b/debian/nova-volume.install @@ -1 +1,2 @@ bin/nova-volume usr/bin +debian/nova-volume.conf etc From 4bdc2f061ca1855a56391acc994b637dc2f73bc6 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Wed, 30 Jun 2010 16:46:02 +0200 Subject: [PATCH 02/24] Expand somewhat on the short and long descriptions in debian/control. --- debian/control | 111 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 101 insertions(+), 10 deletions(-) diff --git a/debian/control b/debian/control index a50e6ecf8975..65af8f0cc9cf 100644 --- a/debian/control +++ b/debian/control @@ -3,38 +3,129 @@ Section: net Priority: extra Maintainer: Jesse Andrews Build-Depends: debhelper (>= 7) -Build-Depends-Indep: python-support +Build-Depends-Indep: python-support, python-setuptools Standards-Version: 3.8.4 XS-Python-Version: 2.6 Package: nova-common Architecture: all -Depends: ${python:Depends}, aoetools, vlan, python-ipy, python-boto, python-m2crypto, python-pycurl, python-twisted (>= 10.0.0-2ubuntu2nebula1), python-daemon, python-redis, python-carrot, python-lockfile, python-gflags, python-tornado, ${misc:Depends} +Depends: ${python:Depends}, aoetools, vlan, python-ipy, python-boto, python-m2crypto, python-pycurl, python-twisted, python-daemon, python-redis, python-carrot, python-lockfile, python-gflags, python-tornado, ${misc:Depends} Provides: ${python:Provides} -Conflicts: nova -Description: Nova is a cloud +Description: Nova Cloud Computing - common files + Nova is a cloud computing fabric controller (the main part of an IaaS + system) built to match the popular AWS EC2 and S3 APIs. It is written in + Python, using the Tornado and Twisted frameworks, and relies on the + standard AMQP messaging protocol, and the Redis distributed KVS. + . + Nova is intended to be easy to extend, and adapt. For example, it + currently uses an LDAP server for users and groups, but also includes a + fake LDAP server, that stores data in Redis. It has extensive test + coverage, and uses the Sphinx toolkit (the same as Python itself) for code + and user documentation. + . + While Nova is currently in Beta use within several organizations, the + codebase is very much under active development. + . + This package contains things that are needed by all parts of Nova. Package: nova-compute Architecture: all -Depends: nova-common (= ${binary:Version}), kpartx, kvm, python-libvirt, libvirt-bin (>= 0.8.1), ${python:Depends}, ${misc:Depends} -Description: Nova compute +Depends: nova-common (= ${binary:Version}), kpartx, kvm, python-libvirt, libvirt-bin (>= 0.7.5), ${python:Depends}, ${misc:Depends} +Description: Nova Cloud Computing - compute node + Nova is a cloud computing fabric controller (the main part of an IaaS + system) built to match the popular AWS EC2 and S3 APIs. It is written in + Python, using the Tornado and Twisted frameworks, and relies on the + standard AMQP messaging protocol, and the Redis distributed KVS. + . + Nova is intended to be easy to extend, and adapt. For example, it + currently uses an LDAP server for users and groups, but also includes a + fake LDAP server, that stores data in Redis. It has extensive test + coverage, and uses the Sphinx toolkit (the same as Python itself) for code + and user documentation. + . + While Nova is currently in Beta use within several organizations, the + codebase is very much under active development. + . + This is the package you will install on the nodes that will run your + virtual machines. Package: nova-volume Architecture: all Depends: nova-common (= ${binary:Version}), vblade, vblade-persist, ${python:Depends}, ${misc:Depends} -Description: Nova volume +Description: Nova Cloud Computing - storage + Nova is a cloud computing fabric controller (the main part of an IaaS + system) built to match the popular AWS EC2 and S3 APIs. It is written in + Python, using the Tornado and Twisted frameworks, and relies on the + standard AMQP messaging protocol, and the Redis distributed KVS. + . + Nova is intended to be easy to extend, and adapt. For example, it + currently uses an LDAP server for users and groups, but also includes a + fake LDAP server, that stores data in Redis. It has extensive test + coverage, and uses the Sphinx toolkit (the same as Python itself) for code + and user documentation. + . + While Nova is currently in Beta use within several organizations, the + codebase is very much under active development. + . + This is the package you will install on your storage nodes. Package: nova-api Architecture: all Depends: nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends} -Description: Nova api +Description: Nova Cloud Computing - API frontend + Nova is a cloud computing fabric controller (the main part of an IaaS + system) built to match the popular AWS EC2 and S3 APIs. It is written in + Python, using the Tornado and Twisted frameworks, and relies on the + standard AMQP messaging protocol, and the Redis distributed KVS. + . + Nova is intended to be easy to extend, and adapt. For example, it + currently uses an LDAP server for users and groups, but also includes a + fake LDAP server, that stores data in Redis. It has extensive test + coverage, and uses the Sphinx toolkit (the same as Python itself) for code + and user documentation. + . + While Nova is currently in Beta use within several organizations, the + codebase is very much under active development. + . + This package provides the API frontend. Package: nova-objectstore Architecture: all Depends: nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends} -Description: Nova object store +Description: Nova Cloud Computing - object store + Nova is a cloud computing fabric controller (the main part of an IaaS + system) built to match the popular AWS EC2 and S3 APIs. It is written in + Python, using the Tornado and Twisted frameworks, and relies on the + standard AMQP messaging protocol, and the Redis distributed KVS. + . + Nova is intended to be easy to extend, and adapt. For example, it + currently uses an LDAP server for users and groups, but also includes a + fake LDAP server, that stores data in Redis. It has extensive test + coverage, and uses the Sphinx toolkit (the same as Python itself) for code + and user documentation. + . + While Nova is currently in Beta use within several organizations, the + codebase is very much under active development. + . + This is the package you will install on the nodes that will contain your + object store. Package: nova-tools Architecture: all Depends: python-boto, ${python:Depends}, ${misc:Depends} -Description: CLI tools to access nova +Description: Nova Cloud Computing - management tools + Nova is a cloud computing fabric controller (the main part of an IaaS + system) built to match the popular AWS EC2 and S3 APIs. It is written in + Python, using the Tornado and Twisted frameworks, and relies on the + standard AMQP messaging protocol, and the Redis distributed KVS. + . + Nova is intended to be easy to extend, and adapt. For example, it + currently uses an LDAP server for users and groups, but also includes a + fake LDAP server, that stores data in Redis. It has extensive test + coverage, and uses the Sphinx toolkit (the same as Python itself) for code + and user documentation. + . + While Nova is currently in Beta use within several organizations, the + codebase is very much under active development. + . + This package contains admin tools for Nova. From 00971feed32d22ae9bc63aea716ecf4e972aee32 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Wed, 30 Jun 2010 16:46:26 +0200 Subject: [PATCH 03/24] Replace spaces in x509 cert subject with underscores. It ends up getting split(' ')'ed and passed to subprocess.Popen, so it needs to not have spaces in it, otherwise openssl gets very upset. --- nova/auth/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/auth/users.py b/nova/auth/users.py index 6997596aa24a..12c73ca27456 100644 --- a/nova/auth/users.py +++ b/nova/auth/users.py @@ -481,7 +481,7 @@ class UserManager(object): def __cert_subject(self, uid): # FIXME(ja) - this should be pulled from a global configuration - return "/C=US/ST=California/L=Mountain View/O=Anso Labs/OU=Nova Dev/CN=%s-%s" % (uid, str(datetime.datetime.utcnow().isoformat())) + return "/C=US/ST=California/L=Mountain_View/O=Anso_Labs/OU=Nova_Dev/CN=%s-%s" % (uid, str(datetime.datetime.utcnow().isoformat())) class LDAPWrapper(object): From 7ce77bfffca575e0136807779d98140280c7fa90 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Wed, 30 Jun 2010 16:46:47 +0200 Subject: [PATCH 04/24] Add _s instance attribute to Instance class. It's referenced in a bunch of places, but is never set. This is unlikely to be the right fix (why have two attributes pointing to the same object?), but it seems to make ends meet. --- nova/compute/node.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nova/compute/node.py b/nova/compute/node.py index c217056f549b..b39a0fe9c6b1 100644 --- a/nova/compute/node.py +++ b/nova/compute/node.py @@ -269,6 +269,7 @@ class Instance(object): data['project_id'] = data['owner_id'] self.datamodel = data + self._s = data size = data.get('instance_type', FLAGS.default_instance_type) if size not in INSTANCE_TYPES: raise exception.Error('invalid instance type: %s' % size) From 3b916f690ce332ac15e1ec50d5e511ec6a9895ab Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Wed, 30 Jun 2010 16:47:12 +0200 Subject: [PATCH 05/24] Make sure get_assigned_vlans and BaseNetwork.hosts always return a dict, even if the key is currently empty in the KVS. --- nova/compute/network.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/compute/network.py b/nova/compute/network.py index 911d0344a402..94fa6c47a2d2 100644 --- a/nova/compute/network.py +++ b/nova/compute/network.py @@ -133,7 +133,7 @@ class BaseNetwork(datastore.RedisModel): @property def hosts(self): - return datastore.Redis.instance().hgetall(self._hosts_key) + return datastore.Redis.instance().hgetall(self._hosts_key) or {} def _add_host(self, _user_id, _project_id, host, target): datastore.Redis.instance().hset(self._hosts_key, host, target) @@ -392,7 +392,7 @@ def _rem_vlan(project_id): def get_assigned_vlans(): """ Returns a dictionary, with keys of project_id and values of vlan_id """ - return datastore.Redis.instance().hgetall(VLANS_KEY) + return datastore.Redis.instance().hgetall(VLANS_KEY) or {} def get_vlan_for_project(project_id): """ From f322f02728136e19b2a6503861a312b7548dbc68 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Thu, 1 Jul 2010 13:14:08 +0200 Subject: [PATCH 06/24] Add curl as a dependency of nova-compute. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 65af8f0cc9cf..c0b08ae8ea88 100644 --- a/debian/control +++ b/debian/control @@ -30,7 +30,7 @@ Description: Nova Cloud Computing - common files Package: nova-compute Architecture: all -Depends: nova-common (= ${binary:Version}), kpartx, kvm, python-libvirt, libvirt-bin (>= 0.7.5), ${python:Depends}, ${misc:Depends} +Depends: nova-common (= ${binary:Version}), kpartx, kvm, python-libvirt, libvirt-bin (>= 0.7.5), curl, ${python:Depends}, ${misc:Depends} Description: Nova Cloud Computing - compute node Nova is a cloud computing fabric controller (the main part of an IaaS system) built to match the popular AWS EC2 and S3 APIs. It is written in From ecae60acde6853b1c49f0fbaca6ca7e8c1412b29 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 5 Jul 2010 12:45:35 +0200 Subject: [PATCH 07/24] Set better defaults in flagfiles. --- debian/nova-api.conf | 4 +++- debian/nova-compute.conf | 4 +++- debian/nova-objectstore.conf | 4 +++- debian/nova-volume.conf | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/debian/nova-api.conf b/debian/nova-api.conf index 62bfd016d4b6..4bf25fc7570c 100644 --- a/debian/nova-api.conf +++ b/debian/nova-api.conf @@ -1,3 +1,5 @@ --daemonize=1 ---ca_path=/usr/share/nova/CA +--ca_path=/var/lib/nova/CA +--keys_path=/var/lib/nova/keys --fake_users=1 +--keeper_path=/var/lib/nova/keeper diff --git a/debian/nova-compute.conf b/debian/nova-compute.conf index 62bfd016d4b6..61ab4ceb0064 100644 --- a/debian/nova-compute.conf +++ b/debian/nova-compute.conf @@ -1,3 +1,5 @@ --daemonize=1 ---ca_path=/usr/share/nova/CA +--ca_path=/var/lib/nova/CA +--keys_path=/var/lib/nova/keys +--keeper_path=/var/lib/nova/keeper --fake_users=1 diff --git a/debian/nova-objectstore.conf b/debian/nova-objectstore.conf index 4b74efe0e9e6..7c3b633b1ae1 100644 --- a/debian/nova-objectstore.conf +++ b/debian/nova-objectstore.conf @@ -1,5 +1,7 @@ --daemonize=1 ---ca_path=/usr/share/nova/CA +--ca_path=/var/lib/nova/CA +--keys_path=/var/lib/nova/keys +--keeper_path=/var/lib/nova/keeper --fake_users=1 --images_path=/var/lib/nova/images --buckets_path=/var/lib/nova/buckets diff --git a/debian/nova-volume.conf b/debian/nova-volume.conf index 4b74efe0e9e6..7c3b633b1ae1 100644 --- a/debian/nova-volume.conf +++ b/debian/nova-volume.conf @@ -1,5 +1,7 @@ --daemonize=1 ---ca_path=/usr/share/nova/CA +--ca_path=/var/lib/nova/CA +--keys_path=/var/lib/nova/keys +--keeper_path=/var/lib/nova/keeper --fake_users=1 --images_path=/var/lib/nova/images --buckets_path=/var/lib/nova/buckets From baea119aefe8e939eb5796b17fab29f5ae283449 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 5 Jul 2010 12:46:26 +0200 Subject: [PATCH 08/24] Use rmdir instead of rm -rf to remove a tempdir. --- nova/compute/disk.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nova/compute/disk.py b/nova/compute/disk.py index e7090dad32fd..f4d75a781c04 100644 --- a/nova/compute/disk.py +++ b/nova/compute/disk.py @@ -126,8 +126,7 @@ def inject_key(key, image, partition=None, execute=None): yield execute('sudo umount %s' % mapped_device) finally: # remove temporary directory - # TODO(termie): scary, is there any thing we can check here? - yield execute('rm -rf %s' % tmpdir) + yield execute('rmdir %s' % tmpdir) if not partition is None: # remove partitions yield execute('sudo kpartx -d %s' % device) From 6f92a690a8728ed690c5220b6a745919ff4605ec Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 5 Jul 2010 13:19:34 +0200 Subject: [PATCH 09/24] releasing version 0.3.0+really0.2.2-0ubuntu0ppa1 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 789dad36d5c9..d13bb231f98b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +nova (0.3.0+really0.2.2-0ubuntu0ppa1) lucid; urgency=low + + * Upload to PPA. + + -- Soren Hansen Mon, 05 Jul 2010 12:47:43 +0200 + nova (0.2.2-6) UNRELEASED; urgency=low * Fix to make Key Injection work again From fe2da208c24ec2cec0f1209729ce42a6cab315c2 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 5 Jul 2010 13:20:13 +0200 Subject: [PATCH 10/24] Added --network_path setting to nova-compute's flagfile. --- debian/changelog | 6 ++++++ debian/nova-compute.conf | 1 + 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index d13bb231f98b..90fe64a8cf25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +nova (0.3.0+really0.2.2-0ubuntu0ppa1ubuntu1) UNRELEASED; urgency=low + + * Added --network_path setting to nova-compute's flagfile. + + -- Soren Hansen Mon, 05 Jul 2010 13:20:11 +0200 + nova (0.3.0+really0.2.2-0ubuntu0ppa1) lucid; urgency=low * Upload to PPA. diff --git a/debian/nova-compute.conf b/debian/nova-compute.conf index 61ab4ceb0064..2c118114dc0b 100644 --- a/debian/nova-compute.conf +++ b/debian/nova-compute.conf @@ -2,4 +2,5 @@ --ca_path=/var/lib/nova/CA --keys_path=/var/lib/nova/keys --keeper_path=/var/lib/nova/keeper +--networks_path=/var/lib/nova/networks --fake_users=1 From 249910ed23062463ea8346956848bcc54a4d740d Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 5 Jul 2010 13:34:44 +0200 Subject: [PATCH 11/24] Move templates from python directories to /usr/share/nova. --- debian/changelog | 1 + debian/nova-common.install | 6 +++--- debian/nova-compute.conf | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 90fe64a8cf25..c5756920ff08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ nova (0.3.0+really0.2.2-0ubuntu0ppa1ubuntu1) UNRELEASED; urgency=low * Added --network_path setting to nova-compute's flagfile. + * Move templates from python directories to /usr/share/nova. -- Soren Hansen Mon, 05 Jul 2010 13:20:11 +0200 diff --git a/debian/nova-common.install b/debian/nova-common.install index ab7455314759..acb1741e7e43 100644 --- a/debian/nova-common.install +++ b/debian/nova-common.install @@ -1,5 +1,5 @@ bin/nova-manage usr/bin -nova/auth/novarc.template usr/lib/pymodules/python2.6/nova/auth -nova/cloudpipe/client.ovpn.template usr/lib/pymodules/python2.6/nova/cloudpipe -nova/compute/libvirt.xml.template usr/lib/pymodules/python2.6/nova/compute +nova/auth/novarc.template usr/share/nova +nova/cloudpipe/client.ovpn.template usr/share/nova +nova/compute/libvirt.xml.template usr/share/nova usr/lib/python*/*-packages/nova/* diff --git a/debian/nova-compute.conf b/debian/nova-compute.conf index 2c118114dc0b..eaa48e2e13fa 100644 --- a/debian/nova-compute.conf +++ b/debian/nova-compute.conf @@ -3,4 +3,7 @@ --keys_path=/var/lib/nova/keys --keeper_path=/var/lib/nova/keeper --networks_path=/var/lib/nova/networks +--libvirt_xml_template=/usr/share/nova/libvirt.xml.template +--vpn_client_template=/usr/share/nova/client.ovpn.template +--credentials_template=/usr/share/nova/novarc.template --fake_users=1 From 3675c47d0874c9da4d0318e1dd158708af597255 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 5 Jul 2010 13:35:16 +0200 Subject: [PATCH 12/24] Fixed package version. --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index c5756920ff08..6ef85196b5b6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nova (0.3.0+really0.2.2-0ubuntu0ppa1ubuntu1) UNRELEASED; urgency=low +nova (0.3.0+really0.2.2-0ubuntu0ppa2) UNRELEASED; urgency=low * Added --network_path setting to nova-compute's flagfile. * Move templates from python directories to /usr/share/nova. From b989170b398fbb73512a9be376196495cf4a086b Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 5 Jul 2010 15:37:52 +0200 Subject: [PATCH 13/24] keeper_path is really caled datastore_path. --- debian/nova-api.conf | 2 +- debian/nova-compute.conf | 2 +- debian/nova-objectstore.conf | 2 +- debian/nova-volume.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/nova-api.conf b/debian/nova-api.conf index 4bf25fc7570c..9cd4051b1cac 100644 --- a/debian/nova-api.conf +++ b/debian/nova-api.conf @@ -2,4 +2,4 @@ --ca_path=/var/lib/nova/CA --keys_path=/var/lib/nova/keys --fake_users=1 ---keeper_path=/var/lib/nova/keeper +--datastore_path=/var/lib/nova/keeper diff --git a/debian/nova-compute.conf b/debian/nova-compute.conf index eaa48e2e13fa..6eb0bc121c6f 100644 --- a/debian/nova-compute.conf +++ b/debian/nova-compute.conf @@ -1,7 +1,7 @@ --daemonize=1 --ca_path=/var/lib/nova/CA --keys_path=/var/lib/nova/keys ---keeper_path=/var/lib/nova/keeper +--datastore_path=/var/lib/nova/keeper --networks_path=/var/lib/nova/networks --libvirt_xml_template=/usr/share/nova/libvirt.xml.template --vpn_client_template=/usr/share/nova/client.ovpn.template diff --git a/debian/nova-objectstore.conf b/debian/nova-objectstore.conf index 7c3b633b1ae1..af3271d3bb5e 100644 --- a/debian/nova-objectstore.conf +++ b/debian/nova-objectstore.conf @@ -1,7 +1,7 @@ --daemonize=1 --ca_path=/var/lib/nova/CA --keys_path=/var/lib/nova/keys ---keeper_path=/var/lib/nova/keeper +--datastore_path=/var/lib/nova/keeper --fake_users=1 --images_path=/var/lib/nova/images --buckets_path=/var/lib/nova/buckets diff --git a/debian/nova-volume.conf b/debian/nova-volume.conf index 7c3b633b1ae1..af3271d3bb5e 100644 --- a/debian/nova-volume.conf +++ b/debian/nova-volume.conf @@ -1,7 +1,7 @@ --daemonize=1 --ca_path=/var/lib/nova/CA --keys_path=/var/lib/nova/keys ---keeper_path=/var/lib/nova/keeper +--datastore_path=/var/lib/nova/keeper --fake_users=1 --images_path=/var/lib/nova/images --buckets_path=/var/lib/nova/buckets From f49dfd507a48a1617822ba8543408fa8ad18a21e Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 5 Jul 2010 21:49:39 +0200 Subject: [PATCH 14/24] Add debian/nova-common.dirs to create var/lib/nova/{buckets,CA,images,instances,keys,networks} --- debian/changelog | 2 ++ debian/nova-common.dirs | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 debian/nova-common.dirs diff --git a/debian/changelog b/debian/changelog index 6ef85196b5b6..e86d654df7ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ nova (0.3.0+really0.2.2-0ubuntu0ppa2) UNRELEASED; urgency=low * Added --network_path setting to nova-compute's flagfile. * Move templates from python directories to /usr/share/nova. + * Add debian/nova-common.dirs to create + var/lib/nova/{buckets,CA,images,instances,keys,networks} -- Soren Hansen Mon, 05 Jul 2010 13:20:11 +0200 diff --git a/debian/nova-common.dirs b/debian/nova-common.dirs new file mode 100644 index 000000000000..3c645d8916dc --- /dev/null +++ b/debian/nova-common.dirs @@ -0,0 +1,6 @@ +var/lib/nova/buckets +var/lib/nova/CA +var/lib/nova/images +var/lib/nova/instances +var/lib/nova/keys +var/lib/nova/networks From 497e8dcde780d668f311e18817f11a0d15b735d2 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 5 Jul 2010 22:03:13 +0200 Subject: [PATCH 15/24] Don't pass --daemonize=1 to nova-compute. It's already daemonising by default. --- debian/changelog | 2 ++ debian/nova-compute.conf | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e86d654df7ff..12963099006c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ nova (0.3.0+really0.2.2-0ubuntu0ppa2) UNRELEASED; urgency=low * Move templates from python directories to /usr/share/nova. * Add debian/nova-common.dirs to create var/lib/nova/{buckets,CA,images,instances,keys,networks} + * Don't pass --daemonize=1 to nova-compute. It's already daemonising + by default. -- Soren Hansen Mon, 05 Jul 2010 13:20:11 +0200 diff --git a/debian/nova-compute.conf b/debian/nova-compute.conf index 6eb0bc121c6f..7fcac74b5c3a 100644 --- a/debian/nova-compute.conf +++ b/debian/nova-compute.conf @@ -1,4 +1,3 @@ ---daemonize=1 --ca_path=/var/lib/nova/CA --keys_path=/var/lib/nova/keys --datastore_path=/var/lib/nova/keeper From ee8ed818c182e4a34864aa4a9339c6f7a046063e Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 5 Jul 2010 22:07:41 +0200 Subject: [PATCH 16/24] releasing version 0.3.0+really0.2.2-0ubuntu0ppa2 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 12963099006c..9518cc23cc53 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nova (0.3.0+really0.2.2-0ubuntu0ppa2) UNRELEASED; urgency=low +nova (0.3.0+really0.2.2-0ubuntu0ppa2) lucid; urgency=low * Added --network_path setting to nova-compute's flagfile. * Move templates from python directories to /usr/share/nova. @@ -7,7 +7,7 @@ nova (0.3.0+really0.2.2-0ubuntu0ppa2) UNRELEASED; urgency=low * Don't pass --daemonize=1 to nova-compute. It's already daemonising by default. - -- Soren Hansen Mon, 05 Jul 2010 13:20:11 +0200 + -- Soren Hansen Mon, 05 Jul 2010 22:06:54 +0200 nova (0.3.0+really0.2.2-0ubuntu0ppa1) lucid; urgency=low From b9522da2bd64fb15c86e46c47ac37f345fa2c73d Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Tue, 6 Jul 2010 13:34:08 +0200 Subject: [PATCH 17/24] Add a dependency on nginx from nova-objectsstore and install a suitable configuration file. --- debian/changelog | 7 +++++++ debian/control | 2 +- debian/nova-objectstore.install | 1 + debian/nova-objectstore.links | 1 + debian/nova-objectstore.nginx.conf | 17 +++++++++++++++++ 5 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 debian/nova-objectstore.links create mode 100644 debian/nova-objectstore.nginx.conf diff --git a/debian/changelog b/debian/changelog index 9518cc23cc53..8c7f68d1644a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +nova (0.3.0+really0.2.2-0ubuntu0ppa3) UNRELEASED; urgency=low + + * Add a dependency on nginx from nova-objectsstore and install a + suitable configuration file. + + -- Soren Hansen Tue, 06 Jul 2010 13:33:44 +0200 + nova (0.3.0+really0.2.2-0ubuntu0ppa2) lucid; urgency=low * Added --network_path setting to nova-compute's flagfile. diff --git a/debian/control b/debian/control index c0b08ae8ea88..3bfceaa2a85d 100644 --- a/debian/control +++ b/debian/control @@ -91,7 +91,7 @@ Description: Nova Cloud Computing - API frontend Package: nova-objectstore Architecture: all -Depends: nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends} +Depends: nova-common (= ${binary:Version}), nginx, ${python:Depends}, ${misc:Depends} Description: Nova Cloud Computing - object store Nova is a cloud computing fabric controller (the main part of an IaaS system) built to match the popular AWS EC2 and S3 APIs. It is written in diff --git a/debian/nova-objectstore.install b/debian/nova-objectstore.install index 14a6dd37f8c6..590fcc01b49e 100644 --- a/debian/nova-objectstore.install +++ b/debian/nova-objectstore.install @@ -1,2 +1,3 @@ bin/nova-objectstore usr/bin debian/nova-objectstore.conf etc +debian/nova-objectstore.nginx.conf etc/nginx/sites-available diff --git a/debian/nova-objectstore.links b/debian/nova-objectstore.links new file mode 100644 index 000000000000..38e33948e22a --- /dev/null +++ b/debian/nova-objectstore.links @@ -0,0 +1 @@ +/etc/nginx/sites-available/nova-objectstore.nginx.conf /etc/nginx/sites-enabled/nova-objectstore.nginx.conf diff --git a/debian/nova-objectstore.nginx.conf b/debian/nova-objectstore.nginx.conf new file mode 100644 index 000000000000..b63424150c29 --- /dev/null +++ b/debian/nova-objectstore.nginx.conf @@ -0,0 +1,17 @@ +server { + listen 3333 default; + server_name localhost; + client_max_body_size 10m; + + access_log /var/log/nginx/localhost.access.log; + + location ~ /_images/.+ { + root /var/lib/nova/images; + rewrite ^/_images/(.*)$ /$1 break; + } + + location / { + proxy_pass http://localhost:3334/; + } +} + From fa529458f64a3a97a26b49cf7f9dab1fad8acf0b Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Tue, 6 Jul 2010 14:06:55 +0200 Subject: [PATCH 18/24] Ship the CA directory in nova-common. --- debian/changelog | 1 + debian/nova-common.dirs | 4 ++++ debian/nova-common.install | 3 +++ 3 files changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 8c7f68d1644a..d90a15ac708b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ nova (0.3.0+really0.2.2-0ubuntu0ppa3) UNRELEASED; urgency=low * Add a dependency on nginx from nova-objectsstore and install a suitable configuration file. + * Ship the CA directory in nova-common. -- Soren Hansen Tue, 06 Jul 2010 13:33:44 +0200 diff --git a/debian/nova-common.dirs b/debian/nova-common.dirs index 3c645d8916dc..01443c4fd13a 100644 --- a/debian/nova-common.dirs +++ b/debian/nova-common.dirs @@ -1,5 +1,9 @@ var/lib/nova/buckets var/lib/nova/CA +var/lib/nova/CA/INTER +var/lib/nova/CA/newcerts +var/lib/nova/CA/private +var/lib/nova/CA/reqs var/lib/nova/images var/lib/nova/instances var/lib/nova/keys diff --git a/debian/nova-common.install b/debian/nova-common.install index acb1741e7e43..da0ac65ab000 100644 --- a/debian/nova-common.install +++ b/debian/nova-common.install @@ -3,3 +3,6 @@ nova/auth/novarc.template usr/share/nova nova/cloudpipe/client.ovpn.template usr/share/nova nova/compute/libvirt.xml.template usr/share/nova usr/lib/python*/*-packages/nova/* +CA/openssl.cnf.tmpl var/lib/nova/CA +CA/geninter.sh var/lib/nova/CA +CA/genrootca.sh var/lib/nova/CA From ccd01c6975070ad67e895e805c1a2048440b5f70 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Tue, 6 Jul 2010 17:34:43 +0200 Subject: [PATCH 19/24] Add a default flag file for nova-manage to help it find the CA. --- bin/nova-manage | 2 +- debian/changelog | 1 + debian/nova-common.install | 1 + debian/nova-manage.conf | 4 ++++ 4 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 debian/nova-manage.conf diff --git a/bin/nova-manage b/bin/nova-manage index f418e162ba37..cb987f33025e 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -218,7 +218,7 @@ def methods_of(obj): if __name__ == '__main__': - utils.default_flagfile() + utils.default_flagfile('/etc/nova-manage.conf') argv = FLAGS(sys.argv) script_name = argv.pop(0) if len(argv) < 1: diff --git a/debian/changelog b/debian/changelog index d90a15ac708b..6b2500167978 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ nova (0.3.0+really0.2.2-0ubuntu0ppa3) UNRELEASED; urgency=low * Add a dependency on nginx from nova-objectsstore and install a suitable configuration file. * Ship the CA directory in nova-common. + * Add a default flag file for nova-manage to help it find the CA. -- Soren Hansen Tue, 06 Jul 2010 13:33:44 +0200 diff --git a/debian/nova-common.install b/debian/nova-common.install index da0ac65ab000..f3d554041ec6 100644 --- a/debian/nova-common.install +++ b/debian/nova-common.install @@ -1,4 +1,5 @@ bin/nova-manage usr/bin +debian/nova-manage.conf etc nova/auth/novarc.template usr/share/nova nova/cloudpipe/client.ovpn.template usr/share/nova nova/compute/libvirt.xml.template usr/share/nova diff --git a/debian/nova-manage.conf b/debian/nova-manage.conf new file mode 100644 index 000000000000..5ccda7ecf532 --- /dev/null +++ b/debian/nova-manage.conf @@ -0,0 +1,4 @@ +--ca_path=/var/lib/nova/CA +--credentials_template=/usr/share/nova/novarc.template +--keys_path=/var/lib/nova/keys +--vpn_client_template=/usr/share/nova/client.ovpn.template From 6e77201cbab22d0c4b383b245d5957946a229e4c Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Tue, 6 Jul 2010 17:35:33 +0200 Subject: [PATCH 20/24] If set, pass KernelId and RamdiskId from RunInstances call to the target compute node. --- debian/changelog | 2 ++ nova/endpoint/cloud.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 6b2500167978..5fb7c878e232 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ nova (0.3.0+really0.2.2-0ubuntu0ppa3) UNRELEASED; urgency=low suitable configuration file. * Ship the CA directory in nova-common. * Add a default flag file for nova-manage to help it find the CA. + * If set, pass KernelId and RamdiskId from RunInstances call to the + target compute node. -- Soren Hansen Tue, 06 Jul 2010 13:33:44 +0200 diff --git a/nova/endpoint/cloud.py b/nova/endpoint/cloud.py index 39b3fd6287d0..7b2d23e3712f 100644 --- a/nova/endpoint/cloud.py +++ b/nova/endpoint/cloud.py @@ -498,6 +498,10 @@ class CloudController(object): inst = self.instdir.new() # TODO(ja): add ari, aki inst['image_id'] = kwargs['image_id'] + if 'kernel_id' in kwargs: + inst['kernel_id'] = kwargs['kernel_id'] + if 'ramdisk_id' in kwargs: + inst['ramdisk_id'] = kwargs['ramdisk_id'] inst['user_data'] = kwargs.get('user_data', '') inst['instance_type'] = kwargs.get('instance_type', 'm1.small') inst['reservation_id'] = reservation_id From 0ed127010775afce3ccd6b97d13ee7cad09722dc Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Tue, 6 Jul 2010 17:49:05 +0200 Subject: [PATCH 21/24] releasing version 0.3.0+really0.2.2-0ubuntu0ppa3 --- debian/changelog | 4 ++-- debian/nova-compute.conf | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5fb7c878e232..3d14ca7c1a6c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -nova (0.3.0+really0.2.2-0ubuntu0ppa3) UNRELEASED; urgency=low +nova (0.3.0+really0.2.2-0ubuntu0ppa3) lucid; urgency=low * Add a dependency on nginx from nova-objectsstore and install a suitable configuration file. @@ -7,7 +7,7 @@ nova (0.3.0+really0.2.2-0ubuntu0ppa3) UNRELEASED; urgency=low * If set, pass KernelId and RamdiskId from RunInstances call to the target compute node. - -- Soren Hansen Tue, 06 Jul 2010 13:33:44 +0200 + -- Soren Hansen Tue, 06 Jul 2010 17:47:38 +0200 nova (0.3.0+really0.2.2-0ubuntu0ppa2) lucid; urgency=low diff --git a/debian/nova-compute.conf b/debian/nova-compute.conf index 7fcac74b5c3a..5cd3f31ff0dc 100644 --- a/debian/nova-compute.conf +++ b/debian/nova-compute.conf @@ -1,6 +1,7 @@ --ca_path=/var/lib/nova/CA --keys_path=/var/lib/nova/keys --datastore_path=/var/lib/nova/keeper +--instances_path=/var/lib/nova/instances --networks_path=/var/lib/nova/networks --libvirt_xml_template=/usr/share/nova/libvirt.xml.template --vpn_client_template=/usr/share/nova/client.ovpn.template From 0a252e2009fb770fb34d90322665bc41326a8caa Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Tue, 6 Jul 2010 22:28:55 +0200 Subject: [PATCH 22/24] Relax the Twisted dependency to python-twisted-core (rather than the full stack). --- debian/changelog | 7 +++++++ debian/control | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3d14ca7c1a6c..f78e8c13cfa3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +nova (0.3.0+really0.2.2-0ubuntu0ppa4) UNRELEASED; urgency=low + + * Relax the Twisted dependency to python-twisted-core (rather than the + full stack). + + -- Soren Hansen Tue, 06 Jul 2010 22:28:28 +0200 + nova (0.3.0+really0.2.2-0ubuntu0ppa3) lucid; urgency=low * Add a dependency on nginx from nova-objectsstore and install a diff --git a/debian/control b/debian/control index 3bfceaa2a85d..61f8cade707d 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ XS-Python-Version: 2.6 Package: nova-common Architecture: all -Depends: ${python:Depends}, aoetools, vlan, python-ipy, python-boto, python-m2crypto, python-pycurl, python-twisted, python-daemon, python-redis, python-carrot, python-lockfile, python-gflags, python-tornado, ${misc:Depends} +Depends: ${python:Depends}, aoetools, vlan, python-ipy, python-boto, python-m2crypto, python-pycurl, python-twisted-core, python-daemon, python-redis, python-carrot, python-lockfile, python-gflags, python-tornado, ${misc:Depends} Provides: ${python:Provides} Description: Nova Cloud Computing - common files Nova is a cloud computing fabric controller (the main part of an IaaS From 730faa785921f43b342e27e9a40ebe88a68a35d8 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 12 Jul 2010 10:39:01 -0500 Subject: [PATCH 23/24] Move nova related configuration files into /etc/nova/. --- bin/nova-manage | 2 +- debian/changelog | 1 + debian/nova-api.init | 2 +- debian/nova-api.install | 2 +- debian/nova-common.dirs | 1 + debian/nova-common.install | 2 +- debian/nova-compute.init | 2 +- debian/nova-compute.install | 2 +- debian/nova-objectstore.init | 2 +- debian/nova-objectstore.install | 2 +- debian/nova-volume.init | 2 +- debian/nova-volume.install | 2 +- 12 files changed, 12 insertions(+), 10 deletions(-) diff --git a/bin/nova-manage b/bin/nova-manage index cb987f33025e..c7971867334a 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -218,7 +218,7 @@ def methods_of(obj): if __name__ == '__main__': - utils.default_flagfile('/etc/nova-manage.conf') + utils.default_flagfile('/etc/nova/nova-manage.conf') argv = FLAGS(sys.argv) script_name = argv.pop(0) if len(argv) < 1: diff --git a/debian/changelog b/debian/changelog index f78e8c13cfa3..4dfdb1dec264 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ nova (0.3.0+really0.2.2-0ubuntu0ppa4) UNRELEASED; urgency=low * Relax the Twisted dependency to python-twisted-core (rather than the full stack). + * Move nova related configuration files into /etc/nova/. -- Soren Hansen Tue, 06 Jul 2010 22:28:28 +0200 diff --git a/debian/nova-api.init b/debian/nova-api.init index 77d9b24428da..597fbef959d2 100644 --- a/debian/nova-api.init +++ b/debian/nova-api.init @@ -13,7 +13,7 @@ set -e DAEMON=/usr/bin/nova-api -DAEMON_ARGS="--flagfile=/etc/nova-api.conf" +DAEMON_ARGS="--flagfile=/etc/nova/nova-api.conf" PIDFILE=/var/run/nova-api.pid ENABLED=true diff --git a/debian/nova-api.install b/debian/nova-api.install index d1f5d7d5afe2..02dbda02d777 100644 --- a/debian/nova-api.install +++ b/debian/nova-api.install @@ -1,2 +1,2 @@ bin/nova-api usr/bin -debian/nova-api.conf etc +debian/nova-api.conf etc/nova diff --git a/debian/nova-common.dirs b/debian/nova-common.dirs index 01443c4fd13a..b58fe8b7f4bd 100644 --- a/debian/nova-common.dirs +++ b/debian/nova-common.dirs @@ -1,3 +1,4 @@ +etc/nova var/lib/nova/buckets var/lib/nova/CA var/lib/nova/CA/INTER diff --git a/debian/nova-common.install b/debian/nova-common.install index f3d554041ec6..92b5d3d418df 100644 --- a/debian/nova-common.install +++ b/debian/nova-common.install @@ -1,5 +1,5 @@ bin/nova-manage usr/bin -debian/nova-manage.conf etc +debian/nova-manage.conf etc/nova nova/auth/novarc.template usr/share/nova nova/cloudpipe/client.ovpn.template usr/share/nova nova/compute/libvirt.xml.template usr/share/nova diff --git a/debian/nova-compute.init b/debian/nova-compute.init index 820cf3d36668..d0f093a7aeca 100644 --- a/debian/nova-compute.init +++ b/debian/nova-compute.init @@ -13,7 +13,7 @@ set -e DAEMON=/usr/bin/nova-compute -DAEMON_ARGS="--flagfile=/etc/nova-compute.conf" +DAEMON_ARGS="--flagfile=/etc/nova/nova-compute.conf" PIDFILE=/var/run/nova-compute.pid ENABLED=true diff --git a/debian/nova-compute.install b/debian/nova-compute.install index 20db74f145d5..5f9df46a8448 100644 --- a/debian/nova-compute.install +++ b/debian/nova-compute.install @@ -1,2 +1,2 @@ bin/nova-compute usr/bin -debian/nova-compute.conf etc +debian/nova-compute.conf etc/nova diff --git a/debian/nova-objectstore.init b/debian/nova-objectstore.init index 7f37ac8ac6ca..9676345ad429 100644 --- a/debian/nova-objectstore.init +++ b/debian/nova-objectstore.init @@ -13,7 +13,7 @@ set -e DAEMON=/usr/bin/nova-objectstore -DAEMON_ARGS="--flagfile=/etc/nova-objectstore.conf" +DAEMON_ARGS="--flagfile=/etc/nova/nova-objectstore.conf" PIDFILE=/var/run/nova-objectstore.pid ENABLED=true diff --git a/debian/nova-objectstore.install b/debian/nova-objectstore.install index 590fcc01b49e..3ed93ff37b4a 100644 --- a/debian/nova-objectstore.install +++ b/debian/nova-objectstore.install @@ -1,3 +1,3 @@ bin/nova-objectstore usr/bin -debian/nova-objectstore.conf etc +debian/nova-objectstore.conf etc/nova debian/nova-objectstore.nginx.conf etc/nginx/sites-available diff --git a/debian/nova-volume.init b/debian/nova-volume.init index 069b47818c0d..d5c2dddf8f87 100644 --- a/debian/nova-volume.init +++ b/debian/nova-volume.init @@ -13,7 +13,7 @@ set -e DAEMON=/usr/bin/nova-volume -DAEMON_ARGS="--flagfile=/etc/nova-volume.conf" +DAEMON_ARGS="--flagfile=/etc/nova/nova-volume.conf" PIDFILE=/var/run/nova-volume.pid ENABLED=true diff --git a/debian/nova-volume.install b/debian/nova-volume.install index e7e172019a27..9a840c78e429 100644 --- a/debian/nova-volume.install +++ b/debian/nova-volume.install @@ -1,2 +1,2 @@ bin/nova-volume usr/bin -debian/nova-volume.conf etc +debian/nova-volume.conf etc/nova From dfdb094956acce5f0d459203a9f95067f989d68d Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 12 Jul 2010 16:28:19 -0500 Subject: [PATCH 24/24] Avoid using s-expr, pkcs1-conv, and lsh-export-key. Instead we now use M2Crypto and struct.pack to construct it on our own. This removes a dependency on nettle-bin and lsh-utils (which were never specified in debian/control). --- nova/crypto.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/nova/crypto.py b/nova/crypto.py index 80b4ef9dee14..4f97bb824eaf 100644 --- a/nova/crypto.py +++ b/nova/crypto.py @@ -23,10 +23,12 @@ Wrappers around standard crypto, including root and intermediate CAs, SSH keypairs and x509 certificates. """ +import base64 import hashlib import logging import os import shutil +import struct import tempfile import time import utils @@ -86,14 +88,17 @@ def generate_key_pair(bits=1024): def ssl_pub_to_ssh_pub(ssl_public_key, name='root', suffix='nova'): - """requires lsh-utils""" - convert="sed -e'1d' -e'$d' | pkcs1-conv --public-key-info --base-64 |" \ - + " sexp-conv | sed -e'1s/(rsa-pkcs1/(rsa-pkcs1-sha1/' | sexp-conv -s" \ - + " transport | lsh-export-key --openssh" - (out, err) = utils.execute(convert, ssl_public_key) - if err: - raise exception.Error("Failed to generate key: %s", err) - return '%s %s@%s\n' %(out.strip(), name, suffix) + rsa_key = M2Crypto.RSA.load_pub_key_bio(M2Crypto.BIO.MemoryBuffer(ssl_public_key)) + e, n = rsa_key.pub() + + key_type = 'ssh-rsa' + + key_data = struct.pack('>I', len(key_type)) + key_data += key_type + key_data += '%s%s' % (e,n) + + b64_blob = base64.b64encode(key_data) + return '%s %s %s@%s\n' %(key_type, b64_blob, name, suffix) def generate_x509_cert(subject="/C=US/ST=California/L=The Mission/O=CloudFed/OU=NOVA/CN=foo", bits=1024):