Puppet package needs ruby-hiera (unmapped dep)

Bug #1242363 reported by Herbert
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
puppet (Ubuntu)
Fix Released
High
Robie Basak
Saucy
Fix Released
High
Robie Basak

Bug Description

[Impact]

puppet does not work correctly in a very common use case (parameterised classes).

[Development Fix]

Fixed in Debian by rearranging the ruby-hiera dependency.

[Stable Fix]

Add a ruby-hiera dependency on puppet-common. This is like Debian, but does not remove it from puppetmaster-common in order to keep it minimal.

[Test Case]

Included in new dep8 test in the package, or see comment 9 below.

[Regression Potential]

Just adding a dependency which is normally used with this package anyway. I don't see any regression potential with this change.

[Original Description]

Puppet does not work without ruby-hiera package, but it also does not have this dependency mapped:

$ sudo apt-get install puppet-common
$ sudo puppet apply /etc/puppet/manifests/site.pp --verbose

Info: Loading facts in /etc/puppet/modules/php/lib/facter/php_config.rb
Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb
Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/pe_version.rb
Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
Error: Puppet::Parser::AST::Resource failed with error RuntimeError: Hiera terminus not supported without hiera library at /etc/puppet/manifests/abstracts.pp:10 on node graphite.local
Error: Puppet::Parser::AST::Resource failed with error RuntimeError: Hiera terminus not supported without hiera library at /etc/puppet/manifests/abstracts.pp:10 on node graphite.local

Need to install ruby-hiera to be able to run

$ sudo apt-get install ruby-hiera

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: puppet 3.2.4-2ubuntu2
ProcVersionSignature: Ubuntu 3.11.0-12.19-generic 3.11.3
Uname: Linux 3.11.0-12-generic x86_64
ApportVersion: 2.12.5-0ubuntu2
Architecture: amd64
Date: Sun Oct 20 12:30:10 2013
InstallationDate: Installed on 2013-10-19 (0 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: puppet
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Herbert (herbert-fischer) wrote :
Revision history for this message
Stig Sandbeck Mathisen (ssm) wrote :

Correct. This packaging bug was fixed in the debian repository just before the 3.3.0-1 release, with commit id 11a376f8348dfa2c254b19f7b29aec13940aeb92.

The "ruby-hiera" dependency was moved from the "puppetmaster-common" package to the "puppet-common" package. Previously, this was only needed by the puppet master, and the dependency was not moved to the correct place until 3.3.0-1

See also http://anonscm.debian.org/gitweb/?p=pkg-puppet/puppet.git;a=commitdiff;h=11a376f8348dfa2c254b19f7b29aec13940aeb92

Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

I can run "puppet apply" with an empty manifest and also a trivial manifest with a single static file defined, using puppet-common 3.2.4-2ubuntu2 on Saucy and without ruby-hiera installed. What exactly is the failure case here, please? What do you have in /etc/puppet/manifests/abstracts.pp:10? If you have something that specifically needs hiera, but puppet doesn't need hiera in all cases, then shouldn't this be at best a recommendation rather than a hard dependency?

We should certainly pick up the ruby-hiera dependency in puppet-common on the next merge from Debian for Trusty, as I see no reason to diverge from Debian on this.

But do we need Saucy fixed? If so, what is the justification, please?

Triaged for Trusty, since we should merge Debian's ruby-hiera dependency.

Changed in puppet (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Herbert (herbert-fischer) wrote :

Hi,

I'm not using nothing specific to Hiera, but I don't know if some 3rd party module is (stdlib?).

There are the first 15 lines of the abstracts.pp file:

node 'debian-like-linux' {
 class { 'apt':
  always_apt_update => false,
  disable_keys => undef,
  proxy_host => false,
  proxy_port => '8080',
  purge_preferences_d => false,
  purge_sources_list => false,
  purge_sources_list_d => false,
 }
 sysctl { 'fs.file-max': value => '9999999' }
 sysctl { 'fs.inotify.max_user_watches': value => '100000' }
 sysctl { 'fs.nr_open': value => '9999999' }
 sysctl { 'net.core.netdev_max_backlog': value => '4096' }
 sysctl { 'net.core.rmem_max': value => '16777216' }
        ...
}

Revision history for this message
Stig Sandbeck Mathisen (ssm) wrote :

Puppet will need hiera when you apply a manifest containing any parameterized class, like the one in your example.

Revision history for this message
Stig Sandbeck Mathisen (ssm) wrote :

(and this is new functionality in puppet 3.x, it does not apply to puppet 2.7)

Revision history for this message
Herbert (herbert-fischer) wrote :

I vote for this to be fixed on Saucy.

I could simply fix +180 manifests to avoid Puppet trigget the automatic usage of Hiera...

Or I could simply go back to Raring and use the official Puppet packages and wait for them to release the official packages to Saucy as well (at the price of holding back early-adopters of this new Ubuntu release).

Revision history for this message
Robie Basak (racb) wrote :

> Puppet will need hiera when you apply a manifest containing any parameterized class, like the one in your example.

Thanks. I'll test this and see if I can produce a failure case. Given that parameterized classes are pretty core functionality in puppet and just about every sane puppet deployment would probably use one, I guess it makes sense to make ruby-hiera as a dependency, and think that this should also be fixed in Saucy. Thank you for clarifying.

Revision history for this message
Robie Basak (racb) wrote :

Failure case:

--->8---
class foo($content="abc") {
    file { '/tmp/foo': content => $content; }
}

class {foo:}
--->8---

"puppet apply" on a file of these contents produces errors of the style:

Error: Puppet::Parser::AST::Resource failed with error RuntimeError: Hiera terminus not supported without hiera library at /home/ubuntu/test.pp:5 on node foo

Installing ruby-hiera fixes it.

Changed in puppet (Ubuntu):
importance: Medium → High
Changed in puppet (Ubuntu Saucy):
status: New → Triaged
importance: Undecided → High
Robie Basak (racb)
Changed in puppet (Ubuntu Saucy):
assignee: nobody → Robie Basak (racb)
Changed in puppet (Ubuntu):
assignee: nobody → Robie Basak (racb)
Revision history for this message
Robie Basak (racb) wrote :

This was fixed in Trusty in 3.3.1-1ubuntu1, which picked up the Debian fix. For Saucy, I've prepared an SRU. I've also written a dep8 test that I've added to my Saucy SRU that I will submit to Debian.

description: updated
Changed in puppet (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Herbert, or anyone else affected,

Accepted puppet into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/puppet/3.2.4-2ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in puppet (Ubuntu Saucy):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Herbert (herbert-fischer) wrote :

Thank you Brian, it worked!

I've used the version 3.2.4-2ubuntu2.1 of puppet-common and it installed ruby-hiera as a dependency.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for puppet has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package puppet - 3.2.4-2ubuntu2.1

---------------
puppet (3.2.4-2ubuntu2.1) saucy; urgency=low

  * Add required dependency ruby-hiera, without which puppet does not work
    correctly in common cases (LP: #1242363).
  * d/tests/parameterised-class: dep8 test for failure case.
 -- Robie Basak <email address hidden> Fri, 29 Nov 2013 10:03:09 +0000

Changed in puppet (Ubuntu Saucy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.