Remove data key from bootdata until better delivery method is found

This commit is contained in:
Scott Hussey 2017-06-22 18:47:49 -05:00
parent 95a416fd9f
commit 14089f60d7
2 changed files with 5 additions and 16 deletions

View File

@ -28,17 +28,17 @@ class BootdataResource(StatefulResource):
resp.body = BootdataResource.systemd_definition
resp.content_type = 'text/plain'
return
elif data_key == 'prom_init':
resp.boy = BootdataResource.prominit
elif data_key == 'prominit':
resp.boy = BootdataResource.prom_init
resp.content_type = 'text/plain'
return
else:
elif data_key == 'promconfig':
bootdata = self.state_manager.get_bootdata_key(hostname)
if bootdata is None:
resp.status = falcon.HTTP_404
return
elif bootdata.get('key', None) == data_key:
else:
resp.content_type = 'text/plain'
host_design_id = bootdata.get('design_id', None)
@ -65,9 +65,6 @@ class BootdataResource(StatefulResource):
resp.body = yaml.dump_all(part_list, explicit_start=True)
return
else:
resp.status = falcon.HTTP_403
return
systemd_definition = \
"""[Unit]

View File

@ -1136,15 +1136,7 @@ class MaasTaskRunner(drivers.DriverTaskRunner):
self.logger.warning("Error acquiring node %s, skipping" % n)
failed = True
continue
# Need to create bootdata keys for all the nodes being deployed
# TODO this should be in the orchestrator
node = site_design.get_baremetal_node(n)
data_key = str(uuid.uuid4())
self.state_manager.set_bootdata_key(n, self.task.design_id, data_key)
node.owner_data['bootdata_key'] = data_key
self.logger.debug("Configured bootdata for node %s" % (n))
# Set owner data in MaaS
try:
self.logger.info("Setting node %s owner data." % n)