[Spacewalk-list] spacecmd system_listupgrades not working

Andreas Dijkman Andreas.Dijkman at cygnis.nl
Mon Aug 26 08:39:34 UTC 2013


Nice!! Looking forward installing Spacewalk 2.1 and tools!

Kind regards,

Andreas Dijkman

On 25 Aug, 2013, at 12:45 , Aron Parsons <aronparsons at gmail.com<mailto:aronparsons at gmail.com>>
 wrote:

This is fixed in spacecmd-2.1.6-1.  system_listupgrades will filter out duplicate packages now with the filter_latest_packages() function that was already in place.

/aron


On Sat, Aug 17, 2013 at 2:55 AM, Aron Parsons <aronparsons at gmail.com<mailto:aronparsons at gmail.com>> wrote:

Hi Tomas,
I'll take a closer look, hopefully within the week. I'm busy on travel until September.

On Aug 15, 2013 2:41 PM, "Tomas Lestach" <tlestach at redhat.com<mailto:tlestach at redhat.com>> wrote:
Hey Aron,

do you want to comment on this thread on spacewalk-list?


Regards,
Tomas
--
Tomas Lestach
Red Hat Satellite Engineering, Red Hat


----- Forwarded Message -----
> From: "Tomas Lestach" <tlestach at redhat.com<mailto:tlestach at redhat.com>>
> To: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
> Cc: "Aron Parsons" <aparsons at redhat.com<mailto:aparsons at redhat.com>>
> Sent: Thursday, August 15, 2013 3:31:52 PM
> Subject: Re: [Spacewalk-list] spacecmd system_listupgrades not working
>
> > Is the removal of duplicates the solution?
>
> I believe it would be the easiest and quickest solution.
>
> > Because default on a
> > RHEL-derived system, RPM/YUM leaves the 3 latest kernel-packages on
> > the system, so you can boot the system with the old kernel of the
> > new kernel is not working for you.
>
> Sure.
>
> > Maybe the better solution would be to check if there are older
> > packages on the system. If there are older packages and the version
> > to which those packages could be upgraded is already present on the
> > system, the upgrades aren't listed. This could also comes in handy
> > if you have multiple version of a package on your system. For
> > instance, the installation or upgrade of JDK7 by RPM doesn't remove
> > the old versions.
>
> java-1.5.0-gcj
> java-1.7.0-openjdk
> java-1.8.0-openjdk
> are different packages. java-1.8.0-openjdk isn't really an upgrade of
> java-1.7.0-openjdk. Well, it could be considered as upgrade from the
> content point of view, but definitely not from the rpm view.
>
> (For java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc19.x86_64, package name
> is 'java-1.7.0-openjdk' (not java) version is 1.7.0.25,
> release 2.3.12.3.fc19, ...)
>
> > If you have 3 older versions of the JDK7 on your
> > environment and not the latest, the update gets listed 4 times!!
>
> No. You can have only 'kernel' package installed in multiple versions
> on one system.
>
>
> CC'ing Aron, the author of the spacecmd.
>
> Regards,
> --
> Tomas Lestach
> Red Hat Satellite Engineering, Red Hat
>
>
> > Once for every old version and once because the latest versions is
> > not installed yet. So you get 3 false positives, the same as with
> > the kernels.
> >
> > Regards,
> > Andreas
> >
> >
> > ________________________________________
> > Van: spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com>
> > [spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com>] namens Tomas Lestach
> > [tlestach at redhat.com<mailto:tlestach at redhat.com>]
> > Verzonden: donderdag 15 augustus 2013 10:36
> > Aan: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
> > Onderwerp: Re: [Spacewalk-list] spacecmd system_listupgrades not
> > working
> >
> > Right,
> >
> > spacecmd system_listupgrades actually uses the
> > system.listLatestUpgradablePackages API.
> > Output of this API you can check on your spacewalk at
> > /rhn/apidoc/handlers/SystemHandler.jsp#listLatestUpgradablePackages
> >
> > basically for every installed server package, that can be upgraded
> > following structure is returned:
> >
> > string "name"
> > string "arch"
> > string "from_version"
> > string "from_release"
> > string "from_epoch"
> > string "to_version"
> > string "to_release"
> > string "to_epoch"
> > string "to_package_id"
> >
> > so you see for every upgradable package the latest package to that
> > you may upgrade.
> >
> > What spacecmd system_listupgrades actually does is it returns a
> > package list just according to "to_package_id".
> > So if you have multiple kernel versions installed, for all the
> > older
> > ones the latest kernel is offered as an
> > update, what causes the kernel package is listed several times.
> >
> > An option would be just to remove duplicates from the list.
> >
> >
> > Regards,
> > --
> > Tomas Lestach
> > Red Hat Satellite Engineering, Red Hat
> >
> >
> > ----- Original Message -----
> > > From: "Anthony J Coffman" <Tony.Coffman at snapon.com<mailto:Tony.Coffman at snapon.com>>
> > > To: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
> > > Sent: Wednesday, August 14, 2013 8:43:54 PM
> > > Subject: Re: [Spacewalk-list] spacecmd system_listupgrades not
> > > working
> > >
> > >
> > >
> > >
> > >
> > > I can confirm and maybe explain what is going on. I don’t use
> > > this
> > > function very much but I just tried it on my Spacewalk 2.0
> > > install.
> > >
> > >
> > >
> > > Here is the spacecmd output for a system that the Spacewalk GUI
> > > said
> > > was up to date.
> > >
> > >
> > >
> > > spacecmd {SSM:0}> system_listupgrades centos5server
> > >
> > > kernel-PAE-2.6.18-348.12.1.el5.i686
> > >
> > > kernel-PAE-2.6.18-348.12.1.el5.i686
> > >
> > >
> > >
> > > But when I checked what kernel-PAE packages were installed, there
> > > were 3 installed currently on that system.
> > >
> > >
> > >
> > > [root at centos5server ~]# rpm -q kernel-PAE
> > >
> > > kernel-PAE-2.6.18-348.3.1.el5
> > >
> > > kernel-PAE-2.6.18-348.4.1.el5
> > >
> > > kernel-PAE-2.6.18-348.12.1.el5
> > >
> > >
> > >
> > > If I remove the two older kernels and then run the listupgrades
> > > command it shows no updates
> > >
> > >
> > >
> > > [root at centos5server ~]# rpm -e kernel-PAE-2.6.18-348.3.1.el5
> > >
> > > [root at centos5server ~]# rpm -e kernel-PAE-2.6.18-348.4.1.el5
> > >
> > > [root@ centos5server ~]# rhn-profile-sync
> > >
> > >
> > >
> > > spacecmd {SSM:0}> system_listupgrades rich-iweb-10-rv
> > >
> > > WARNING: No upgrades available for rich-iweb-10-rv
> > >
> > >
> > >
> > > Does this explain it? it’s listing the update twice – once for
> > > each
> > > of the out of date kernels. The GUI must have some logic that
> > > covers
> > > this case that the API doesn’t have.
> > >
> > >
> > >
> > > Regards,
> > >
> > > --Tony
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > From: spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com>
> > > [mailto:spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com>] On Behalf Of Andreas
> > > Dijkman
> > > Sent: Wednesday, August 14, 2013 11:08 AM
> > > To: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
> > > Subject: [Spacewalk-list] spacecmd system_listupgrades not
> > > working
> > >
> > >
> > >
> > > Hi,
> > >
> > >
> > >
> > >
> > >
> > > We currently have some systems configured with spacewalk and
> > > wanted
> > > to play around with spacecmd.
> > >
> > >
> > >
> > >
> > >
> > > The problem is the output of spacecmd system_listupgrades.
> > > Somehow
> > > there is a package-cache or something, because the
> > > system_listupgrades-command returns the list of not installed
> > > packages including the latest kernel-packages.
> > >
> > >
> > >
> > >
> > >
> > > However in the spacewalk-web-GUI these updates aren't listed. Can
> > > someone explain or confirm this behavior? We are running
> > > Spacewalk
> > > 2.0 with Oracle as backend.
> > >
> > >
> > >
> > >
> > >
> > > Met vriendelijke groet,
> > >
> > > Andreas Dijkman
> > > Oracle Technical Consultant
> > > Phone: +31(0)50-210 0132<tel:%2B31%280%2950-210%200132> | Mobile: +31(0)6-8115 2982<tel:%2B31%280%296-8115%202982>
> > > Cygnis | Stationsweg 3B | 9726 AC Groningen
> > >
> > >
> > > _______________________________________________
> > > Spacewalk-list mailing list
> > > Spacewalk-list at redhat.com<mailto:Spacewalk-list at redhat.com>
> > > https://www.redhat.com/mailman/listinfo/spacewalk-list
> >
> > _______________________________________________
> > Spacewalk-list mailing list
> > Spacewalk-list at redhat.com<mailto:Spacewalk-list at redhat.com>
> > https://www.redhat.com/mailman/listinfo/spacewalk-list
> >
> > _______________________________________________
> > Spacewalk-list mailing list
> > Spacewalk-list at redhat.com<mailto:Spacewalk-list at redhat.com>
> > https://www.redhat.com/mailman/listinfo/spacewalk-list
> >
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com<mailto:Spacewalk-list at redhat.com>
> https://www.redhat.com/mailman/listinfo/spacewalk-list

_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com<mailto:Spacewalk-list at redhat.com>
https://www.redhat.com/mailman/listinfo/spacewalk-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20130826/6edcf63e/attachment.htm>


More information about the Spacewalk-list mailing list