[Users] oVirt 3.1 - Error adding host , incorrect vdsm version

Dan Kenigsberg danken at redhat.com
Sat Jul 7 19:06:00 UTC 2012


On Fri, Jul 06, 2012 at 02:48:55PM -0500, Trey Dockendorf wrote:
> On Thu, Jun 21, 2012 at 5:31 AM, Dan Kenigsberg <danken at redhat.com> wrote:
> > On Wed, Jun 20, 2012 at 05:58:57AM +0300, Dan Kenigsberg wrote:
> >> On Tue, Jun 19, 2012 at 02:43:14PM -0500, Trey Dockendorf wrote:
> >> > On Tue, Jun 19, 2012 at 1:40 PM, Dan Kenigsberg <danken at redhat.com> wrote:
> >> > > On Tue, Jun 19, 2012 at 12:08:09PM -0400, Ofer Schreiber wrote:
> >> > >> Just checked this issue with latest ovirt-engine on F17 (with vdsm 4.10), and didn't encounter this issue at all.
> >> > >>
> >> > >> Danken - any idea why?
> >> > >
> >> > > Hey! I was the one soliciting ideas on how come this issue was not seen
> >> > > until Trey bumped on it. ;-)
> >> > >
> >> > > Maybe, just maybe, you host sees BOTH 4.10 and 4.9 ?
> >> > >
> >> > > what does the following print on your python interpreter?
> >> > >
> >> > > import yum
> >> > > my = yum.YumBase()
> >> > > my.pkgSack.searchNevra(name='rpm')
> >> > >
> >> >
> >> > >From the python , you want to output of name='rpm' or name='vdsm' ?  I
> >> > figured the later but included both
> >>
> >> arghh s/rpm/vdsm/
> >>
> >> Actually, this question was directed at Ofer. I was wodering how come
> >> the untouched code was working in his environment.
> >
> > For the record - we've tested this on Ofer's machine and found an old
> > yum repo with vdsm-4.9.3 or something, which hidden this bug from many
> > of us red-hatters.
> >
> > Thanks for reporting! The fix would be available in the next beta build.
> 
> I've updated VDSM to 4.10.0-4 and now have run into a new, yet related issue.
> 
> When the method yumSearchVersion is run, it fails with this error in
> the vds_installer log
> 
> 
> # cat vds_bootstrap.326741.log
> Fri, 06 Jul 2012 14:15:04 DEBUG    **** Start VDS Validation ****
> Fri, 06 Jul 2012 14:15:04 DEBUG    Entered VdsValidation(subject =
> '128.194.76.172', random_num = '8fe3c810-65bd-41e8-ae66-d4ea20fb71cb',
> rev_num = 'None', installVirtualizationService = 'True',
> installGlusterService = 'False')
> Fri, 06 Jul 2012 14:15:04 DEBUG    Setting up Package Sacks
> Fri, 06 Jul 2012 14:15:04 DEBUG    Host properly registered with RHN/Satellite.
> Fri, 06 Jul 2012 14:15:04 DEBUG    <BSTRAP
> component='RHN_REGISTRATION' status='OK' message='Host properly
> registered with RHN/Satellite.'/>
> Fri, 06 Jul 2012 14:15:04 ERROR    checkMajorVersion: Error searching
> for VDSM version!
> Traceback (most recent call last):
>   File "/tmp/vds_bootstrap_8fe3c810-65bd-41e8-ae66-d4ea20fb71cb.py",
> line 250, in checkMajorVersion
>     rc = deployUtil.yumSearchVersion(VDSM_NAME, VDSM_MIN_VER)
>   File "/tmp/deployUtil.py", line 1049, in yumSearchVersion
>     if rpmUtils.miscutils.compareVerOnly(pkg.ver, ver) >= 0:
> AttributeError: 'module' object has no attribute 'compareVerOnly'
> Fri, 06 Jul 2012 14:15:04 ERROR    Unable to fetch VDSM with minimal
> version of 4.9. Please check if host is properly registered with
> updated yum repository
> Fri, 06 Jul 2012 14:15:04 DEBUG    <BSTRAP component='VDSM_MAJOR_VER'
> status='FAIL' message='Unable to fetch VDSM with minimal version of
> 4.9. Please check if host is properly registered with updated yum
> repository'/>
> Fri, 06 Jul 2012 14:15:04 ERROR    checkMajorVersion test failed
> Fri, 06 Jul 2012 14:15:04 DEBUG    <BSTRAP component='RHEV_INSTALL'
> status='FAIL'/>
> Fri, 06 Jul 2012 14:15:04 DEBUG    **** End VDS Validation ****
> 
> 
> Some research on rpmUtils.miscutils.compareVerOnly shows that it
> doesn't exist in yum-3.2.29 which is the latest in EL6 (CentOS 6.2).
> The only API documentation I found with that is yum-3.4.3.
> 
> That being said, is this one of those cases where a patch is necessary
> to allow this code to work outside Fedora ?  I believe a workaround
> exists in Dreyou's repo with a patch such as this

Trey, thank you very much about this report.
I was not aware that I've been using a non-el6 API in my code. That's
bad of me since we *should* support both latest Fedora and latest el6.

Thanks for the following patch, too.

Dreyou, would it be impolite of me if I ask you (and everyone who cares
about ovirt) to send patches like this to upstream first?

I am not sure that everything in http://www1.dreyou.org/ovirt/vdsm.patch
is ready for general consumption, but I'm very eager to extend our coverage.

Patches are really welcome.

> 
> diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in
> index 6bd4b3d..7dc049e 100644
> --- a/vdsm_reg/deployUtil.py.in
> +++ b/vdsm_reg/deployUtil.py.in
> @@ -1046,7 +1046,8 @@ def yumSearchVersion(pkgName, ver):
>      import rpmUtils.miscutils
> 
>      for pkg in yumListPackages(pkgName):
> -        if rpmUtils.miscutils.compareVerOnly(pkg.ver, ver) >= 0:
> +#        if rpmUtils.miscutils.compareVerOnly(pkg.ver, ver) >= 0:
> +        if rpmUtils.miscutils.compareEVR(('', pkg.ver, ''), ('', ver,
> '')) >= 0:
>              return True
>      else:
>          return False
> 
> 
> 
> Thanks
> - Trey



More information about the Users mailing list