Fix fetching ironic nodes for updating resource classes on upgrade
The correct value of "limit" to fetch all nodes is 0, not -1. This issue prevents all nodes to be updated on upgrade, breaking scaling. Change-Id: I1beac8fb463a6ecfaac3dc7f176d82beba7ffdc7 Closes-Bug: #1731885
This commit is contained in:
parent
8e37c44fbf
commit
d106dda054
|
@ -1444,7 +1444,7 @@ def _ensure_flavor(nova, existing, name, profile=None):
|
|||
|
||||
|
||||
def _ensure_node_resource_classes(ironic):
|
||||
for node in ironic.node.list(limit=-1, fields=['uuid', 'resource_class']):
|
||||
for node in ironic.node.list(limit=0, fields=['uuid', 'resource_class']):
|
||||
if node.resource_class:
|
||||
if node.resource_class != DEFAULT_NODE_RESOURCE_CLASS:
|
||||
LOG.warning('Node %s is using a resource class %s instead '
|
||||
|
|
Loading…
Reference in New Issue