Bug 761315 - katello-configure fails when using the latest puppet
Summary: katello-configure fails when using the latest puppet
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Katello
Classification: Retired
Component: Infrastructure
Version: 1.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: 1.x
Assignee: Lukas Zapletal
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-08 02:41 UTC by Mike McCune
Modified: 2012-08-22 14:16 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 14:16:47 UTC


Attachments (Terms of Use)

Description Mike McCune 2011-12-08 02:41:53 UTC
If you try to run katello-configure using the puppet RPMs provided by Puppetlabs (2.7.*) you run into this error:

Failed to parse template candlepin/etc/candlepin/candlepin.conf.erb: undefined method `empty?' for :undefined:Symbol at /usr/share/katello/install/puppet/modules/candlepin/manifests/config.pp:16 on node vbqpm2.qpm2.msk.qsft


This will probably bite us eventually so probably a good idea to fix this sooner than later.

Comment 1 Mike McCune 2011-12-08 07:16:36 UTC
*** IRC Log from #katello that might help **

<Azrial> looking at the code differences between 2.6 and 2.7 I believe that instead of returning an ":undefined" for an empty string they now return "nil"
<jrist> Azrial: if you have time, a patch would rock
<jrist> Azrial: otherwise, we'll add it to the todo list :)
<Azrial> yer having a look at it now. not quite sure though how to do a puppet version check inside a template
<Azrial> It looks as if the only place that is using scope.lookupvar().empty? is in the candlepin template
<Azrial> by changing it to scope.lookupvar().nil? allows it to work with puppet 2.7.6
<Azrial> although I need to test that having the values empty does behave correctly.
<Azrial> ok. I have spent a good amount of time trying to work out what this regex is testing for but I can't quite work it out.
<Azrial> can someone help
<Azrial> $oauth_secret = regsubst(generate('/usr/bin/openssl', 'rand', '-base64', '24'), '^(.{24}).*', '\1')
<Azrial> I can't work out the meaning of {24}
<Azrial> actually. is it confirming that the string returned by openssl is 24 characters long?
<jrist> I think so
<jrist> Azrial: {} means n repititions of the previous group
<Azrial> I wasn't able to confirm that changing scope.lookupvar().empty? to scope.lookupvar().nil? actually handles whatever exception the "unless" statement is trying to handle so I'll have to leave it to smarter people
<Azrial> but it does allow the manifest to run in puppet 2.7.6 and epel puppet

Comment 2 Lukas Zapletal 2012-02-07 12:27:20 UTC
Setting prio to low, does not look like a blocker issue.

Comment 4 Miroslav Suchý 2012-08-21 16:46:13 UTC
I believe this bug does not appear during installation on F17 any more.
Can we close it?

Comment 5 Lukas Zapletal 2012-08-22 14:16:47 UTC
I can confirm we fixed that.


Note You need to log in before you can comment on or make changes to this bug.