From 4a4bb6364ec966dd4e89359542095170945c1be2 Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Thu, 9 Dec 2010 16:42:52 +0000 Subject: [PATCH 1/4] raw instances can now be launched in xenapi (only as hvm at the moment) --- nova/flags.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nova/flags.py b/nova/flags.py index 1f94feb0..1cb846c1 100644 --- a/nova/flags.py +++ b/nova/flags.py @@ -234,6 +234,13 @@ DEFINE_string('default_ramdisk', 'ari-11111', 'default ramdisk to use, testing only') DEFINE_string('default_instance_type', 'm1.small', 'default instance type to use, testing only') +DEFINE_string('null_kernel', 'aki-00000000', + 'kernel image that indicates not to use a kernel, ' + ' but to use a raw disk image instead') +DEFINE_string('null_kernel_pv', 'aki-00000001', + 'kernel image that indicates not to use a kernel, ' + ' but to use a raw disk image for a paravirtualized guest') + DEFINE_string('vpn_image_id', 'ami-CLOUDPIPE', 'AMI for cloudpipe vpn server') DEFINE_string('vpn_key_suffix', From ff997b57b24b6a2cbcf55dcca25a2cebbfe2c7d2 Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Mon, 13 Dec 2010 16:11:12 +0000 Subject: [PATCH 2/4] only needs work for distinguishing pv from hvm --- .project | 17 +++++++++++++++++ .pydevproject | 10 ++++++++++ cuba-ubuntu.16501 | 0 nova-api.pid | 1 + nova-api.pid.lock | 0 nova-manage.conf | 26 ++++++++++++++++++++++++++ nova-network.pid | 1 + nova-objectstore.pid | 1 + nova-scheduler.pid | 1 + 9 files changed, 57 insertions(+) create mode 100644 .project create mode 100644 .pydevproject create mode 100644 cuba-ubuntu.16501 create mode 100644 nova-api.pid create mode 100644 nova-api.pid.lock create mode 100644 nova-manage.conf create mode 100644 nova-network.pid create mode 100644 nova-objectstore.pid create mode 100644 nova-scheduler.pid diff --git a/.project b/.project new file mode 100644 index 00000000..1213c940 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + Openstack-xs_raw_disk_images + + + + + + org.python.pydev.PyDevBuilder + + + + + + org.python.pydev.pythonNature + + diff --git a/.pydevproject b/.pydevproject new file mode 100644 index 00000000..8030d8e4 --- /dev/null +++ b/.pydevproject @@ -0,0 +1,10 @@ + + + + +Default +python 2.6 + +/home/salvatore/xenapi + + diff --git a/cuba-ubuntu.16501 b/cuba-ubuntu.16501 new file mode 100644 index 00000000..e69de29b diff --git a/nova-api.pid b/nova-api.pid new file mode 100644 index 00000000..9bcd7ef1 --- /dev/null +++ b/nova-api.pid @@ -0,0 +1 @@ +16501 diff --git a/nova-api.pid.lock b/nova-api.pid.lock new file mode 100644 index 00000000..e69de29b diff --git a/nova-manage.conf b/nova-manage.conf new file mode 100644 index 00000000..6942b8cc --- /dev/null +++ b/nova-manage.conf @@ -0,0 +1,26 @@ +--verbose +--nodaemon +--FAKE_subdomain=ec2 +--ca_path=/home/salvatore/openstack/nova/CA +--keys_path=/home/salvatore/openstack/nova/keys +--networks_path=/home/salvatore/openstack/nova/networks +--images_path=/home/salvatore/openstack/nova/images +--buckets_path=/home/salvatore/openstack/nova/buckets +--logdir=/home/salvatore/openstack/nova +#--libvirt_type=qemu +--connection_type=xenapi +--xenapi_connection_url=http://camctxlabs-svr05.cam.eu.citrix.com +--xenapi_connection_password=_car0pet_ +--auth_driver=nova.auth.dbdriver.DbDriver +--sql_connection=mysql://root:nova@10.70.177.19/nova +--s3_host=10.70.177.19 +--network_manager=nova.network.manager.FlatManager +#--network_manager=nova.network.manager.VlanManager +--fixed_range=192.168.1.240/28 +--routing_source_ip=10.70.177.19 +--flat_network_bridge=xenbr0 +--flat_network_gateway=192.168.1.1 +--flat_network_netmask=255.255.255.0 +--flat_network_network=192.168.1.0 +--flat_network_ips=192.168.1.220,192.168.1.221,192.168.1.222 +--flat_network_broadcast=192.168.1.255 diff --git a/nova-network.pid b/nova-network.pid new file mode 100644 index 00000000..b81b1082 --- /dev/null +++ b/nova-network.pid @@ -0,0 +1 @@ +16479 \ No newline at end of file diff --git a/nova-objectstore.pid b/nova-objectstore.pid new file mode 100644 index 00000000..0967315f --- /dev/null +++ b/nova-objectstore.pid @@ -0,0 +1 @@ +16469 \ No newline at end of file diff --git a/nova-scheduler.pid b/nova-scheduler.pid new file mode 100644 index 00000000..d6bb441a --- /dev/null +++ b/nova-scheduler.pid @@ -0,0 +1 @@ +16490 \ No newline at end of file From dbdbef407987cc52de3e34dbcbc9cad90a95aa03 Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Wed, 15 Dec 2010 14:27:07 +0000 Subject: [PATCH 3/4] removed temporary comment lines --- nova/flags.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nova/flags.py b/nova/flags.py index 1cb846c1..bd2fe4b9 100644 --- a/nova/flags.py +++ b/nova/flags.py @@ -237,10 +237,6 @@ DEFINE_string('default_instance_type', 'm1.small', DEFINE_string('null_kernel', 'aki-00000000', 'kernel image that indicates not to use a kernel, ' ' but to use a raw disk image instead') -DEFINE_string('null_kernel_pv', 'aki-00000001', - 'kernel image that indicates not to use a kernel, ' - ' but to use a raw disk image for a paravirtualized guest') - DEFINE_string('vpn_image_id', 'ami-CLOUDPIPE', 'AMI for cloudpipe vpn server') DEFINE_string('vpn_key_suffix', From b01b8a802c28f7f48c04aa05b7a0a7e55f044e3f Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Mon, 20 Dec 2010 15:41:43 +0000 Subject: [PATCH 4/4] Fixed pep8 errors --- nova/tests/virt_unittest.py | 43 +++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/nova/tests/virt_unittest.py b/nova/tests/virt_unittest.py index 9bbba4ba..e5d5f00c 100644 --- a/nova/tests/virt_unittest.py +++ b/nova/tests/virt_unittest.py @@ -129,44 +129,41 @@ class LibvirtConnTestCase(test.TestCase): check_list.append(check) else: if expect_kernel: - check = (lambda t: t.find('./os/kernel').text.split('/' - )[1], 'kernel') + check = (lambda t: t.find('./os/kernel').text.split('/') + [1], 'kernel') else: check = (lambda t: t.find('./os/kernel'), None) check_list.append(check) if expect_ramdisk: - check = (lambda t: t.find('./os/initrd').text.split('/' - )[1], 'ramdisk') + check = (lambda t: t.find('./os/initrd').text.split('/') + [1], 'ramdisk') else: check = (lambda t: t.find('./os/initrd'), None) check_list.append(check) common_checks = [ (lambda t: t.find('.').tag, 'domain'), - (lambda t: t.find('./devices/interface/filterref/parameter' - ).get('name'), 'IP'), - (lambda t: t.find('./devices/interface/filterref/parameter' - ).get('value'), '10.11.12.13'), - (lambda t: t.findall('./devices/interface/filterref/parameter' - )[1].get('name'), 'DHCPSERVER'), - (lambda t: t.findall('./devices/interface/filterref/parameter' - )[1].get('value'), '10.0.0.1'), - (lambda t: t.find('./devices/serial/source').get('path' - ).split('/')[1], 'console.log'), + (lambda t: t.find('./devices/interface/filterref/parameter') + .get('name'), 'IP'), + (lambda t: t.find('./devices/interface/filterref/parameter') + .get('value'), '10.11.12.13'), + (lambda t: t.findall('./devices/interface/filterref/parameter') + [1].get('name'), 'DHCPSERVER'), + (lambda t: t.findall('./devices/interface/filterref/parameter') + [1].get('value'), '10.0.0.1'), + (lambda t: t.find('./devices/serial/source').get('path') + .split('/')[1], 'console.log'), (lambda t: t.find('./memory').text, '2097152')] if rescue: - common_checks += [(lambda t: t.findall('./devices/disk/source' - )[0].get('file').split('/')[1], - 'rescue-disk'), - (lambda t: t.findall('./devices/disk/source' - )[1].get('file').split('/')[1], - 'disk')] + common_checks += [(lambda t: t.findall('./devices/disk/source') + [0].get('file').split('/')[1], 'rescue-disk'), + (lambda t: t.findall('./devices/disk/source') + [1].get('file').split('/')[1], 'disk')] else: - common_checks += [(lambda t: t.findall('./devices/disk/source' - )[0].get('file').split('/')[1], - 'disk')] + common_checks += [(lambda t: t.findall('./devices/disk/source') + [0].get('file').split('/')[1], 'disk')] for (libvirt_type, (expected_uri, checks)) in type_uri_map.iteritems(): FLAGS.libvirt_type = libvirt_type