Bug 1269425

Summary: Cannot initialize minidnf causes setup failure
Product: [oVirt] otopi Reporter: Jiri Belka <jbelka>
Component: Plugins.packagersAssignee: Alon Bar-Lev <alonbl>
Status: CLOSED DUPLICATE QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: masterCC: bugs, iheim, jbelka
Target Milestone: ---Flags: rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-07 11:28:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Belka 2015-10-07 10:04:58 UTC
Description of problem:

there's something strange going on with host-deploy and rhel6 hosts in _3.5_ cluster level because host-deploy initiated by host-update-manager checks for dnf.

--->%---
Oct 7, 2015 11:38:00 AM

Failed to check for available updates on host host.example.com with message 'Command returned failure code 1 during SSH session 'root.com
---<%---

--->%---
2015-10-07 11:50:06 DEBUG otopi.context context._executeMethod:142 Stage boot METHOD otopi.plugins.otopi.packagers.yumpackager.Plugin._boot
Loaded plugins: product-id
2015-10-07 11:50:07 DEBUG otopi.context context.dumpEnvironment:500 ENVIRONMENT DUMP - BEGIN
2015-10-07 11:50:07 DEBUG otopi.context context.dumpEnvironment:510 ENV PACKAGER/keepAliveInterval=int:'30'
2015-10-07 11:50:07 DEBUG otopi.context context.dumpEnvironment:510 ENV PACKAGER/yumDisabledPlugins=list:'[]'
2015-10-07 11:50:07 DEBUG otopi.context context.dumpEnvironment:510 ENV PACKAGER/yumEnabledPlugins=list:'[]'
2015-10-07 11:50:07 DEBUG otopi.context context.dumpEnvironment:510 ENV PACKAGER/yumExpireCache=bool:'True'
2015-10-07 11:50:07 DEBUG otopi.context context.dumpEnvironment:510 ENV PACKAGER/yumRollback=bool:'True'
2015-10-07 11:50:07 DEBUG otopi.context context.dumpEnvironment:510 ENV PACKAGER/yumpackagerEnabled=bool:'True'
2015-10-07 11:50:07 DEBUG otopi.context context.dumpEnvironment:514 ENVIRONMENT DUMP - END
2015-10-07 11:50:07 DEBUG otopi.context context._executeMethod:142 Stage boot METHOD otopi.plugins.otopi.system.info.Plugin._init
2015-10-07 11:50:07 DEBUG otopi.plugins.otopi.system.info info._init:51 SYSTEM INFORMATION - BEGIN
2015-10-07 11:50:07 DEBUG otopi.plugins.otopi.system.info info._init:52 executable /usr/bin/python
2015-10-07 11:50:07 DEBUG otopi.plugins.otopi.system.info info._init:53 python /usr/bin/python
2015-10-07 11:50:07 DEBUG otopi.plugins.otopi.system.info info._init:54 platform linux2
2015-10-07 11:50:07 DEBUG otopi.plugins.otopi.system.info info._init:55 distribution ('Red Hat Enterprise Linux Server', '6.7', 'Santiago')
2015-10-07 11:50:07 DEBUG otopi.plugins.otopi.system.info info._init:56 host 'host.example.com
2015-10-07 11:50:07 DEBUG otopi.plugins.otopi.system.info info._init:62 uid 0 euid 0 gid 0 egid 0
2015-10-07 11:50:07 DEBUG otopi.plugins.otopi.system.info info._init:64 SYSTEM INFORMATION - END
2015-10-07 11:50:07 DEBUG otopi.context context._executeMethod:142 Stage boot METHOD otopi.plugins.otopi.packagers.dnfpackager.Plugin._boot
2015-10-07 11:50:07 DEBUG otopi.plugins.otopi.packagers.dnfpackager dnfpackager._boot:178 Cannot initialize minidnf
Traceback (most recent call last):
  File "/tmp/ovirt-rSbhnv7AO1/otopi-plugins/otopi/packagers/dnfpackager.py", line 165, in _boot
    constants.PackEnv.DNF_DISABLED_PLUGINS
  File "/tmp/ovirt-rSbhnv7AO1/otopi-plugins/otopi/packagers/dnfpackager.py", line 75, in _getMiniDNF
    from otopi import minidnf
  File "/tmp/ovirt-rSbhnv7AO1/pythonlib/otopi/minidnf.py", line 9, in <module>
    import dnf
ImportError: No module named dnf
---<%---

Version-Release number of selected component (if applicable):
ovirt-host-deploy-1.4.0-0.0.5.master.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. 3.6 engine + 3.5 clstr + rhel6.7 host in 3.5 clstr
2. wait for host-update-manager to fire host-deploy to check for available
   updates (engine-config -s HostPackagesUpdateTimeInHours=0.1 if you are not
   patient)
3. wait and see what appears in Events and host-deploy log for your host

Actual results:
failed event (see above) and failure to import dnf on rhel6 host (causing failed event?)

Expected results:
silenzio or show available packages

Additional info:

Comment 1 Alon Bar-Lev 2015-10-07 10:56:08 UTC
Full log please.

Comment 2 Jiri Belka 2015-10-07 11:28:43 UTC
bugzilla was playing games with me, see BZ1269426

*** This bug has been marked as a duplicate of bug 1269426 ***