Bug 1119747 - confusing behavior of lmi.shell.connect on failure in python
Summary: confusing behavior of lmi.shell.connect on failure in python
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openlmi-tools
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Hatina
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-15 12:27 UTC by Alois Mahdal
Modified: 2014-07-29 02:08 UTC (History)
4 users (show)

Fixed In Version: openlmi-tools-0.9.2-2.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-29 02:08:01 UTC


Attachments (Terms of Use)

Description Alois Mahdal 2014-07-15 12:27:25 UTC
Description of problem:

The way how lmi.shell.connect responds when using /usr/bin/python, I try to connect to a local to CIM that is not started is confusing:

    # python
    Python 2.7.5 (default, Jun 25 2014, 10:19:55) 
    [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import lmi.shell
    >>> c = lmi.shell.connect("https://my.fqdn/", "pegasus", "aaa")
    No handlers could be found for logger "lmi.shell.LMIConnection"
    >>> repr(c)
    'None'
    >>> c = lmi.shell.connect("https://my.fqdn/", "pegasus", "aaa")
    >>> repr(c)
    'None'
    >>> # bring up Pegasus and try again
    ... 
    >>> c = lmi.shell.connect("https://my.fqdn/", "pegasus", "aaa")
    >>> repr(c)
    'None'

 *  First, the message about logger handlers is cleatly confusing.

 *  From that point, the connect() somehow "remembers" this, and does not
    throw the message again: it simply keeps returning None without any
    comments.

 *  Even if I fix the problem, connect does not notice; it keeps just
    silently returning None for the rest of the session.


Version-Release number of selected component (if applicable):
openlmi-tools-0.9.1-3.fc20.noarch

How reproducible:
Always

Steps to Reproduce:
 1. do not start Pegasus
 2. open interactive python session
 3. import lmi.shell and try to connect() to the (not running) CIMOM

Actual results:
Confusing message on first attempt, next attempts seem to "do nothing" (even after starting CIMOM)

Expected results:
Exception or rval with useful message, after starting CIMOM I expect connect() to start working properly


Additional info:

This is not limited only to case when CIMOM is not running.  It also happens if e.g. there is additional "/" in the URI.  (I suspect this happens with all errors.)

Comment 1 Fedora Update System 2014-07-16 13:03:04 UTC
openlmi-tools-0.9.2-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/openlmi-tools-0.9.2-2.fc20

Comment 2 Fedora Update System 2014-07-17 04:29:59 UTC
Package openlmi-tools-0.9.2-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openlmi-tools-0.9.2-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-8400/openlmi-tools-0.9.2-2.fc20
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2014-07-29 02:08:01 UTC
openlmi-tools-0.9.2-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.