Bug #12503
issue when installing packages (puppet 2.7.x, mcollective 1.2.1, package.rb 2.1)
| Status: | Closed | Start date: | 02/08/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | - | |||
| Keywords: | package.rb plugin mcollective install | Affected mCollective version: | ||
| Branch: | ||||
| Votes: | 0 |
Description
am running on ubuntu 1110, and puppet 2.7.x (x= 1 till 9) on the node, and can’t get any packages installed via mcollective.
I ran the mco rpc -v package install package=intellitxt-1100 and it doesn’t seem to be installing the package for me
the status command : mco rpc -v package status package=intellitxt-1100 gives
web-gertrude : OK {:properties=> {:status=>"missing", :error=>"ok", :name=>"intelllitxt-1100", :ensure=>:purged}, :output=> {:status=>"missing", :error=>"ok", :name=>"intelllitxt-1100", :ensure=>:purged}}
adding a bit of debug code to the package.rb plugin just after the do_pkg_action definition Log.info(“doing #{action} on package ‘#{package}’”)
so that in the log it shows:
I, [2012-02-07T16:50:43.090575 #2957] INFO -- : package.rb:102:in `do_pkg_action' doing status on package 'intellitxt-1100' I, [2012-02-07T16:50:51.640810 #2957] INFO -- : package.rb:102:in `do_pkg_action' doing install on package 'intellitxt-1100' I, [2012-02-07T16:50:56.712611 #2957] INFO -- : package.rb:102:in `do_pkg_action' doing status on package 'intelllitxt-1100' I, [2012-02-07T16:51:59.089121 #2957] INFO -- : package.rb:102:in `do_pkg_action' doing uninstall on package 'intellitxt-1100' I, [2012-02-07T16:56:02.924785 #2957] INFO -- : pckage.rb:102:in `do_pkg_action' doing uninstall on package 'intelllitxt-1100' I, [2012-02-07T16:56:10.008297 #2957] INFO -- : package.rb:102:in `do_pkg_action' doing install on package 'intellitxt-1100'
ralsh package intellitxt-1100 also shows purged regardless if I tell it to install.
package { 'intellitxt-1100': ensure => 'purged', }
Changing the line from https://github.com/puppetlabs/mcollective-plugins/blob/master/agent/package/agent/puppet-package.rb#L115
to
reply[:output] = pkg.install if [:purged, :absent].include?(pkg.properties[:ensure])
seems to have fixed this issue for me
History
Updated by R.I. Pienaar 3 months ago
- Status changed from Unreviewed to Accepted
- Assignee set to R.I. Pienaar
At present we only consider :absent package as candidates for installing, ubuntu/debian also has :purged though and now seem to consider never before installed software as purged and not absent.
So we should just make sure we treat them as equiv as in the ticket description.
Tested on Ubuntu 11.10 and Puppet 2.7.10
Updated by R.I. Pienaar 3 months ago
- Status changed from Accepted to Closed
I’ve tweaked the package agent to consider both :purged and :absent as absent
Please let me know if that does not sort it out for you
http://git.io/htj0Mg 2 files changed, 55 insertions(+), 49 deletions(–)