Skip to content

Commit

Permalink
Set the hypervisor_type for all images to qemu (#783)
Browse files Browse the repository at this point in the history
This also removes the hypervisor CLI parameter. It makes no sense to
change the hypervisor for all images as the hypervisor is defined for
each image.

Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt authored Apr 15, 2024
1 parent 8b727e4 commit 30ad361
Show file tree
Hide file tree
Showing 17 changed files with 31 additions and 7 deletions.
2 changes: 2 additions & 0 deletions etc/images/almalinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: centos
os_version: '8'
replace_frequency: quarterly
Expand Down Expand Up @@ -49,6 +50,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: centos
os_version: '9'
replace_frequency: quarterly
Expand Down
3 changes: 3 additions & 0 deletions etc/images/centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: centos
os_version: '7'
replace_frequency: critical_bug
Expand Down Expand Up @@ -49,6 +50,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: centos
os_version: '8'
replace_frequency: quarterly
Expand Down Expand Up @@ -82,6 +84,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: centos
os_version: '9'
replace_frequency: quarterly
Expand Down
1 change: 1 addition & 0 deletions etc/images/cirros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: cirros
replace_frequency: never
uuid_validity: none
Expand Down
1 change: 1 addition & 0 deletions etc/images/clearlinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: clearlinux
replace_frequency: never
uuid_validity: none
Expand Down
3 changes: 3 additions & 0 deletions etc/images/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: debian
os_version: '10'
replace_frequency: quarterly
Expand Down Expand Up @@ -50,6 +51,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: debian
os_version: '11'
replace_frequency: quarterly
Expand Down Expand Up @@ -84,6 +86,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: debian
os_version: '12'
replace_frequency: quarterly
Expand Down
1 change: 1 addition & 0 deletions etc/images/fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ images:
hw_scsi_model: virtio-scsi
hw_rng_model: virtio
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: fedora
os_version: '37'
replace_frequency: quarterly
Expand Down
1 change: 1 addition & 0 deletions etc/images/flatcar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: fedora
replace_frequency: never
uuid_validity: none
Expand Down
1 change: 1 addition & 0 deletions etc/images/gardenlinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: debian
replace_frequency: never
uuid_validity: none
Expand Down
1 change: 1 addition & 0 deletions etc/images/kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: ubuntu
replace_frequency: never
uuid_validity: none
Expand Down
1 change: 1 addition & 0 deletions etc/images/opensuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: opensuse
os_version: '15.4'
replace_frequency: quarterly
Expand Down
1 change: 1 addition & 0 deletions etc/images/opnsense.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: freebsd
replace_frequency: never
uuid_validity: none
Expand Down
1 change: 1 addition & 0 deletions etc/images/osism.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: ubuntu
os_version: '22.04'
replace_frequency: quarterly
Expand Down
2 changes: 2 additions & 0 deletions etc/images/rockylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: centos
os_version: '8'
replace_frequency: quarterly
Expand Down Expand Up @@ -50,6 +51,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: centos
os_version: '9'
replace_frequency: quarterly
Expand Down
1 change: 1 addition & 0 deletions etc/images/talos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: talos
replace_frequency: never
uuid_validity: none
Expand Down
10 changes: 10 additions & 0 deletions etc/images/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: ubuntu
os_version: '14.04'
replace_frequency: never
Expand Down Expand Up @@ -49,6 +50,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: ubuntu
os_version: '16.04'
replace_frequency: never
Expand Down Expand Up @@ -82,6 +84,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: ubuntu
os_version: '16.04'
replace_frequency: never
Expand Down Expand Up @@ -115,6 +118,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: ubuntu
os_version: '18.04'
replace_frequency: quarterly
Expand Down Expand Up @@ -146,6 +150,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: ubuntu
os_version: '18.04'
replace_frequency: quarterly
Expand Down Expand Up @@ -179,6 +184,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: ubuntu
os_version: '20.04'
replace_frequency: quarterly
Expand Down Expand Up @@ -210,6 +216,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: ubuntu
os_version: '20.04'
replace_frequency: quarterly
Expand Down Expand Up @@ -243,6 +250,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: ubuntu
os_version: '22.04'
replace_frequency: quarterly
Expand Down Expand Up @@ -274,6 +282,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: ubuntu
os_version: '22.04'
replace_frequency: quarterly
Expand Down Expand Up @@ -307,6 +316,7 @@ images:
hw_rng_model: virtio
hw_scsi_model: virtio-scsi
hw_watchdog_action: reset
hypervisor_type: qemu
os_distro: ubuntu
os_version: '24.04'
replace_frequency: quarterly
Expand Down
1 change: 1 addition & 0 deletions etc/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ image:
---
meta:
architecture: enum('x86_64', 'aarch64', 'risc-v')
hypervisor_type: enum('hyperv', 'ironic', 'lxc', 'qemu', 'uml', 'vmware', 'xen')
hotfix_hours: int(min=0, required=False)
hw_disk_bus: enum('virtio', 'scsi', None)
hw_rng_model: enum('virtio', None, required=False)
Expand Down
7 changes: 0 additions & 7 deletions openstack_image_manager/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ def create_cli_args(
filter: str = typer.Option(
None, help="Filter images with a regex on their name"
),
hypervisor: str = typer.Option(
None, help="Set hypervisor type meta information"
),
deactivate: bool = typer.Option(
False, "--deactivate", help="Deactivate images that should be deleted"
),
Expand Down Expand Up @@ -754,10 +751,6 @@ def set_properties(
logger.info(f"Setting image_original_user = {image['login']}")
image["meta"]["image_original_user"] = image["login"]

if self.CONF.hypervisor:
logger.info(f"Setting hypervisor type = {self.CONF.hypervisor}")
image["meta"]["hypervisor_type"] = self.CONF.hypervisor

if version == "latest" and upstream_checksum:
image["meta"]["upstream_checksum"] = upstream_checksum

Expand Down

0 comments on commit 30ad361

Please sign in to comment.