Commit f68f3a22 authored by Romain Courteaud's avatar Romain Courteaud

slapos_upgrader: fixup migration of archived instances

parent 754b3e5d
...@@ -54,7 +54,7 @@ elif not_migrated_instance_tree_dict[instance_tree_relative_url]['project_relati ...@@ -54,7 +54,7 @@ elif not_migrated_instance_tree_dict[instance_tree_relative_url]['project_relati
not_migrated_instance_tree_dict.pop(instance_tree_relative_url) not_migrated_instance_tree_dict.pop(instance_tree_relative_url)
# Node requested to be allocated on a specific node # Node requested to be allocated on a specific node
elif (software_instance is not None) and (sla_xml_dict.get('computer_guid', None) is not None): elif (software_instance is not None) and (instance_tree.getValidationState() != 'archived') and (sla_xml_dict.get('computer_guid', None) is not None):
project_instance_reference = sla_xml_dict.get('computer_guid', None) project_instance_reference = sla_xml_dict.get('computer_guid', None)
project_instance = portal.portal_catalog.getResultValue(portal_type='Compute Node', reference=project_instance_reference) project_instance = portal.portal_catalog.getResultValue(portal_type='Compute Node', reference=project_instance_reference)
...@@ -65,7 +65,7 @@ elif (software_instance is not None) and (sla_xml_dict.get('computer_guid', None ...@@ -65,7 +65,7 @@ elif (software_instance is not None) and (sla_xml_dict.get('computer_guid', None
not_migrated_instance_tree_dict.pop(instance_tree_relative_url) not_migrated_instance_tree_dict.pop(instance_tree_relative_url)
# Slave Node requested to be allocated on a specific project instance # Slave Node requested to be allocated on a specific project instance
elif (software_instance is not None) and (sla_xml_dict.get('instance_guid', None) is not None): elif (software_instance is not None) and (instance_tree.getValidationState() != 'archived') and (sla_xml_dict.get('instance_guid', None) is not None):
project_instance_reference = sla_xml_dict.get('instance_guid', None) project_instance_reference = sla_xml_dict.get('instance_guid', None)
project_instance = portal.portal_catalog.getResultValue(portal_type='Software Instance', reference=project_instance_reference) project_instance = portal.portal_catalog.getResultValue(portal_type='Software Instance', reference=project_instance_reference)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment