Permit Ironic to notify IPA it can support MD5

Adds a new configuration option which can be set by an
operator to tell Ironic's agent that it is able to process
an MD5 checksum.

Depends-On: https://review.opendev.org/c/openstack/ironic-python-agent/+/882367
Change-Id: I79228e773db9e60fcc2d16ec028ba233c4ba756f
This commit is contained in:
Julia Kreger 2023-05-03 09:52:08 -07:00
parent 443cbdebce
commit 84f1a1c321
4 changed files with 14 additions and 0 deletions

View File

@ -57,6 +57,7 @@ def config(token):
# explicit True statement for newer agents to lock the setting
# and behavior into place.
'agent_token_required': True,
'agent_md5_checksum_enable': CONF.agent.allow_md5_checksum,
}

View File

@ -163,6 +163,12 @@ opts = [
help=_('Path to the TLS CA that is used to start the bare '
'metal API. In some boot methods this file can be '
'passed to the ramdisk.')),
cfg.BoolOpt('allow_md5_checksum',
default=True,
help=_('When enabled, the agent will be notified it is '
'permitted to consider MD5 checksums. This option '
'is expected to change to a default of False in a '
'2024 release of Ironic.')),
]

View File

@ -79,6 +79,7 @@ class TestLookup(test_api_base.BaseApiTest):
'heartbeat_timeout': CONF.api.ramdisk_heartbeat_timeout,
'agent_token': mock.ANY,
'agent_token_required': True,
'agent_md5_checksum_enable': CONF.agent.allow_md5_checksum,
}
self.assertEqual(expected_config, data['config'])
self.assertIsNotNone(data['config']['agent_token'])

View File

@ -0,0 +1,6 @@
---
features:
- |
Adds a ``[agent]allow_md5_checksum`` configuration
option which can be used to tell ``ironic-python-agent`` versions
newer than version ``9.4.0`` if MD5 is a permitted algorithm.