<div dir="ltr">Andrew,<div><br></div><div>This is an excellent idea. It is apparently more efficient and error-proof to make the split not by the resulted data but at the time it is actually generated. We will play with this idea a little bit, and will come up with design proposal shortly.</div><div><br></div><div>Meanwhile, please be informed that we already started testing the solution based on the node-level data exposed via ConfigDB API extension for Nailgun [1] [2]. I will keep you updated on our progress in that area.</div><div><br></div><div>[1] <a href="https://review.openstack.org/284109">Specification for Nailgun API for serialized facts</a></div><div>[2] <a href="https://review.openstack.org/286012">Spec for upload of deployment configuration to ConfigDB API</a></div><div><br></div><div>--</div><div>Best regards,</div><div>Oleg Gelbukh</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 31, 2016 at 11:19 PM, Andrew Woodward <span dir="ltr"><<a href="mailto:xarses@gmail.com" target="_blank">xarses@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>One of the problems we've faced with trying to plug-in ConfigDB is trying to separate the cluster attributes from the node attributes in the serialized output (ie astute.yaml)<br></div><div><br></div><div>I started talking with Alex S about how we could separate them after astute.yaml is prepared trying to ensure which was which we came back uncertain that the results would be accurate.</div><div><br></div><div>So I figured I'd go back to the source and see if there was a way to know which keys belonged where. It turns out that we could solve the problem in a simpler and more precise way than cutting them back apart later.</div><div><br></div><div>Looking over the deployment_serializers.py [1] the serialized data follows a simple work flow</div><div><br></div><div>iterate over every node in cluster</div><div>  if node is customized:</div><div>    serialized_data = node.replaced_deployment_data</div><div>  else:</div><div>    serialized_data = dict_merge(</div><div>      serialize_node(node),</div><div>      get_common_attrs(cluster))</div><div><br></div><div>Taking this into mind, we can simply construct an extension to expose these as an APIs so that we can consume them as a task in the deployment graph.</div><div><br></div><div>Cluster:</div><div>We can simply expose DeploymentMultinodeSerializer().get_common_attrs(cluster)</div><div><br></div><div>This would then be plumbed to the cluster level in ConfigDB</div><div><br></div><div>Node:</div><div>if a Node has customized data, then we can return that at the node level, this continues to work at the same as native since it most likely has Cluster merged into it.</div><div><br></div><div>otherwise we can return the serialized node with whichever of the first 'role' the node has</div><div><br></div><div>We would expose DeploymentMultinodeSerializer().serialize_node(node, objects.Node.all_roles(node)[0])</div><div><br></div><div>for our usage, we don't need to worry about the normal node role combination as the data only influences 'role' and 'fail_if_error' attributes, both are not consumed in the library.</div><div><br></div><div><a href="https://github.com/openstack/fuel-web/blob/master/nailgun/nailgun/orchestrator/deployment_serializers.py#L93-L121" target="_blank">https://github.com/openstack/fuel-web/blob/master/nailgun/nailgun/orchestrator/deployment_serializers.py#L93-L121</a></div></div><span class="HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div dir="ltr"><p dir="ltr">--</p><p dir="ltr"><span style="font-size:13.1999998092651px">Andrew Woodward</span></p><p dir="ltr"><span style="font-size:13.1999998092651px">Mirantis</span></p><p dir="ltr"><span style="font-size:13.1999998092651px">Fuel Community Ambassador</span></p><p dir="ltr"><span style="font-size:13.1999998092651px">Ceph Community</span></p>
</div>
</font></span><br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>