slapos.proxy: fix slave requests.

Include correct partition_reference.
parent 09992a50
......@@ -634,7 +634,12 @@ def requestSlave(software_release, software_type, partition_reference, partition
a(software_type)
if 'instance_guid' in filter_kw:
q += ' AND reference=?'
a(filter_kw['instance_guid'])
# instance_guid should be like: %s-%s % (requested_computer_id, partition_id)
# But code is convoluted here, so we check
if instance_guid.startswith(requested_computer_id):
a(instance_guid[len(requested_computer_id) + 1:])
else:
a(instance_guid)
partition = execute_db('partition', q, args, one=True)
if partition is None:
......
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