Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
- index d78cb50..875d00e 100644
- --- a/nova/db/sqlalchemy/api.py
- +++ b/nova/db/sqlalchemy/api.py
- @@ -818,6 +818,20 @@ def compute_node_update(context, compute_id, values):
- # scheduler cache of compute node data in case of races.
- values['updated_at'] = timeutils.utcnow()
- convert_objects_related_datetimes(values)
- +
- + # We need to return the augmented compute_ref we queried
- + # above because it has all the inventory junk in it,
- + # so we have to pick the model and do the update of both
- + # manually here.
- + compute = models.ComputeNode()
- + compute.id = compute_id
- +
- + # This should not be necessary
- + #compute.update({k: v for k, v in compute_ref.items()
- + # if hasattr(compute, k)})
- +
- + compute.update(values)
- + compute.save(context.session) # <- tries to INSERT
- compute_ref.update(values)
- return compute_ref
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement