Bug 1108039
| Summary: | Symbolic link to /etc/hiera.yaml needed for puppet-hiera and dependent modules | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Gilles Dubreuil <gdubreui> |
| Component: | puppet | Assignee: | Mike Burns <mburns> |
| Status: | CLOSED WONTFIX | QA Contact: | Jaroslav Henner <jhenner> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 5.0 (RHEL 7) | CC: | apevec, lhh, mburns, morazi, rhos-maint, srevivo |
| Target Milestone: | --- | Keywords: | ZStream |
| Target Release: | 5.0 (RHEL 7) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-10-12 20:54:11 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1105597 | ||
|
Description
Gilles Dubreuil
2014-06-11 11:01:56 UTC
I think neither puppet or hiera RMPs to provide the symbolic link because there are no deps between them even though they are often installed together. On the other hand, openstack-installer and rhel-osp-installer depends on above, guaranteeing they're install, so the link can be created safely Can both installers have the following added? ln -s /etc/hiera.yaml /etc/puppet/yaml puppet has explicit requires on hiera: $ rpm -qp --requires puppet-3.6.2-1.el6.noarch.rpm |grep hiera hiera >= 1.0.0 I think this should be done in puppet given that it does have an explicit dependency on hiera. My only reluctance is that current functionality defaults to a certain hiera.yaml which is different than /etc/hiera.yaml. This means that some things might change for people who are relying on the built-in hiera conf. (In reply to Mike Burns from comment #4) > My only reluctance is that current functionality > defaults to a certain hiera.yaml which is different than /etc/hiera.yaml. Could you please develop? > This means that some things might change for people who are relying on the > built-in hiera conf. Looking at previous puppet versions RPM we've provided, there isn't any hiera.yaml default. That said (maybe that's what you meant above), if a specific path/file has been configured manually, it has to be explicitly set in puppet.conf and that should be preserved as part of the RPM config %files. Although there if the latter turns out to using /etc/puppet/hiera.yaml then we'll have to make sure the symbolic link is not created in order to not override user's settings. Besides, all of that we might have conflicts of interest from a OSP deployment viewpoint because we have to make sure the hiera default (/etc/hiera.yaml) is in place to have it working the way expected. That means if they are existing hiera defaults, they must be merged manually by the user anyway, since there are no global/local/inheritance mechanism for hiera.yaml files. Mike, any opinions on this bz? Proposed patch
diff --git a/puppet.spec b/puppet.spec
index a811444..78048b3 100644
--- a/puppet.spec
+++ b/puppet.spec
@@ -290,6 +290,9 @@ fi
exit 0
%post
+if [ ! -e /etc/puppet/hiera.yaml ]; then
+ ln -s /etc/hiera.yaml /etc/puppet/hiera.yaml
+fi
%if 0%{?_with_systemd}
/bin/systemctl daemon-reload >/dev/null 2>&1
%else
@@ -342,6 +345,9 @@ fi
exit 0
%preun server
+if [ -h /etc/puppet/hiera.yaml ]; then
+ rm -f /etc/puppet/hiera.yaml ]
+fi
%if 0%{?_with_systemd}
if [ "$1" -eq 0 ] ; then
/bin/systemctl --no-reload disable puppetmaster.service > /dev/null 2>&1
very old bug that seems unlikely to be valuable anymore. If you disagree, then please reopen and target to a more recent version. |