Merge "Deprecate Classic Drivers"

This commit is contained in:
Zuul 2018-02-05 20:40:08 +00:00 committed by Gerrit Code Review
commit 9a7d9aac45
11 changed files with 79 additions and 36 deletions

View File

@ -99,7 +99,7 @@ Example JSON Element:
"mac": "00:01:02:03:04:06"
}
],
"driver": "agent_ipmitool",
"driver": "ipmi",
"ipv4_address": "192.168.122.2",
"properties": {
"cpu_arch": "x86_64",
@ -269,7 +269,7 @@ def _process_baremetal_csv(data_source, groups, hostvars):
host['provisioning_ipv4_address'] = host['ipv4_address']
# Default Driver unless otherwise defined or determined.
host['driver'] = "agent_ipmitool"
host['driver'] = "ipmi"
if len(row) > 15:
driver = _val_or_none(row, 16)
@ -277,8 +277,8 @@ def _process_baremetal_csv(data_source, groups, hostvars):
host['driver'] = driver
if "ipmi" in host['driver']:
# Set agent_ipmitool by default
host['driver'] = "agent_ipmitool"
# Set ipmi by default
host['driver'] = "ipmi"
power['ipmi_address'] = management_address
power['ipmi_username'] = management_username
power['ipmi_password'] = management_password

View File

@ -38,9 +38,9 @@ unused,,00000000-0000-0000-0000-000000000001,hostname0,
192.168.1.2,,,,|
00:01:02:03:04:06,root,undefined,192.0.2.3,2,8192,1024,
unused,,00000000-0000-0000-0000-000000000002,hostname1,
192.168.1.3,,,,,agent_ipmitool""".replace('\n', '').replace('|', '\n')
192.168.1.3,,,,,ipmi""".replace('\n', '').replace('|', '\n')
expected_hostvars = """{"hostname1":
{"uuid": "00000000-0000-0000-0000-000000000002", "driver": "agent_ipmitool",
{"uuid": "00000000-0000-0000-0000-000000000002", "driver": "ipmi",
"name": "hostname1", "ipv4_address": "192.168.1.3",
"provisioning_ipv4_address": "192.168.1.3" ,"ansible_ssh_host":
"192.168.1.3", "driver_info": {"power": {"ipmi_address": "192.0.2.3",
@ -50,7 +50,7 @@ unused,,00000000-0000-0000-0000-000000000002,hostname1,
[{"mac": "00:01:02:03:04:06"}], "properties": {"ram": "8192", "cpu_arch":
"x86_64", "disk_size": "1024", "cpus": "2"}, "host_groups": ["baremetal"]},
"hostname0":
{"uuid": "00000000-0000-0000-0000-000000000001", "driver": "agent_ipmitool",
{"uuid": "00000000-0000-0000-0000-000000000001", "driver": "ipmi",
"name": "hostname0", "ipv4_address": "192.168.1.2",
"provisioning_ipv4_address": "192.168.1.2", "ansible_ssh_host":
"192.168.1.2", "driver_info": {"power": {"ipmi_address": "192.0.2.2",
@ -70,10 +70,10 @@ unused,,00000000-0000-0000-0000-000000000002,hostname1,
def test_csv_file_conversion_ipmi_dual_bridging(self):
CSV = """00:01:02:03:04:06,root,undefined,192.0.2.3,2,8192,1024,
unused,,00000000-0000-0000-0000-000000000002,hostname1,
192.168.1.3,10,20,30,40,agent_ipmitool""".replace('\n', '').replace('|', '\n')
192.168.1.3,10,20,30,40,ipmi""".replace('\n', '').replace('|', '\n')
expected_hostvars = """{"hostname1":
{"uuid": "00000000-0000-0000-0000-000000000002", "driver": "agent_ipmitool",
{"uuid": "00000000-0000-0000-0000-000000000002", "driver": "ipmi",
"name": "hostname1", "ipv4_address": "192.168.1.3",
"provisioning_ipv4_address": "192.168.1.3", "ansible_ssh_host":
"192.168.1.3", "driver_info": {"power": {"ipmi_address": "192.0.2.3",
@ -95,10 +95,10 @@ unused,,00000000-0000-0000-0000-000000000002,hostname1,
def test_csv_file_conversion_ipmi_single_bridging(self):
CSV = """00:01:02:03:04:06,root,undefined,192.0.2.3,2,8192,1024,
unused,,00000000-0000-0000-0000-000000000002,hostname1,
192.168.1.3,10,20,,,agent_ipmitool""".replace('\n', '').replace('|', '\n')
192.168.1.3,10,20,,,ipmi""".replace('\n', '').replace('|', '\n')
expected_hostvars = """{"hostname1":
{"uuid": "00000000-0000-0000-0000-000000000002", "driver": "agent_ipmitool",
{"uuid": "00000000-0000-0000-0000-000000000002", "driver": "ipmi",
"name": "hostname1", "ipv4_address": "192.168.1.3",
"provisioning_ipv4_address": "192.168.1.3", "ansible_ssh_host":
"192.168.1.3", "driver_info": {"power": {"ipmi_address": "192.0.2.3",
@ -116,10 +116,10 @@ unused,,00000000-0000-0000-0000-000000000002,hostname1,
def test_csv_file_conversion_dhcp(self):
CSV = """00:01:02:03:04:06,root,undefined,192.0.2.3,2,8192,1024,
unused,,00000000-0000-0000-0000-000000000002,hostname1
,,,,,,agent_ipmitool""".replace('\n', '').replace('|', '\n')
,,,,,,ipmi""".replace('\n', '').replace('|', '\n')
expected_hostvars = """{"hostname1":
{"uuid": "00000000-0000-0000-0000-000000000002", "driver": "agent_ipmitool",
{"uuid": "00000000-0000-0000-0000-000000000002", "driver": "ipmi",
"name": "hostname1", "addressing_mode": "dhcp", "ipv4_address": null,
"provisioning_ipv4_address": null,
"driver_info": {"power": {"ipmi_address": "192.0.2.3", "ipmi_password":
@ -140,10 +140,10 @@ unused,,00000000-0000-0000-0000-000000000002,hostname1
# is identical.
CSV = """00:01:02:03:04:06,root,undefined,192.0.2.3,2,8192,1024,
unused,,00000000-0000-0000-0000-000000000002,hostname1
,,,,,,agent_ipmitool""".replace('\n', '')
,,,,,,ipmi""".replace('\n', '')
expected_hostvars = """{"hostname1":
{"uuid": "00000000-0000-0000-0000-000000000002", "driver": "agent_ipmitool",
{"uuid": "00000000-0000-0000-0000-000000000002", "driver": "ipmi",
"name": "hostname1", "addressing_mode": "dhcp", "ipv4_address": null,
"provisioning_ipv4_address": null,
"driver_info": {"power": {"ipmi_address": "192.0.2.3", "ipmi_password":
@ -166,9 +166,9 @@ unused,,00000000-0000-0000-0000-000000000001,hostname0,
192.168.1.2,,,,|
00:01:02:03:04:06,root,undefined,192.0.2.3,2,8192,1024,
unused,,00000000-0000-0000-0000-000000000002,hostname1,
192.168.1.3,,,,,agent_ipmitool""".replace('\n', '').replace('|', '\n')
192.168.1.3,,,,,ipmi""".replace('\n', '').replace('|', '\n')
expected_hostvars = """{"hostname1":
{"uuid": "00000000-0000-0000-0000-000000000002", "driver": "agent_ipmitool",
{"uuid": "00000000-0000-0000-0000-000000000002", "driver": "ipmi",
"name": "hostname1", "ipv4_address": "192.168.1.3", "ansible_ssh_host":
"192.168.1.3", "provisioning_ipv4_address": "192.168.1.3",
"driver_info": {"power": {"ipmi_address": "192.0.2.3",
@ -178,7 +178,7 @@ unused,,00000000-0000-0000-0000-000000000002,hostname1,
[{"mac": "00:01:02:03:04:06"}], "properties": {"ram": "8192", "cpu_arch":
"x86_64", "disk_size": "1024", "cpus": "2"}, "host_groups": ["baremetal"]},
"hostname0":
{"uuid": "00000000-0000-0000-0000-000000000001", "driver": "agent_ipmitool",
{"uuid": "00000000-0000-0000-0000-000000000001", "driver": "ipmi",
"name": "hostname0", "ipv4_address": "192.168.1.2", "ansible_ssh_host":
"192.168.1.2", "provisioning_ipv4_address": "192.168.1.2",
"driver_info": {"power": {"ipmi_address": "192.0.2.2",
@ -200,7 +200,7 @@ unused,,00000000-0000-0000-0000-000000000002,hostname1,
# that we get the same output when we pass something
# in as YAML
expected_hostvars = """{"hostname1":
{"uuid": "00000000-0000-0000-0000-000000000002", "driver": "agent_ipmitool",
{"uuid": "00000000-0000-0000-0000-000000000002", "driver": "ipmi",
"name": "hostname1", "ipv4_address": "192.168.1.3", "ansible_ssh_host":
"192.168.1.3", "provisioning_ipv4_address": "192.168.1.3",
"driver_info": {"power": {"ipmi_address": "192.0.2.3",
@ -210,7 +210,7 @@ unused,,00000000-0000-0000-0000-000000000002,hostname1,
[{"mac": "00:01:02:03:04:06"}], "properties": {"ram": "8192", "cpu_arch":
"x86_64", "disk_size": "1024", "cpus": "2"}, "host_groups":
["baremetal", "nova"]}, "hostname0":
{"uuid": "00000000-0000-0000-0000-000000000001", "driver": "agent_ipmitool",
{"uuid": "00000000-0000-0000-0000-000000000001", "driver": "ipmi",
"name": "hostname0", "ipv4_address": "192.168.1.2", "ansible_ssh_host":
"192.168.1.2", "provisioning_ipv4_address": "192.168.1.2",
"driver_info": {"power": {}}, "nics":
@ -225,11 +225,11 @@ unused,,00000000-0000-0000-0000-000000000002,hostname1,
input_json = """{"h0000-01":{"uuid":
"00000000-0000-0000-0001-bad00000010","name":"h0000-01","driver_info"
:{"power":{"ipmi_address":"10.0.0.78","ipmi_username":"ADMIN","
ipmi_password":"ADMIN"}},"driver":"agent_ipmitool"}}""".replace('\n', '')
ipmi_password":"ADMIN"}},"driver":"ipmi"}}""".replace('\n', '')
expected_json = """{"h0000-01":{"uuid":
"00000000-0000-0000-0001-bad00000010","name":"h0000-01","driver_info"
:{"power":{"ipmi_address":"10.0.0.78","ipmi_username":"ADMIN","
ipmi_password":"ADMIN"}},"driver":"agent_ipmitool","addressing_mode":
ipmi_password":"ADMIN"}},"driver":"ipmi","addressing_mode":
"dhcp","host_groups": ["baremetal"]}}""".replace('\n', '')
(groups, hostvars) = utils.bifrost_data_conversion(input_json)
self.assertDictEqual(json.loads(str(expected_json)), hostvars)

View File

@ -140,7 +140,7 @@ The CSV file has the following columns:
Example definition::
00:11:22:33:44:55,root,undefined,192.168.122.1,1,8192,512,NA,NA,aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee,hostname_100,192.168.2.100,,,,agent_ipmitool,10.0.0.9
00:11:22:33:44:55,root,undefined,192.168.122.1,1,8192,512,NA,NA,aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee,hostname_100,192.168.2.100,,,,ipmi,10.0.0.9
This file format is fairly flexible and can be easily modified
although the enrollment and deployment playbooks utilize the model

View File

@ -16,7 +16,7 @@
"mac": "00:00:00:12:34:57"
}
],
"driver": "agent_ipmitool",
"driver": "ipmi",
"ipv4_address": "192.168.1.2",
"properties": {
"cpu_arch": "x86_64",
@ -54,7 +54,7 @@
"image_source": "http://192.168.1.1:8080/custom_deployment_image.qcow2",
"image_checksum": "493972895dc465a09702ce6e85a836c5"
},
"driver": "agent_ipmitool",
"driver": "ipmi",
"ipv4_address": "192.168.1.3",
"properties": {
"cpu_arch": "x86_64",

View File

@ -11,7 +11,7 @@
mac: "00:00:00:23:34:56"
-
mac: "00:00:00:12:34:57"
driver: "agent_ipmitool"
driver: "ipmi"
ipv4_address: "192.168.1.2"
properties:
cpu_arch: "x86_64"
@ -41,7 +41,7 @@
instance_info:
image_source: "http://192.168.1.1:8080/custom_deployment_image.qcow2"
image_checksum: "493972895dc465a09702ce6e85a836c5"
driver: "agent_ipmitool"
driver: "ipmi"
ipv4_address: "192.168.1.3"
properties:
cpu_arch: "x86_64"

View File

@ -136,7 +136,7 @@
name: "{{ vm_name }}"
uuid: "{{ vm_name | to_uuid }}"
host_groups: "{{ vm_host_group }}"
driver: "{{ test_vm_node_driver|default('agent_ipmitool') }}"
driver: "{{ test_vm_node_driver|default('ipmi') }}"
driver_info:
power:
ipmi_address: "192.168.122.1"

View File

@ -19,8 +19,8 @@ Role Variables
--------------
Testing mode is intended to help facilitate testing of the bifrost roles and
ironic by utilizing virtual machines on the localhost and the agent_ipmitool
driver. This variable should be set globally for playbooks utilizing the
ironic by utilizing virtual machines on the localhost and the ipmi hardware
type. This variable should be set globally for playbooks utilizing the
bifrost-ironic-install role.
testing: false
@ -84,9 +84,9 @@ In case your HW needs a kernel option to boot, set the following variable:
extra_kernel_options: Default undefined.
When testing, the default ironic conductor driver is "agent_ipmitool". When
testing mode has not been engaged, drivers can be set via the enabled_drivers
variable which defaults to: "agent_ipmitool,agent_ilo,agent_ucs"
When testing, the default ironic conductor hardware type is "ipmi". When
testing mode has not been engaged, hardware types can be enabled using
the "enabled_hardare_types" variable, which defaults to "ipmi, ilo, ucs".
By default, PXE driver baseline support, in terms of installation of the
iSCSI client and configuration of sudoers and rootwrap configuration is
@ -215,7 +215,7 @@ enable_inspector_discovery: Boolean value, default true. This instructs
inspector_default_node_driver: The default driver to utilize when adding
discovered nodes to ironic.
The default value set by bifrost is
`agent_ipmitool`. Users should change this
`ipmi`. Users should change this
setting for their install environment if
an alternative default driver is required.

View File

@ -82,6 +82,12 @@ ironicinspector_git_folder: /opt/stack/ironic-inspector
ironicinspectorclient_git_folder: /opt/stack/python-ironic-inspector-client
staging_drivers_git_url: http://git.openstack.org/cgit/openstack/ironic-staging-drivers
# TODO(TheJulia): Add redfish to this list.
enabled_hardware_types: "ipmi,ilo,ucs"
default_deploy_interface: "direct"
# DEPRECATED: Ironic is removing classic drivers in Rocky. Please see
# enabled_hardware_types.
# Comma-separated list, in the format of a string, of drivers that are enabled
# by default. This is intended to be a list of agent based drivers.
# PXE drivers can be found in the setting pxe_drivers that can be found below.
@ -162,18 +168,25 @@ inspector_keep_ports: "present"
inspector:
discovery:
enabled: "{{ enable_inspector_discovery | default(true) }}"
default_node_driver: "{{ inspector_default_node_driver | default('agent_ipmitool')}}"
default_node_driver: "{{ inspector_default_node_driver | default('ipmi')}}"
# We may not have packaged iPXE files on some distros, or may want to
# download them on their own.
download_ipxe: false
# DEPRECATED: Please see enabled_hardware_types
# This enables installation of substrate for PXE driver support
enable_pxe_drivers: true
# DEPRECATED: Please see enabled_hardware_types
# Comma-separated list of PXE drivers to enable when
# enable_pxe_drivers is set to true
pxe_drivers: "pxe_ipmitool,pxe_ilo"
# Settings related to installing bifrost in a virtual environment
enable_venv: false
bifrost_venv_dir: "{{ lookup('env', 'VENV') | default('/opt/stack/bifrost') }}"

View File

@ -25,6 +25,9 @@
The configured network interface {{ network_interface }} does
not have an IP address assigned
when: not hostvars[inventory_hostname]['ansible_' ~ network_interface].get('ipv4', {}).get('address')
# DEPRECATED: enabled_drivers, pxe_drivers, and enable_pxe_drivers has
# been deprecated and will be removed in the Rocky release. Please consult
# enabled_hardware_types.
- name: "Update driver list if PXE drivers are enabled"
set_fact:
enabled_drivers: "{{ enabled_drivers }},{{ pxe_drivers }}"

View File

@ -9,10 +9,18 @@
# configuration besides a flat network where bifrost orchustrates the
# control instead of ironic, noop is the only available network driver.
enabled_network_interfaces = noop
default_deploy_interface = {{ default_deploy_interface }}
{% if enable_inspector | bool == true %}
enabled_inspect_interfaces = no-inspect,inspector
default_inspect_interface = inspector
{% endif %}
{% if testing | bool == true %}
enabled_drivers = agent_ipmitool,pxe_ipmitool
debug = true
# Default enable ipmi for CI testing
enabled_hardware_types = ipmi
{% else %}
enabled_hardware_types = {{ enabled_hardware_types }}
enabled_drivers = {{ enabled_drivers }}
debug = false
{% endif %}

View File

@ -0,0 +1,19 @@
---
features:
- |
The ``enabled_hardware_types`` variable has been introduced to support
use of hardware types.
The ``default_deploy_interface`` variable has been introduced to support
setting a default method of deployment for new nodes. It defaults to the
``direct`` deployment interface.
deprecations:
- |
Ironic has deprecated support for classic drivers. These were the drivers
that were prepended with ``agent`` or ``pxe``. The new default hardware type,
which superceeds drivers, is ``ipmi``. The default deployment interface is
``direct``, which superceeds the ``agent`` driver type. Support for classic
Drivers, will be removed from Bifrost in the Rocky release cycle.
issues:
- |
Support for hardware types is in the beginning stages in Bifrost. Presently
the ``os_ironic`` ansible module does not yet understand hardware types.