[openstack-dev] [Tripleo] Some historic digging
Cédric Jeanneret
cedric.jeanneret at camptocamp.com
Thu Dec 7 07:22:47 UTC 2017
Hello,
While trying to add some unit tests for some resources in the
puppet-tripleo repository, I stumbled on a not-so-nice case: the
tripleo::firewall::service_rules definition.
In there, a resource is dynamically taken from hiera, using the
following key structure:
tripleo.<name>.firewall_rules
Although this seems to work properly in the tripleo deploy process, it
just doesn't work at all for a unit test.
After some more digging, it appears the "dot" (".") in YAML is a
reserved char for hashes. In the puppet world, we usually use the double
semi-colon, aka "::" as a separator.
Sooo… I'm wondering what's the history behind that non-puppet-standard
choice of "dot" separator, and what would be required in order to move
to a more standard syntax for that kind of resources.
I've checked the puppet-tripleo repository, and apparently only two
resources are using that kind of syntax:
- tripleo::firewall::service_rules (already widely present in the
tripleo-heat-templates)
- tripleo::haproxy::service_endpoints
(at least, those are the only resources using a "$underscore_name" variable)
Currently, if anyone wants to change something close to those two
resources, it won't be tested against regressions, and it's a really bad
situation. Especially since it might break central services (closing all
firewall ports isn't good, for example, or dropping an haproxy endpoint
by mistake)… Unit tests are needed, especially in such a huge piece of
software ;).
Thank you for your historical knowledge and its sharing :).
Cheers,
C.
--
Cédric Jeanneret
Senior Linux System Administrator
Infrastructure Solutions
Camptocamp SA
PSE-A / EPFL, 1015 Lausanne
Phone: +41 21 619 10 32
Office: +41 21 619 10 02
Email: cedric.jeanneret at camptocamp.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 878 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20171207/8692b508/attachment.sig>
More information about the OpenStack-dev
mailing list