<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 18, 2016 at 4:00 AM, Aleksandr Didenko <span dir="ltr"><<a href="mailto:adidenko@mirantis.com" target="_blank">adidenko@mirantis.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><div><div><div><div><span class=""><div>> Given the requirements to be able to use new features in fuel, with an 
older version of OpenStack, what alternative would you propose? <br><br></div></span>For example, it's possible to use existing "release" functionality in Fuel (release contains granular tasks configuration, puppet modules and manifests, configuration data). So after upgrade from 8.0 to 9.0 it will look like this [0] - with separate composition layer for every supported "release".<span class=""><br><br>> We should allow a user to specify that they want a build a cloud using X fuel release to deploy Y os with Z OpenStack release.<br><br></span></div><div>[0] should work for this as well. But the number of X-Y-Z combinations will be limited. Well, it will be limited in any case, I don't think that it's possible to support unlimited number of OpenStack versions in a single Fuel release.<br></div><br></div></div></div></div></div></blockquote><div><br></div><div>I agree it should not be unlimited but it should be created than the 1-1-1 we currently support.  Since we push for upstream openstack puppet to support current and best effort on current-1, I think being able to support at least that should be doable.  </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>In case we want to use single composition layer for more than one openstack version, we need to resolve the following blockers:<br></div>- Move everything except composition layer (top-scope manifests and other granular tasks) from fuel-library to their own repos. Otherwise we'll have OpenStack version conditionals in modules manifets, providers and functions which would be a mess.<br></div>- Refactor tasks upload/serialization in Nailgun<br></div><div>- (?) Refactor configuration data serialization in Nailgun<br></div><div><br>And still we'll have to add conditionals to puppet functions that relay on configuration data directly (like generate_network_config.rb). Or write some sort of data serialization in front of them in manifests. Or leave nailgun serialization based on installed version (which is almost the same as using separate composition layers [0]).<br></div><div><br></div><div></div></div>In either case (separate releases or single composition layer) it will double CI load and testing efforts, because we need to CI/test new features and patches for 9.0+mitaka and 9.0+liberty.<br><br><div>Regards,<br></div><div>Alex<br></div><div><div><div><br>[0] <a href="http://paste.openstack.org/show/487383/" target="_blank">http://paste.openstack.org/show/487383/</a><br><br></div></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 18, 2016 at 9:31 AM, Bogdan Dobrelya <span dir="ltr"><<a href="mailto:bdobrelia@mirantis.com" target="_blank">bdobrelia@mirantis.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On 17.02.2016 18:23, Bogdan Dobrelya wrote:<br>
>> So we'll have tons of conditionals in composition layer, right? Even if<br>
>> some puppet-openstack class have just one new parameter in new release,<br>
>> then we'll have to write a conditional and duplicate class declaration. Or<br>
>> write complex parameters hash definitions/merges and use<br>
>> create_resources(). The more releases we want to support the more<br>
>> complicated composition layer will become. That won't make contribution to<br>
>> fuel-library easier and even can greatly reduce development speed. Also are<br>
>> we going to add new features to stable releases using this workflow with<br>
>> single composition layer?<br>
><br>
> As I can see from an example composition [0], such code would be an<br>
> unmaintainable burden for development and QA process. Next imagine a<br>
> case for incompatible *providers* like network transformations - shall<br>
> we put multiple if/case to the ruby providers as well?..<br>
><br>
> That is not a way to go for a composition, sorry. While the idea may be<br>
> doable, I agree, but perhaps another way.<br>
><br>
> (tl;dr)<br>
> By the way, this reminded me "The wrong abstraction" [1] article and<br>
> discussion. I agree with the author and believe one should not group<br>
> code (here it is versioned puppet modules & compositions) in a way which<br>
> introduces abstractions (here a super-composition) with multiple<br>
> if/else/case and hardcoded things to switch the execution flow based on<br>
> version of things. Just keep code as is - partially duplicated by<br>
> different releases in separate directories with separate modules and<br>
> composition layers and think of better solutions please.<br>
><br>
> There is also a nice comment: "...try to optimize my code around<br>
> reducing state, coupling, complexity and code, in that order". I<br>
> understood that like a set of "golden rules":<br>
> - Make it coupled more tight to decrease (shared) state<br>
> - Make it more complex to decrease coupling<br>
> - Make it duplicated to decrease complexity (e.g. abstractions)<br>
><br>
> (tl;dr, I mean it)<br>
> So, bringing those here.<br>
> - The shared state is perhaps the Nailgun's world view of all data and<br>
> versioned serializers for supported releases, which know how to convert<br>
> the only latest existing data to any of its supported previous versions.<br>
> - Decoupling we do by putting modules with its compositions to different<br>
> versioned /etc/puppet subdirectories. I'm not sure how do we decouple<br>
> Nailgun serializers though.<br>
> - Complexity is how we compose those modules / write logic of serializers.<br>
> - Duplication is puppet classes (and providers) with slightly different<br>
> call parameters from a version to version. Sometimes even not backwards<br>
> compatible. Probably same to the serializers?<br>
><br>
> So, we're going to *increase complexity* by introducing<br>
> super-compositions for multi OpenStack releases. Not sure about what to<br>
> happen to the serializers, any volunteers to clarify an impact?. And the<br>
> Rules "allow" us to do so only in order to decrease either coupling or<br>
> shared state, which is not the case, AFAICT. Modules with compositions<br>
> are separated well by OpenStack versions, nothing to decrease. Might<br>
> that change to decrease a shared state? I'm not sure if it even applies<br>
> here. Puppet versioning shares nothing. Only Nailgun folks may know the<br>
> answer.<br>
<br>
</div></div>AFAIK, Nailgun serializers have no shared state and state at all, as<br>
they always produce the same "data view" for a given version and there<br>
is no internal state impacting results. Although, they might end up with<br>
decreased complexity while the orchestration logic - with a drastically<br>
increased one. It would be hard to determine which deployment graph to<br>
build from the super-composed multi-release modular tasks, AFAICT. So it<br>
seems no gain here as well. That means the Golden Rules recommend us to<br>
not do so :)<br>
<div><div><br>
><br>
> [0]<br>
> <a href="https://review.openstack.org/#/c/281084/1/deployment/puppet/ceph/manifests/nova_compute.pp" rel="noreferrer" target="_blank">https://review.openstack.org/#/c/281084/1/deployment/puppet/ceph/manifests/nova_compute.pp</a><br>
> [1] <a href="https://news.ycombinator.com/item?id=11032296" rel="noreferrer" target="_blank">https://news.ycombinator.com/item?id=11032296</a><br>
><br>
<br>
<br>
--<br>
Best regards,<br>
Bogdan Dobrelya,<br>
Irc #bogdando<br>
<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>
</div></div></blockquote></div><br></div>
</div></div><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></div>