Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1080092

Summary: qemu-kvm-tools package installation fails when using a local repo for hosed-engine install
Product: [oVirt] otopi Reporter: wdaniel
Component: Plugins.packagersAssignee: Alon Bar-Lev <alonbl>
Status: CLOSED INSUFFICIENT_DATA QA Contact: yeylon <yeylon>
Severity: high Docs Contact:
Priority: medium    
Version: 1.1.0CC: acathrow, alonbl, bazulay, benglish, cchen, didi, dougsland, iheim, pstehlik, Rhev-m-bugs, sbonazzo, srevivo, wdaniel, yeylon
Target Milestone: ---Keywords: Reopened, Triaged
Target Release: ---Flags: wdaniel: devel_ack?
Hardware: x86_64   
OS: Linux   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-07 00:50:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
miniyum.py none

Description wdaniel 2014-03-24 16:32:45 UTC
Description of problem:

Customer has used a local repository for his installation of Self Hosted Engine. It looks as if bug 909870 is being run into here, but one of the suggested fixes (https://bugzilla.redhat.com/show_bug.cgi?id=909870#c6) does not seem to occur here.


During the installation the following error was seen:

[ INFO  ] Engine replied: DB Up!Welcome to Health Status!
[ INFO  ] Waiting for the host to become operational in the engine. This may take several minutes...
[ ERROR ] The VDSM host was found in a failed state. Please check engine and bootstrap installation logs.
[ ERROR ] Unable to add theia_engine to the manager
          Please shutdown the VM allowing the system to launch it as a monitored service.
          The system will wait until the VM is down.

Once the installation script was modified to look for 'qemu-kvm-rhev-tools' instead of 'qemu-kvm-tools' the installation proceeded as normal. Here is the error from the setup log:

2014-03-20 06:29:41 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:88 Yum queue package qemu-kvm-tools for inst
all
2014-03-20 06:29:41 ERROR otopi.plugins.otopi.packagers.yumpackager yumpackager.error:97 Yum Cannot queue package qemu-kvm-tools: No
 package(s) available to install
2014-03-20 06:29:41 DEBUG otopi.context context._executeMethod:137 method exception
Traceback (most recent call last):
  File "/tmp/ovirt-4bZ8Po7FRo/pythonlib/otopi/context.py", line 127, in _executeMethod
    method['method']()
  File "/tmp/ovirt-4bZ8Po7FRo/otopi-plugins/ovirt-host-deploy/vdsm/packages.py", line 109, in _packages
    self.packager.install(('qemu-kvm-tools',))
  File "/tmp/ovirt-4bZ8Po7FRo/otopi-plugins/otopi/packagers/yumpackager.py", line 295, in install
    ignoreErrors=ignoreErrors
  File "/tmp/ovirt-4bZ8Po7FRo/pythonlib/otopi/miniyum.py", line 782, in install
    return self._queue('install', self._yb.install, packages, **kwargs)
  File "/tmp/ovirt-4bZ8Po7FRo/pythonlib/otopi/miniyum.py", line 449, in _queue
    call(name=package)
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 3560, in install
    raise Errors.InstallError, _('No package(s) available to install')
InstallError: No package(s) available to install
2014-03-20 06:29:41 ERROR otopi.context context._executeMethod:146 Failed to execute stage 'Package installation': No package(s) available to install


How reproducible:
Very

Steps to Reproduce:
1. Set up local repository, enable it for use
2. run 'hosted-engine --deploy' 
3. Finish installation of the VM OS so that the hosted-engine script resumes

Actual results:
The script fails to add the host due to package name issues

Expected results:
Host gets successfully added to manager

Comment 3 Alon Bar-Lev 2014-03-25 12:54:14 UTC
qemu-kvm-tools is used since forever, even before ovirt-host-deploy.

commit c2c19843e17a6400634a9627f950a6cc186a725b
Author: Alon Bar-Lev <alonbl>
Date:   Sun Nov 18 02:20:25 2012 +0200

    build: initial commit
    
    Change-Id: Id1e1ee12e9cea537597eda4edaeab7092156a00e
    Signed-off-by: Alon Bar-Lev <alonbl>

# yum install qemu-kvm-tools

==============================================================================================================================================================================================
 Package                                     Arch                           Version                                          Repository                                                  Size
==============================================================================================================================================================================================
Installing:
 qemu-kvm-rhev-tools                         x86_64                         2:0.12.1.2-2.415.el6_5.5                         rhel-6-server-rhev-mgmt-agent-rpms                         359 k

Also verified using miniyum install qemu-kvm-tools:

OK:   -->    install - 2:qemu-kvm-rhev-tools-0.12.1.2-2.415.el6_5.5.x86_64<--

So something must be wrong with channel assignment.

Comment 4 Sandro Bonazzola 2014-04-08 10:18:26 UTC
(In reply to Alon Bar-Lev from comment #3)

> Also verified using miniyum install qemu-kvm-tools:
> 
> OK:   -->    install - 2:qemu-kvm-rhev-tools-0.12.1.2-2.415.el6_5.5.x86_64<--
> 
> So something must be wrong with channel assignment.

Alon, they're not using channels... They're using local repository.
See comment #0

> Description of problem:
> Customer has used a local repository for his installation of Self Hosted Engine.

Comment 5 Alon Bar-Lev 2014-04-08 10:40:29 UTC
(In reply to Sandro Bonazzola from comment #4)
> (In reply to Alon Bar-Lev from comment #3)
> 
> > Also verified using miniyum install qemu-kvm-tools:
> > 
> > OK:   -->    install - 2:qemu-kvm-rhev-tools-0.12.1.2-2.415.el6_5.5.x86_64<--
> > 
> > So something must be wrong with channel assignment.
> 
> Alon, they're not using channels... They're using local repository.
> See comment #0
> 
> > Description of problem:
> > Customer has used a local repository for his installation of Self Hosted Engine.

it is not important, it should provide qemu-kvm-tools even in local repo, unless the local repo is not created properly or package missing the Provides statement.

Comment 6 Sandro Bonazzola 2014-04-08 13:33:57 UTC
wdaniel, closing thie with insufficient data.
I can't reproduce this. Please reopen if you get steps for reproducing this.

Comment 7 wdaniel 2014-04-15 17:03:21 UTC
Sandro,

Apologies for the delay. The customer told me the following:

The packages were gathered on a different host via 'yum install rhevm --downloadonly'. Then a repository was created via 'repocreate'. The result was written to a DVD. This DVD was then mounted and configured on the target host as a repository.

He no longer has the setup logs as they had been deleted not too long after this event. If the key to tracking this down was in those logs, we can close this again.

Comment 8 Sandro Bonazzola 2014-04-16 12:00:37 UTC
Hi Wallace, the repository created locally by the customer was incomplete.
'yum install rhevm --downloadonly' just download rhevm and it's dependencies.

The customer should have used something like reposync command in order to download the whole repository and not only rhevm dependencies.

Comment 9 Chen 2014-05-28 03:30:38 UTC
Hi team,

My Cu has encountered the issue, too.

In ovirt-engine/host-deploy/

2014-05-23 13:07:54 DEBUG otopi.plugins.otopi.packagers.yumpackager yumpackager.verbose:88 Yum queue package qemu-kvm-tools for install
2014-05-23 13:07:54 ERROR otopi.plugins.otopi.packagers.yumpackager yumpackager.error:97 Yum Cannot queue package qemu-kvm-tools: No package(s) available to install
2014-05-23 13:07:54 DEBUG otopi.context context._executeMethod:137 method exception
Traceback (most recent call last):
  File "/tmp/ovirt-MvXY0B0wJY/pythonlib/otopi/context.py", line 127, in _executeMethod
    method['method']()
  File "/tmp/ovirt-MvXY0B0wJY/otopi-plugins/ovirt-host-deploy/vdsm/packages.py", line 109, in _packages
    self.packager.install(('qemu-kvm-tools',))
  File "/tmp/ovirt-MvXY0B0wJY/otopi-plugins/otopi/packagers/yumpackager.py", line 295, in install
    ignoreErrors=ignoreErrors
  File "/tmp/ovirt-MvXY0B0wJY/pythonlib/otopi/miniyum.py", line 782, in install
    return self._queue('install', self._yb.install, packages, **kwargs)
  File "/tmp/ovirt-MvXY0B0wJY/pythonlib/otopi/miniyum.py", line 449, in _queue
    call(name=package)
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 3560, in install
    raise Errors.InstallError, _('No package(s) available to install')
InstallError: No package(s) available to install
2014-05-23 13:07:54 ERROR otopi.context context._executeMethod:146 Failed to execute stage 'Package installation': No package(s) available to install
2014-05-23 13:07:54 DEBUG otopi.transaction transaction.abort:131 aborting 'Yum Transaction'
2014-05-23 13:07:54 INFO otopi.plugins.otopi.packagers.yumpackager yumpackager.info:92 Yum Performing yum transaction rollback
Loaded plugins: product-id, refresh-packagekit






But the CU can install the qemu-kvm-tools package in terminal even though qemu-kvm-tools is obsoleted.

[root@rhelhost3 ~]# yum install qemu-kvm-tools
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package qemu-kvm-rhev-tools.x86_64 2:0.12.1.2-2.415.el6_5.8 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package            Arch   Version                  Repository             Size
================================================================================
Installing:
 qemu-kvm-rhev-tools
                    x86_64 2:0.12.1.2-2.415.el6_5.8 local-self-hosted-rpm 364 k

Transaction Summary
================================================================================
Install       1 Package(s)

Total download size: 364 k
Installed size: 3.5 k
Is this ok [y/N]: n
Exiting on user Command



The Cu found that if he change package.py, he will workaround this.

/usr/share/ovirt-host-deploy/plugins/ovirt-host-deploy/vdsm/packages.py 
 self.packager.intall(('qemu-kvm-tools',)) 
 ↓
 self.packager.intall(('qemu-kvm-rhev-tools',))


Could anyone give me some hint ? If anything is needed please inform me.

Comment 10 Alon Bar-Lev 2014-05-28 06:17:18 UTC
Created attachment 899847 [details]
miniyum.py

Please run this script on that host and attach output.
Thanks.

Comment 11 Chen 2014-05-28 06:52:24 UTC
Hi Alon,

Do I need to run yum clean all before I run that script ?

Chen

Comment 12 Alon Bar-Lev 2014-05-28 07:06:15 UTC
(In reply to Chen from comment #11)
> Hi Alon,
> 
> Do I need to run yum clean all before I run that script ?
> 
> Chen

just remove this package.

Comment 13 Chen 2014-05-30 02:09:08 UTC
Hi Alon, 

Below is the output and if anything is needed please inform me. 

Chen


[root@rhelhost3 work]# python miniyum.py
VERB: -->Loaded plugins: product-id, refresh-packagekit<--
VERB: -->Loaded plugins: product-id, refresh-packagekit<--
OK:   -->Search Summary:<--
OK:   -->    available - 2:qemu-kvm-rhev-tools-0.12.1.2-2.415.el6_5.8.x86_64<--
VERB: -->queue package qemu-kvm-tools for install<--
VERB: -->processing package 2:qemu-kvm-rhev-tools-0.12.1.2-2.415.el6_5.8.x86_64 for install<--
VERB: -->package 2:qemu-kvm-rhev-tools-0.12.1.2-2.415.el6_5.8.x86_64 queued<--
VERB: -->Building transaction<--
VERB: -->Transaction built<--
VERB: -->Transaction Summary:<--
VERB: -->    install    - 2:qemu-kvm-rhev-tools-0.12.1.2-2.415.el6_5.8.x86_64<--
VERB: -->Processing transaction<--
OK:   -->Status: Downloading Packages<--
VERB: -->Status: Download packages packages: 2:qemu-kvm-rhev-tools-0.12.1.2-2.415.el6_5.8.x86_64<--
OK:   -->Download/Verify: 2:qemu-kvm-rhev-tools-0.12.1.2-2.415.el6_5.8.x86_64<--
OK:   -->Status: Check Package Signatures<--
OK:   -->Status: Running Test Transaction<--
VERB: -->Running rpm_check_debug<--
OK:   -->Status: Running Transaction<--
OK:   -->install: 1/1: 2:qemu-kvm-rhev-tools-0.12.1.2-2.415.el6_5.8.x86_64<--
VERB: -->Installed: 2:qemu-kvm-rhev-tools-0.12.1.2-2.415.el6_5.8.x86_64<--
VERB: -->Done: 2:qemu-kvm-rhev-tools-0.12.1.2-2.415.el6_5.8.x86_64<--
VERB: -->loaded plugin modules: []<--
VERB: -->loaded plugins: {}<--
VERB: -->Error loading productid metadata for local-rhevm-jb-eap-6-for-rhel-6-server-rpms.<--
VERB: -->Error loading productid metadata for local-rhevm-rhel-6-server-cf-tools-1-rpms.<--
VERB: -->Error loading productid metadata for local-rhevm-rhel-6-server-eus-rpms.<--
VERB: -->Error loading productid metadata for local-rhevm-rhel-6-server-rhevm-3.3-rpms.<--
VERB: -->Error loading productid metadata for local-rhevm-rhel-6-server-rpms.<--
VERB: -->Error loading productid metadata for local-rhevm-rhel-6-server-supplementary-rpms.<--
VERB: -->Error loading productid metadata for local-rpm-rhel-6-server-eus-rpms.<--
VERB: -->Error loading productid metadata for local-rpm-rhel-6-server-rpms.<--
VERB: -->Error loading productid metadata for local-self-hosted-rpm.<--
VERB: -->Error loading productid metadata for rhel-6-server-cf-tools-1-rpms.<--
VERB: -->Updating installed certificates<--
VERB: -->about to run post_product_id_install<--
OK:   -->Verify: 1/1: qemu-kvm-rhev-tools.x86_64 2:0.12.1.2-2.415.el6_5.8 - u<--
VERB: -->Transaction processed<--
OK:   -->Performing yum transaction rollback<--
VERB: -->Downloading: local-rhevm-jb-eap-6-for-rhel-6-server-rpms/filelists_db (0%)<--
VERB: -->Downloading: local-rhevm-jb-eap-6-for-rhel-6-server-rpms/filelists_db 174 k(100%)<--
VERB: -->Downloading: local-rhevm-jb-eap-6-for-rhel-6-server-rpms/other_db (0%)<--
VERB: -->Downloading: local-rhevm-jb-eap-6-for-rhel-6-server-rpms/other_db 108 k(100%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-cf-tools-1-rpms/filelists_db (0%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-cf-tools-1-rpms/filelists_db 174 k(100%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-cf-tools-1-rpms/other_db (0%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-cf-tools-1-rpms/other_db 108 k(100%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-eus-rpms/filelists_db (0%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-eus-rpms/filelists_db 174 k(100%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-eus-rpms/other_db (0%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-eus-rpms/other_db 108 k(100%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-rhevm-3.3-rpms/filelists_db (0%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-rhevm-3.3-rpms/filelists_db 174 k(100%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-rhevm-3.3-rpms/other_db (0%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-rhevm-3.3-rpms/other_db 108 k(100%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-rpms/filelists_db (0%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-rpms/filelists_db 174 k(100%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-rpms/other_db (0%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-rpms/other_db 108 k(100%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-supplementary-rpms/filelists_db (0%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-supplementary-rpms/filelists_db 174 k(100%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-supplementary-rpms/other_db (0%)<--
VERB: -->Downloading: local-rhevm-rhel-6-server-supplementary-rpms/other_db 108 k(100%)<--
VERB: -->Downloading: local-rpm-rhel-6-server-eus-rpms/filelists_db (0%)<--
VERB: -->Downloading: local-rpm-rhel-6-server-eus-rpms/filelists_db 115 k(100%)<--
VERB: -->Downloading: local-rpm-rhel-6-server-eus-rpms/other_db (0%)<--
VERB: -->Downloading: local-rpm-rhel-6-server-eus-rpms/other_db 69 k(100%)<--
VERB: -->Downloading: local-rpm-rhel-6-server-rpms/filelists_db (0%)<--
VERB: -->Downloading: local-rpm-rhel-6-server-rpms/filelists_db 115 k(100%)<--
VERB: -->Downloading: local-rpm-rhel-6-server-rpms/other_db (0%)<--
VERB: -->Downloading: local-rpm-rhel-6-server-rpms/other_db 69 k(100%)<--
VERB: -->Downloading: local-self-hosted-rpm/filelists_db (0%)<--
VERB: -->Downloading: local-self-hosted-rpm/filelists_db 41 k(100%)<--
VERB: -->Downloading: local-self-hosted-rpm/other_db (0%)<--
VERB: -->Downloading: local-self-hosted-rpm/other_db 53 k(100%)<--
VERB: -->Downloading: rhel-6-server-cf-tools-1-rpms/filelists_db (0%)<--
VERB: -->Downloading: rhel-6-server-cf-tools-1-rpms/filelists_db 115 k(100%)<--
VERB: -->Downloading: rhel-6-server-cf-tools-1-rpms/other_db (0%)<--
VERB: -->Downloading: rhel-6-server-cf-tools-1-rpms/other_db 69 k(100%)<--
VERB: -->Building transaction<--
VERB: -->Transaction built<--
VERB: -->Transaction Summary:<--
VERB: -->    erase      - 2:qemu-kvm-rhev-tools-0.12.1.2-2.415.el6_5.8.x86_64<--
VERB: -->Processing transaction<--
OK:   -->Status: Downloading Packages<--
OK:   -->Status: Running Test Transaction<--
VERB: -->Running rpm_check_debug<--
OK:   -->Status: Running Transaction<--
VERB: -->Erased: qemu-kvm-rhev-tools<--
OK:   -->erase: 1/1: qemu-kvm-rhev-tools<--
VERB: -->Done: qemu-kvm-rhev-tools<--
VERB: -->Error loading productid metadata for local-rhevm-jb-eap-6-for-rhel-6-server-rpms.<--
VERB: -->Error loading productid metadata for local-rhevm-rhel-6-server-cf-tools-1-rpms.<--
VERB: -->Error loading productid metadata for local-rhevm-rhel-6-server-eus-rpms.<--
VERB: -->Error loading productid metadata for local-rhevm-rhel-6-server-rhevm-3.3-rpms.<--
VERB: -->Error loading productid metadata for local-rhevm-rhel-6-server-rpms.<--
VERB: -->Error loading productid metadata for local-rhevm-rhel-6-server-supplementary-rpms.<--
VERB: -->Error loading productid metadata for local-rpm-rhel-6-server-eus-rpms.<--
VERB: -->Error loading productid metadata for local-rpm-rhel-6-server-rpms.<--
VERB: -->Error loading productid metadata for local-self-hosted-rpm.<--
VERB: -->Error loading productid metadata for rhel-6-server-cf-tools-1-rpms.<--
VERB: -->Updating installed certificates<--
VERB: -->about to run post_product_id_install<--
OK:   -->Verify: 1/1: qemu-kvm-rhev-tools.x86_64 2:0.12.1.2-2.415.el6_5.8 - e<--
VERB: -->Transaction processed<--

Comment 14 Alon Bar-Lev 2014-06-05 18:20:30 UTC
Sorry for the late response.

I see all is working... which version exactly of otopi do you have on the engine machine? I will send miniyum of this version.

Thanks!

Comment 15 Alon Bar-Lev 2014-06-29 11:06:54 UTC
Chen?

Comment 16 Chen 2014-07-01 09:36:38 UTC
Hi Alon,

I'm sorry for the delay.

I'm not getting update from my CU so I can not provide otopi version now.

I agree with you that miniyum works fine. ( I asked them to reproduce this issue in a clean environment because they were likely to change the python scripts before. If I got update from CU I will update the ticket. )

Thank you for your help !

Chen

Comment 17 Alon Bar-Lev 2014-07-07 00:50:44 UTC
OK, closing this for now. Please reopen if you have any more data.