Stop wiping driver_internal_info on node.driver updates

It brings more harm than good, e.g. it breaks fast-track. Since
driver-specific fields are name-spaced, there should be no much
harm in keeping them around.

Change-Id: I397d23af64dfd56074cb563eedbe2d1ef8efff53
This commit is contained in:
Dmitry Tantsur 2020-07-16 17:18:17 +02:00
parent 079b22a800
commit 5f557f47f4
2 changed files with 0 additions and 6 deletions

View File

@ -441,10 +441,6 @@ class Node(base.IronicObject, object_base.VersionedObjectDictCompat):
updates = self.do_version_changes_for_db()
self._validate_property_values(updates.get('properties'))
if 'driver' in updates and 'driver_internal_info' not in updates:
# Clean driver_internal_info when changes driver
self.driver_internal_info = {}
updates = self.do_version_changes_for_db()
self._validate_and_remove_traits(updates)
self._validate_and_format_conductor_group(updates)
db_node = self.dbapi.update_node(self.uuid, updates)

View File

@ -171,7 +171,6 @@ class TestNodeObject(db_base.DbTestCase, obj_utils.SchemasTestMixIn):
mock_update_node.assert_called_once_with(
uuid, {'properties': {"fake": "property"},
'driver': 'fake-driver',
'driver_internal_info': {},
'version': objects.Node.VERSION})
self.assertEqual(self.context, n._context)
res_updated_at = (n.updated_at).replace(tzinfo=None)
@ -221,7 +220,6 @@ class TestNodeObject(db_base.DbTestCase, obj_utils.SchemasTestMixIn):
{
'properties': {'fake': 'property'},
'driver': 'fake-driver',
'driver_internal_info': {},
'version': objects.Node.VERSION,
'maintenance_reason':
maintenance_reason[