Skip to content

Commit

Permalink
Stick with openstack platform ID to let ignition know how to handle t…
Browse files Browse the repository at this point in the history
…he platform

Signed-off-by: Roman Mohr <rmohr@redhat.com>
  • Loading branch information
rmohr committed Mar 17, 2022
1 parent 083ef71 commit f0e6c52
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/cosalib/qemuvariants.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
sha256sum_file
)


# BASEARCH is the current machine architecture
BASEARCH = get_basearch()

Expand Down Expand Up @@ -94,6 +93,7 @@
"kubevirt": {
"image_format": "qcow2",
"platform": "kubevirt",
"ignition_identifier_override": "openstack",
},
"openstack": {
"image_format": "qcow2",
Expand All @@ -107,7 +107,7 @@
"image_format": "vmdk",
"image_suffix": "vmdk",
"platform": "vmware",
"convert_options": {
"convert_options": {
'-o': 'adapter_type=lsilogic,subformat=streamOptimized,compat6'
}
},
Expand Down Expand Up @@ -153,6 +153,7 @@ def __init__(self, **kwargs):
image_format: standard qemu types
convert_options: optional qemu arguments
platform: the name of the image.
ignition_identifier_override: use a different platform identifier inside the image.
platform_image_name: in case you want to use a different name
virtual_size: in case you want to explicitly set a virtual size
Expand Down Expand Up @@ -180,6 +181,9 @@ def __init__(self, **kwargs):
self.platform_image_name = kwargs.get(
"platform_image_name", self.platform)

self.ignition_platform_identifier = kwargs.get(
"ignition_identifier_override", self.platform)

_Build.__init__(self, **kwargs)

@property
Expand Down Expand Up @@ -216,7 +220,7 @@ def image_meta(self):

def set_platform(self):
run_verbose(['/usr/lib/coreos-assembler/gf-platformid',
self.image_qemu, self.tmp_image, self.platform])
self.image_qemu, self.tmp_image, self.ignition_platform_identifier])

def mutate_image(self):
"""
Expand Down

0 comments on commit f0e6c52

Please sign in to comment.