diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2016-10-01 13:18:11 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2016-10-09 16:33:43 +0200 |
commit | 42f8585ebb8fffad19a89314659ab9129176c3e9 (patch) | |
tree | e2cf6a4797bcbd036e080541cc3925f8b209549b /patches/fuel-web/direct-kernel-boot | |
parent | 6f3a054fc95622f0c002f72c0fac6074bb36c36f (diff) |
build: Rework patch mechanism for Fuel submodules
While refactoring the patching mechanism, take care of:
- Sync submodule handling with Fuel@OPFNV;
- build: Investigate/prepare for moving patches to Fuel@OPNFV;
- build: Investigate divergent fuel-mirror;
- ISO build: cacheid for Fuel comps should not depend on
Armband git commit;
CHANGE:
Rename/shuffle patches while grouping them in "features",
preparing for upstreaming them to Fuel@OPNFV and beyond.
CHANGE:
Allow linking patches for better representing the dependency
between one patch and different features.
e.g. 0001-Add-arch-to-nailgun-release-and-target-image.patch:
- part of `multiarch-fuel`, because it extends Fuel;
- part of `direct-kernel-boot`, as arch is required for that;
- part of `cross-bootstrap`, target image is arch-dependent;
NOTE: Patch links are not staged to Fuel@OPNFV, they only serve
as markers that a specific patch is part of a feature.
CHANGE:
Kill all Fuel component submodules, now handled in Fuel@OPNFV:
- fuel-agent
- fuel-astute
- fuel-library
- fuel-mirror
- fuel-nailgun-agent
- fuel-web
CHANGE:
Move armband-fuel-config.mk to armband git root.
FIXME: m1.micro-Increase-profile-RAM-size-to-128MB.patch is NOT
part of `cross-bootstrap` feature, but patch context says so ...
FIXME: 0001-Add-arm64-deb-repositories-setup.patch is broken at
`make patches-export` by removing spaces at EOL.
v2 -> v3:
* Phony patch support (links to show a patch belongs to a feature);
* Updated README.md
v3 -> v7:
* Re-export Fuel submodules & plugins patches (update patch context);
* Update Cavium mail addresses (s/caviumnetworks.com/cavium.com/);
* Ignore submodule changes;
* Add armband git repo info to gitinfo_fuel.txt at build time;
Implements: ARMBAND-136
Closes-bug: ARMBAND-95
Closes-bug: ARMBAND-93
Closes-bug: ARMBAND-92
Change-Id: I1a236d9f43b2e6dca22055911f696b43c22b5973
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'patches/fuel-web/direct-kernel-boot')
l--------- | patches/fuel-web/direct-kernel-boot/0000-Add-arch-to-nailgun-release-and-target-image.patch | 1 | ||||
-rw-r--r-- | patches/fuel-web/direct-kernel-boot/0001-direct-kernel-boot-for-cirros.patch | 137 |
2 files changed, 138 insertions, 0 deletions
diff --git a/patches/fuel-web/direct-kernel-boot/0000-Add-arch-to-nailgun-release-and-target-image.patch b/patches/fuel-web/direct-kernel-boot/0000-Add-arch-to-nailgun-release-and-target-image.patch new file mode 120000 index 00000000..64ff45c3 --- /dev/null +++ b/patches/fuel-web/direct-kernel-boot/0000-Add-arch-to-nailgun-release-and-target-image.patch @@ -0,0 +1 @@ +../0002-Add-arch-to-nailgun-release-and-target-image.patch
\ No newline at end of file diff --git a/patches/fuel-web/direct-kernel-boot/0001-direct-kernel-boot-for-cirros.patch b/patches/fuel-web/direct-kernel-boot/0001-direct-kernel-boot-for-cirros.patch new file mode 100644 index 00000000..0f9395c3 --- /dev/null +++ b/patches/fuel-web/direct-kernel-boot/0001-direct-kernel-boot-for-cirros.patch @@ -0,0 +1,137 @@ +From: Stanislaw Kardach <stanislaw.kardach@cavium.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 | 68 ++++++++++++++++------ + 2 files changed, 61 insertions(+), 23 deletions(-) + +diff --git a/nailgun/nailgun/orchestrator/base_serializers.py b/nailgun/nailgun/orchestrator/base_serializers.py +index 2fb0da5..ac787ed 100644 +--- a/nailgun/nailgun/orchestrator/base_serializers.py ++++ b/nailgun/nailgun/orchestrator/base_serializers.py +@@ -145,12 +145,16 @@ class MuranoMetadataSerializerMixin(object): + + def inject_murano_settings(self, image_data): + """Adds murano metadata to the test image""" +- 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 e561324..601301b 100644 +--- a/nailgun/nailgun/orchestrator/deployment_serializers.py ++++ b/nailgun/nailgun/orchestrator/deployment_serializers.py +@@ -283,6 +283,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', +@@ -305,8 +308,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 = [] + +@@ -321,8 +324,38 @@ class DeploymentMultinodeSerializer(object): + glance_properties.append('--property hypervisor_type=vmware') + + image_data['glance_properties'] = ' '.join(glance_properties) ++ 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': 128, ++ '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': 128, ++ 'glance_properties': '', ++ } ++ images += [kernel_data, initrd_data] + +- return {'test_vm_image': image_data} ++ return {'test_vm_image': images} + + @classmethod + def get_net_provider_serializer(cls, cluster): +@@ -521,20 +554,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 + |