summaryrefslogtreecommitdiffstats
path: root/patches/fuel-web/0004-direct-kernel-boot-for-cirros.patch
diff options
context:
space:
mode:
authorFlorin Dumitrascu <florin.dumitrascu@enea.com>2016-03-08 14:17:01 +0100
committerFlorin Dumitrascu <florin.dumitrascu@enea.com>2016-03-22 19:03:21 +0100
commit80ba8c45cda5308010ded08b3d070343a92d58b5 (patch)
treefaa6ffd8020d73cee7a1cc966dee5ab1af557163 /patches/fuel-web/0004-direct-kernel-boot-for-cirros.patch
parent7bfc08a72654b440b52c609ca67199f13df2f668 (diff)
Add fixes and improvements for arm64 deployment
[ Florin Dumitrascu <florin.dumitrascu@enea.com> ] * arm64 support for OpenDaylight Fuel Plugin [ Stanislaw Kardach <kda@semihalf.com> ] * Limit ESP to first drive * Remove default+timeout+tr from cobbler profile * Fix puppet syntax errors * Disable usb tablet on aarch64 * Support direct kernel boot for CirrOS TestVM on aarch64 * Remove git version signature not to confuse patches-export * Fix VGA support for CirrOS TestVM * Makefile: Add clean-{docker,build}. [ Alexandru Avadanii <Alexandru.Avadanii@enea.com> ] * Performance: Use gzip instead of xz compression. * Switch mirror proto from https to http. * Update TODO with remaining tasks. * Disable amd64 Liberty fixture (no multi-arch support yet). * m1.micro: Increase RAM size to 128MB for aarch64 images. Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> Signed-off-by: Florin Dumitrascu <florin.dumitrascu@enea.com> Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Diffstat (limited to 'patches/fuel-web/0004-direct-kernel-boot-for-cirros.patch')
-rw-r--r--patches/fuel-web/0004-direct-kernel-boot-for-cirros.patch138
1 files changed, 138 insertions, 0 deletions
diff --git a/patches/fuel-web/0004-direct-kernel-boot-for-cirros.patch b/patches/fuel-web/0004-direct-kernel-boot-for-cirros.patch
new file mode 100644
index 00000000..0d133274
--- /dev/null
+++ b/patches/fuel-web/0004-direct-kernel-boot-for-cirros.patch
@@ -0,0 +1,138 @@
+From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
+Date: Tue, 15 Mar 2016 15:01:51 +0100
+Subject: [PATCH] direct kernel boot for cirros
+
+---
+ nailgun/nailgun/orchestrator/base_serializers.py | 16 +++--
+ .../nailgun/orchestrator/deployment_serializers.py | 70 ++++++++++++++++------
+ 2 files changed, 62 insertions(+), 24 deletions(-)
+
+diff --git a/nailgun/nailgun/orchestrator/base_serializers.py b/nailgun/nailgun/orchestrator/base_serializers.py
+index 16dc3fa..23d6589 100644
+--- a/nailgun/nailgun/orchestrator/base_serializers.py
++++ b/nailgun/nailgun/orchestrator/base_serializers.py
+@@ -36,12 +36,16 @@ class MuranoMetadataSerializerMixin(object):
+ self).generate_test_vm_image_data(node)
+
+ # Add default Glance property for Murano.
+- test_vm_image = image_data['test_vm_image']
+- existing_properties = test_vm_image['glance_properties']
+- murano_data = ' '.join(["""--property murano_image_info='{"title":"""
+- """ "Murano Demo", "type": "cirros.demo"}'"""])
+- test_vm_image['glance_properties'] = existing_properties + murano_data
+- return {'test_vm_image': test_vm_image}
++ test_vm_images = []
++ for test_vm_image in image_data['test_vm_image']:
++ existing_properties = test_vm_image['glance_properties']
++ murano_data = ' '.join(
++ ["""--property murano_image_info='{"title":"""
++ """ "Murano Demo", "type": "cirros.demo"}'"""])
++ test_vm_image['glance_properties'] = existing_properties + \
++ murano_data
++ test_vm_images += [test_vm_image]
++ return {'test_vm_image': test_vm_images}
+
+
+ class VmwareDeploymentSerializerMixin(object):
+diff --git a/nailgun/nailgun/orchestrator/deployment_serializers.py b/nailgun/nailgun/orchestrator/deployment_serializers.py
+index b8b38e2..54b1614 100644
+--- a/nailgun/nailgun/orchestrator/deployment_serializers.py
++++ b/nailgun/nailgun/orchestrator/deployment_serializers.py
+@@ -274,6 +274,9 @@ class DeploymentMultinodeSerializer(object):
+ return {'glance': {'image_cache_max_size': image_cache_max_size}}
+
+ def generate_test_vm_image_data(self, node):
++ images = []
++ # By default always prepare the disk image
++
+ # Instantiate all default values in dict.
+ image_data = {
+ 'container_format': 'bare',
+@@ -297,8 +300,8 @@ class DeploymentMultinodeSerializer(object):
+ arch = "x86_64"
+ elif arch == "arm64":
+ arch = "aarch64"
+- image_data['img_path'] = '{0}cirros-{1}-disk.img'.format(img_dir,
+- arch)
++ image_data['img_path'] = \
++ '{0}cirros-{1}-disk.img'.format(img_dir, arch)
+
+ glance_properties = []
+
+@@ -313,8 +316,38 @@ class DeploymentMultinodeSerializer(object):
+ glance_properties.append('--property hypervisor_type=vmware')
+
+ image_data['glance_properties'] = ' '.join(glance_properties)
+-
+- return {'test_vm_image': image_data}
++ images += [image_data]
++
++ # Now for aarch64 add also kernel and initrd because we direct
++ # kernel boot is used then
++ if arch == 'aarch64':
++ image_data['glance_properties'] += \
++ ' --property os_command_line=\'root=/dev/vda1 rw rootwait' + \
++ 'console=tty0 console=ttyS0 console=ttyAMA0\'' + \
++ ' --property hw_video_model=vga'
++ kernel_data = {
++ 'container_format': 'aki',
++ 'public': 'true',
++ 'disk_format': 'aki',
++ 'img_name': 'TestVM-kernel',
++ 'img_path': '{0}cirros-{1}-kernel'.format(img_dir, arch),
++ 'os_name': 'cirros',
++ 'min_ram': 64,
++ 'glance_properties': '',
++ }
++ initrd_data = {
++ 'container_format': 'ari',
++ 'public': 'true',
++ 'disk_format': 'ari',
++ 'img_name': 'TestVM-initramfs',
++ 'img_path': '{0}cirros-{1}-initramfs'.format(img_dir, arch),
++ 'os_name': 'cirros',
++ 'min_ram': 64,
++ 'glance_properties': '',
++ }
++ images += [kernel_data, initrd_data]
++
++ return {'test_vm_image': images}
+
+ @classmethod
+ def get_net_provider_serializer(cls, cluster):
+@@ -495,20 +528,21 @@ class DeploymentHASerializer61(DeploymentHASerializer,
+ images_data['test_vm_image'] = []
+ if attrs.get('editable', {}).get('common', {}). \
+ get('use_vcenter', {}).get('value') is True:
+- image_vmdk_data = deepcopy(image_data['test_vm_image'])
+- img_path = image_vmdk_data['img_path']. \
+- replace('x86_64-disk.img', 'i386-disk.vmdk')
+- image_vmdk_data.update({
+- 'img_name': 'TestVM-VMDK',
+- 'disk_format': 'vmdk',
+- 'img_path': img_path,
+- })
+- image_vmdk_data['glance_properties'] = ' '.join([
+- '--property vmware_disktype=sparse',
+- '--property vmware_adaptertype=lsiLogic',
+- '--property hypervisor_type=vmware'])
+- images_data['test_vm_image'].append(image_vmdk_data)
+- images_data['test_vm_image'].append(image_data['test_vm_image'])
++ images_vmdk_data = deepcopy(image_data['test_vm_image'])
++ for image_vmdk_data in images_vmdk_data:
++ img_path = image_vmdk_data['img_path']. \
++ replace('x86_64-disk.img', 'i386-disk.vmdk')
++ image_vmdk_data.update({
++ 'img_name': 'TestVM-VMDK',
++ 'disk_format': 'vmdk',
++ 'img_path': img_path,
++ })
++ image_vmdk_data['glance_properties'] = ' '.join([
++ '--property vmware_disktype=sparse',
++ '--property vmware_adaptertype=lsiLogic',
++ '--property hypervisor_type=vmware'])
++ images_data['test_vm_image'] += [image_vmdk_data]
++ images_data['test_vm_image'] += image_data['test_vm_image']
+ else:
+ images_data = image_data
+