Bug 1223475

Summary: all ice-setup tests are failing
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Alfredo Deza <adeza>
Component: Ceph-InstallerAssignee: Alfredo Deza <adeza>
Status: CLOSED ERRATA QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.3.0CC: adeza, aschoen, ceph-eng-bugs, hnallurv, kdreyer, nthomas, sankarshan
Target Milestone: rc   
Target Release: 1.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ice_setup-0.4.1-1.el7cp Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-24 15:53:12 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:
Bug Depends On:    
Bug Blocks: 1219294    

Description Alfredo Deza 2015-05-20 15:20:59 UTC
Description of problem: All ice setup tests are failing, preventing a release


Version-Release number of selected component (if applicable):


How reproducible: Always


Steps to Reproduce:
1. run py.test on the repository

Actual results:
============================= test session starts ==============================
platform linux2 -- Python 2.7.5 -- pytest-2.3.5
collected 43 items / 1 errors
ice_setup/tests/test_distributions.py FFFFFFFFFFFF
ice_setup/tests/test_paths.py ..FF
ice_setup/tests/test_prompts.py ...........................
==================================== ERRORS ====================================
_______________ ERROR collecting ice_setup/tests/test_system.py ________________
ice_setup/tests/test_system.py:6: in <module>
>   from ice_setup.ice import get_fqdn, infer_ceph_repo, ICEError, DirNotFound
E   ImportError: cannot import name infer_ceph_repo
=================================== FAILURES ===================================
______________________ TestYum.test_creates_default_file _______________________
self = <ice_setup.tests.test_distributions.TestYum object at 0x2550210>
etc_path = '/tmp/tmpeCMO62'
    def test_creates_default_file(self, etc_path):
>       Yum.create_repo_file('ceph', 'repo_url', 'gpg_url', etc_path=etc_path)
ice_setup/tests/test_distributions.py:20:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'ice_setup.ice.Yum'>, template_name = 'ceph', repo_url = 'repo_url'
gpg_url = 'gpg_url', file_name = 'ice.repo', use_gpg = True, kw = {}
etc_path = '/tmp/tmpeCMO62'
    @classmethod
    def create_repo_file(cls, template_name, repo_url, gpg_url, file_name=None, use_gpg=True, **kw):
        """set the contents of /etc/yum.repos.d/ice.repo"""
        etc_path = kw.pop('etc_path', '/etc/yum.repos.d')
        file_name = '%s.repo' % (file_name or 'ice')
>       template = yum_templates[template_name]
E       KeyError: 'ceph'
ice_setup/ice.py:583: KeyError

Expected results:
All tests passed

Comment 2 Ken Dreyer (Red Hat) 2015-05-20 16:02:57 UTC
Fixed upstream in https://github.com/ceph/ice-setup/pull/36

Comment 5 Harish NV Rao 2015-05-21 04:45:24 UTC
This bug seems to be caught during unit tests. QE will run installation tests referring to installation doc which will include ice_setup. QE will not run unit tests. ACKing this bug as this bug can be verified implicitly via installation tests.

Comment 8 Ken Dreyer (Red Hat) 2015-06-01 20:18:18 UTC
I'm going to mark this as VERIFIED myself because I've confirmed that the unit tests now pass.


============================= test session starts ==============================
platform linux2 -- Python 2.7.5 -- pytest-2.3.5
collected 43 items
ice_setup/tests/test_distributions.py ..........
ice_setup/tests/test_paths.py ...
ice_setup/tests/test_prompts.py ...........................
ice_setup/tests/test_system.py ...
========================== 43 passed in 0.14 seconds ===========================

Comment 10 errata-xmlrpc 2015-06-24 15:53:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2015:1183