On Nov 27, 4:02 pm, Andrew Forgue <andrew.for...@gmail.com> wrote:
> Zypper is the replacement for `rug' from earlier SuSE releases. Zypper
> is backward compatible with the rug command and supports the same
> commands that rug does.
>
> Technically all that needed to be changed is :rug => "/usr/bin/zypper".
> However, I'd expect rug to eventually be removed so this just depends on
> the RPM provider.
>
> Signed-off-by: Andrew Forgue <andrew.for...@gmail.com>
zypper install -t pattern <package-group-name>
How sure is the integration of zypper in version 0.25.5 ?
Interesting, I'm not sure how that would work. You can install a
pattern simply by adding the '-t pattern', but when you try to remove
it, it says 'Uninstallation of a pattern is currently not defined and
implemented.' (SLES11) And when trying to upgrade it, even when you
supply the -t pattern, it tries to upgrade the package (appears to be
yet-another-zypper-bug). Novell seems to be rife with those.
In any case, it's simple to implement for installation, but I don't
have confidence that upgrading or removing a pattern would work at
all.
Zypper in 0.25.x is non-existent until this patch (Bug #1223) is
applied, but you can take my lib/puppet/provider/package/zypper.rb
file from my branch (mentioned in a previous post) and use it as a
plugin in your environment and it should work fine with provider =>
zypper in your manifests.
Andrew
1. You should consider adding the zypper option "--force-resolution"
to line 25 like:
output = zypper "--quiet", :install, "-l", "-y", "--force-
resolution" , wanted
Otherwise i ran into some problems during the installation of some
packages, e.g. replacing postifx with sendmail gave me:
Problem: postfix-2.5.5-6.8.x86_64 conflicts with sendmail provided by
sendmail-8.14.3-50.9.i586
Solution 1: deinstallation of
postfix-2.5.5-6.8.x86_64
Solution 2: do not ask to install a solvable providing
sendmail
Choose from above solutions by number or cancel [1/2/C]: c
As you can see zypper chose to cancel the installation, but I actually
wanted to install that package so I added the „--force-resolution“
option to your code and zypper chose solution 1.
2. I don’t know if it’s a general puppet problem, false configuration
or caused by your plugin…If a client receives the plugin for the first
time, everything works just fine. But if I change anything in my
manifests and a puppet-client runs again I always get this error:
„err: Could not run Puppet configuration client: Invalid package
provider 'zypper' at /etc/puppet/modules/webserver/manifests/
webserver.pp:8“
In order to get the client working again, I have to add some random
characters to the zypper.rb, so the puppet-master thinks that there
were some changes to the plugin and updates the file on the client.
Christian
On Feb 26, 5:19 am, christian <christ...@cust.in> wrote:
> I did some testing with your plugin on OpenSuse 11.1 and I’d like to
> offer some suggestions:
>
> 1. You should consider adding the zypper option "--force-resolution"
> to line 25 like:
> output = zypper "--quiet", :install, "-l", "-y", "--force-
> resolution" , wanted
>
> Otherwise i ran into some problems during the installation of some
> packages, e.g. replacing postifx with sendmail gave me:
>
> Problem: postfix-2.5.5-6.8.x86_64 conflicts with sendmail provided by
> sendmail-8.14.3-50.9.i586
> Solution 1: deinstallation of
> postfix-2.5.5-6.8.x86_64
> Solution 2: do not ask to install a solvable providing
> sendmail
>
> Choose from above solutions by number or cancel [1/2/C]: c
>
> As you can see zypper chose to cancel the installation, but I actually
> wanted to install that package so I added the „--force-resolution“
> option to your code and zypper chose solution 1.
Interesting -- perhaps the better solution would be to do a
package { "postfix": ensure => absent, before => Package["sendmail"] }
package { "sendmail": ensure => present }
At least then you know what puppet will do. I have no issue adding --
force-resolution, I just don't know if it would cause any issues with
uninstalling packages that may conflict -- for instance:
package { ["postfix", "sendmail"]: ensure =>latest }
Would cause issues with --force-resolution and I'm not sure how puppet
*should* handle that. I think someone on the core team should provide
input.
> 2. I don’t know if it’s a general puppet problem, false configuration
> or caused by your plugin…If a client receives the plugin for the first
> time, everything works just fine. But if I change anything in my
> manifests and a puppet-client runs again I always get this error:
> „err: Could not run Puppet configuration client: Invalid package
> provider 'zypper' at /etc/puppet/modules/webserver/manifests/
> webserver.pp:8“
I don't see this behavior. What I am doing is putting it in modules/
plugins/lib/puppet/provider/package/zypper.rb and having pluginsync =
true in my client's puppetd.conf and making sure modulepath is set
properly.
> In order to get the client working again, I have to add some random
> characters to the zypper.rb, so the puppet-master thinks that there
> were some changes to the plugin and updates the file on the client.
Yeah that's definitely strange to me. Can you try installing a
package with specific version? (I.e. ensure => "2.1.0") or
something... ) I've seen an issue where it will say package not found,
however if you cut and paste the exact line, it somehow finds it. Can
you reproduce it?
Thanks,
Andrew
I placed the plugin under /etc/puppet/modules/custom/lib/puppet/
provider/zypper.rb....where it should have been under /etc/puppet/
modules/custom/lib/puppet/provider/package/zypper.rb. The
documentation is a bit unclear at this point...maybe there should be a
list with possible provider types and their respective directories.
> Interesting -- perhaps the better solution would be to do a
>
> package { "postfix": ensure => absent, before => Package["sendmail"] }
> package { "sendmail": ensure => present }
Well, I tried that and got following error:
puppetd[2579]: (//allgemein::sendmail/Package[postfix]/ensure) change
from 2.5.5-6.8 to absent failed: Execution of '/bin/rpm -e
postfix-2.5.5-6.8.x86_64' returned 1: error: Failed
dependencies: smtp_daemon is needed by (installed)
cron-4.1-194.32.x86_64 smtp_daemon is needed by (installed)
mailx-12.2-141.9.x86_64
As far as I can see puppet tries to uninstall a package by using rpm
and fails...
I tried uninstalling postfix manually with "zypper rm postfix" and it
worked. So maybe you could add the "rm -y" option of zypper? :)
I would contribute the code on my own...but I have absolutely no clue
about ruby.
christian
And the code below is calling "zypper" as a method - I suspect that doesn't work (and it doesn't match your old mailing-list patch, either)+ commands :rug => "/usr/bin/zypper"
--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to puppe...@googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.