Bug 252339 - sysutils/puppet6: rubygem-ruby-augeas removed from dependencies
Summary: sysutils/puppet6: rubygem-ruby-augeas removed from dependencies
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: FreeBSD Puppet Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-02 01:06 UTC by Eirik Oeverby
Modified: 2021-01-19 14:43 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (puppet)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eirik Oeverby 2021-01-02 01:06:22 UTC
The recent "cleanup" of dependencies for the puppet6 port breaks all our puppet installations. Augeas is reuqired by a lot of core modules, and installing and using Puppet is no longer a matter of 'pkg install -y puppet6'. Also, while we have previously been able to automatically upgrade the Puppet agent on our nodes, this particular version bump is no longer possible without manual intervention.

A port revision like this should not be breaking, and there is no note in UPDATING or pkg-messages (not that the former is useful at all when using packages, but that's a discussion for another time..)

PS: Thanks for future-facter and puppet7!
Comment 1 Dan Mahoney 2021-01-16 22:32:39 UTC
Seconding this.  Would a patch help this?
Comment 2 Matthias Fechner freebsd_committer freebsd_triage 2021-01-17 00:05:17 UTC
Could you please be a little bit more specific, regarding the dep definition here:
https://rubygems.org/gems/puppet/versions/6.19.1

it looks fine.
It even have more dependencies like mention on rubygems.
Comment 3 Eirik Oeverby 2021-01-17 01:34:53 UTC
(In reply to Matthias Fechner from comment #2)

This is not reflected in the dependencies in the port. 

Specifically, rubygem-ruby-augeas (which pulls in augeas itself) must now be explicitly installed - a breaking change from how it used to be.
Comment 4 Dan Mahoney 2021-01-18 20:47:51 UTC
There's a workaround for this.  That workaround is:

* IF you're using Puppet to manage your base package, then include rubygem-ruby-augeas as a required install.  (This will pull in Augeas as well).

* Modify EVERY bit in your entire tree of manifests to depend on that package.

* Realize that if someone reverts the change that broke this, that's all there for no reason.

Have a look here:  https://puppet.com/docs/puppet/5.5/types/augeas.html

Augeas and the ruby augeas gem should be considered part and parcel of a working puppet install.  While it's possible to run *some* manifests, any that use this resource type will not.

What's funny is you've left rubygem-hiera in place (though not all puppet manifests use Hiera either).

Please fix this.
Comment 5 Romain Tartière freebsd_committer freebsd_triage 2021-01-19 00:06:01 UTC
Hi!

As you can see here, ruby-augeas is not a dependency of Puppet:
https://rubygems.org/gems/puppet/versions/6.19.1

Also, the augeas type was removed from core puppet in 6.0, and is now provided by this module on the forge:
https://forge.puppet.com/modules/puppetlabs/augeas_core
Even Puppet 5.x which included this type did not have a dependency on ruby-augeas.

For these reason it was removed from Puppet dependencies: we prefer users which rely on this to opt-in for getting it instead of imposing it to everybody including those who do not use it.

My feeling is that the right solution is to only depend on the bits needed by Puppet as it is done now.  ruby-augeas can then be managed through Puppet if needed, for example it can be included in nodes catalog as a package resource from the base profile as Dan describes (maybe the burden of the extra dependency is not mandatory: augeas resources might fail on first run because augeas provider is not working, but should succeed on the second run… might be an something acceptable?).


Is this something you can implement to cope with the reduction of the dependencies that Puppet brings?
Comment 6 Eirik Oeverby 2021-01-19 01:05:16 UTC
(In reply to Romain Tartière from comment #5)

This would make sense in a major version change (6->7), but for a patch release it's - respectfully - unacceptable breakage.

I also don't fully agree with the reasoning, but it's beside the point and anyway this would be acceptable in a major version change - those come with much more testing and related changes anyway. I fully expect minor updates to apply without breakage of this kind.
Comment 7 Dan Mahoney 2021-01-19 04:32:05 UTC
To be clear, I put my proposed workaround in this bug only so that someone else who found it could see a way forward.  It's pretty unclean to make people actively using this and expecting it to work find failures mid-cycle.

Revert this change, pretty please.  I can fully accept that we will have to find another way for puppet 7.

This change broke a working deploy process and working documentation and will require rewrites of *every* resource that uses Augeas to be reworked.  It's nontrivial in DayJob's setup.  If this dependency was going to be removed it should have been done when puppet 6 was added as a package.
Comment 8 Matthias Fechner freebsd_committer freebsd_triage 2021-01-19 13:59:28 UTC
I think doing a:
pkg install rubygem-ruby-augeas

should fix it then.
But it is definitely better to follow here what puppet recommends as noted already by an earlier post.
Comment 9 Eirik Oeverby 2021-01-19 14:17:46 UTC
(In reply to Matthias Fechner from comment #8)

That's missing the point. I can do that on my laptop, or my personal server. However, having to do that manually on 100s (or more) of systems simply isn't feasible, and this has caused a catch-22 situation that should not have happened in the first place. We can't easily automate our way out of it, and it hit us without any warnings.

If this were a change in the initial port of puppet6 (or, as it should be, 7), we would have known, had it thoroughly tested, and made the appropriate changes during rollout of the new major release. 

Why are we still discussing this? Sorry, but the change really has to be reverted.
Comment 10 commit-hook freebsd_committer freebsd_triage 2021-01-19 14:37:39 UTC
A commit references this bug:

Author: mfechner
Date: Tue Jan 19 14:37:12 UTC 2021
New revision: 562048
URL: https://svnweb.freebsd.org/changeset/ports/562048

Log:
  Readded dependency to rubygem-ruby-augeas again.
  Even if puppet does not have a dependency to it, it breaks usage for user which should not happen for patches.

  The dep was removed here:
  https://svnweb.freebsd.org/ports/head/sysutils/puppet6/Makefile?r1=558467&r2=558466&pathrev=558467

  Puppet7 does not have the dep, so users can plan the migration.

  PR:		252339
  Reported by:	Eirik Oeverby <ltning-freebsd@anduin.net>

Changes:
  head/sysutils/puppet6/Makefile
Comment 11 Matthias Fechner freebsd_committer freebsd_triage 2021-01-19 14:38:48 UTC
Dear Eirik,

I fully agree here, such a breaking change should not be done with a patch.
I re-added the dep for the puppet6 version.

Thanks a lot for reporting this.
Comment 12 Eirik Oeverby 2021-01-19 14:43:47 UTC
(In reply to Matthias Fechner from comment #11)

Excellent, thank you very much! :)