Feature #6013
Add action to do 'yum check-update' for mcollective package agent
| Status: | Closed | Start date: | 01/24/2011 | |
|---|---|---|---|---|
| Priority: | Low | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | - | |||
| Keywords: | Affected mCollective version: | |||
| Branch: | ||||
| Votes: | 0 |
Description
Hi,
I think it would be helpful for the mcollective package agent to have an action to check for yum updates. Something like an action called yum_checkupdates
So a possible invocation could be:
mc-rpc package yum_checkupdates
History
Updated by Al Hoang over 1 year ago
Private branch with an example available here:
https://github.com/hoanga/mcollective-plugins/tree/feature/master/6013-yumcheckupdate
Updated by R.I. Pienaar over 1 year ago
- Status changed from Unreviewed to Code Insufficient
- Assignee set to R.I. Pienaar
This looks pretty good, there’s some redundant code around lines 48-49 in the rb, could you fix that up and I’ll test it
I might take time and make a generic check_update that supports both Debian and Yum and return a same style hash that will use your method think that would be a good enhancement
Updated by Al Hoang over 1 year ago
R.I. Pienaar wrote:
This looks pretty good, there’s some redundant code around lines 48-49 in the rb, could you fix that up and I’ll test it
Committed fix and pushed. Thanks for catching that. Same branch as before.
I will also look into seeing if something similar can be done for apt but I’ll create another ticket for tracking that when I have some more concrete progress to show.
Updated by R.I. Pienaar over 1 year ago
On debian systems I do this to get the equiv of yum check-update:
# /usr/bin/apt-get --simulate dist-upgrade|grep Inst Inst dpkg [1.13.25] (1.13.26 Debian:4.0r2/stable) Inst gzip [1.3.5-15] (1.3.5-15+etch1 Debian:4.0r2/stable) Inst libc6-dev [2.3.6.ds1-13etch8] (2.3.6.ds1-13etch10+b1 Debian:4.0r2/stable) [] Inst libc6 [2.3.6.ds1-13etch8] (2.3.6.ds1-13etch10+b1 Debian:4.0r2/stable) [libc6-i686 on libc6] [libc6-i686 ]
and a bit of parsing to that and we should be able to create the same structure of replies.
if we then have a check_update action that verifies presence of either yum or apt-get which then calls the apt/yum specific method this would be awesome.
Updated by R.I. Pienaar over 1 year ago
Have merged the initial code, will try to hack on apt support and a little wrapper
6b464ef (2 files in 1 dirs): http://bit.ly/hZ0xm5
Updated by R.I. Pienaar over 1 year ago
- Status changed from Code Insufficient to Requires CLA to be signed
I should have asked before merging your code but could you please sign a contributors agreement, if you log into redmine and look at the top you should see a link that lets you do that.
Updated by Al Hoang over 1 year ago
Done
Updated by R.I. Pienaar about 1 year ago
- Status changed from Requires CLA to be signed to Closed
I’ve added apt_checkupdates and checkupdates actions, checkupdates will use either yum_checkupdates or apt_checkupdates
4946ef5 (2 files in 1 dirs): http://bit.ly/hFQpQ8