Use UEFI by default and deprecate legacy boot

Change-Id: If31bb7e15dd1213b3b17f1aa2a80c0307f2fca91
This commit is contained in:
Dmitry Tantsur 2021-11-19 14:05:20 +01:00
parent 6c46346383
commit 69cbcf4348
6 changed files with 28 additions and 14 deletions

View File

@ -123,7 +123,7 @@ def cmd_testenv(args):
test_vm_disk_gib=args.disk,
test_vm_domain_type=args.domain_type,
test_vm_node_driver=args.driver,
default_boot_mode='uefi' if args.uefi else 'bios',
default_boot_mode=args.boot_mode or 'uefi',
baremetal_json_file=os.path.abspath(args.inventory),
baremetal_nodes_json=os.path.abspath(args.output),
extra_vars=args.extra_vars,
@ -169,7 +169,7 @@ def cmd_install(args):
use_tinyipa=args.testenv,
developer_mode=args.develop,
enable_prometheus_exporter=args.enable_prometheus_exporter,
default_boot_mode='uefi' if args.uefi else 'bios',
default_boot_mode=args.boot_mode or 'uefi',
include_dhcp_server=not args.disable_dhcp,
extra_vars=args.extra_vars,
**kwargs)
@ -224,8 +224,13 @@ def parse_args():
testenv.add_argument('--driver', default='ipmi',
choices=['ipmi', 'redfish'],
help='driver for testing nodes')
testenv.add_argument('--uefi', action='store_true',
help='boot testing VMs with UEFI by default')
boot_mode = testenv.add_mutually_exclusive_group()
boot_mode.add_argument('--uefi', dest='boot_mode',
action='store_const', const='uefi',
help='boot testing VMs with UEFI by default')
boot_mode.add_argument('--legacy-boot', dest='boot_mode',
action='store_const', const='bios',
help='boot testing VMs with legacy boot by default')
testenv.add_argument('-e', '--extra-vars', action='append',
help='additional vars to pass to ansible')
testenv.add_argument('-o', '--output', default='baremetal-nodes.json',
@ -261,8 +266,13 @@ def parse_args():
'deployments (can take a lot of time)')
install.add_argument('--enable-prometheus-exporter', action='store_true',
help='Enable Ironic Prometheus Exporter')
install.add_argument('--uefi', action='store_true',
help='use UEFI by default')
boot_mode = install.add_mutually_exclusive_group()
boot_mode.add_argument('--uefi', dest='boot_mode',
action='store_const', const='uefi',
help='use UEFI boot by default')
boot_mode.add_argument('--legacy-boot', dest='boot_mode',
action='store_const', const='bios',
help='use legacy boot (BIOS) by default')
install.add_argument('--disable-dhcp', action='store_true',
help='Disable integrated dhcp server')
install.add_argument('-e', '--extra-vars', action='append',

View File

@ -286,8 +286,8 @@ Additionally, the following parameters can be useful:
``--enable-prometheus-exporter``
Enable the Ironic Prometheus Exporter service.
``--uefi``
Boot machines in the UEFI mode by default.
``--uefi`` / ``--legacy-boot``
Boot machines in the UEFI or BIOS mode by default (defaults to UEFI).
``--disable-dhcp``
Disable the configuration of the integrated DHCP server, allowing to use

View File

@ -156,7 +156,7 @@ enabled_vendor_interfaces: ""
default_resource_class: baremetal
default_boot_mode: ""
default_boot_mode: uefi
enable_credential_less_deploy: false

View File

@ -78,9 +78,7 @@ enable_netboot_fallback = true
http_url = http://{{ internal_ip }}:{{ file_url_port }}/
http_root = {{ http_boot_folder }}
default_boot_option = local
{% if default_boot_mode | default('') != '' %}
default_boot_mode = {{ default_boot_mode }}
{% endif %}
fast_track = {{ fast_track }}
{% if cleaning_disk_erase | bool %}
erase_devices_priority = 10

View File

@ -0,0 +1,9 @@
---
upgrade:
- |
Bifrost now uses UEFI by default. Set ``default_boot_mode`` to ``bios``
or use the ``--legacy-boot`` CLI flag to override.
deprecations:
- |
Using legacy boot is deprecated, although we don't have immediate plans
to remove its support. Please consider using UEFI.

View File

@ -117,7 +117,6 @@
name: bifrost-integration-redfish-vmedia-uefi-ubuntu-focal
parent: bifrost-integration-tinyipa-ubuntu-focal
vars:
boot_mode: uefi
enable_tls: true
test_driver: redfish
use_vmedia: true
@ -150,7 +149,6 @@
name: bifrost-integration-redfish-vmedia-uefi-centos-8
parent: bifrost-integration-tinyipa-centos-8
vars:
boot_mode: uefi
test_driver: redfish
use_vmedia: true
@ -179,7 +177,6 @@
name: bifrost-integration-redfish-uefi-fedora-latest
parent: bifrost-integration-tinyipa-fedora-latest
vars:
boot_mode: uefi
test_driver: redfish
- job: