Bug 1129701 - Glance image-list failed with -> shell-init: error retrieving current directory
Summary: Glance image-list failed with -> shell-init: error retrieving current directory
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-glance
Version: 5.0 (RHEL 6)
Hardware: x86_64
OS: Linux
medium
unspecified
Target Milestone: ---
: 5.0 (RHEL 7)
Assignee: Flavio Percoco
QA Contact: nlevinki
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-13 13:39 UTC by Tzach Shefi
Modified: 2016-04-26 17:17 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-21 09:16:52 UTC


Attachments (Terms of Use)
Glance api.log (740.15 KB, text/plain)
2014-08-13 13:39 UTC, Tzach Shefi
no flags Details


Links
System ID Priority Status Summary Last Updated
Launchpad 1356373 None None None Never

Description Tzach Shefi 2014-08-13 13:39:29 UTC
Created attachment 926443 [details]
Glance api.log

Description of problem: During recreation of another bug on my setup AIO Neutron network, during instance snapshot process before snapshot completed uploading I did #glance image-list 

root@orange-vdse tmptriyEJ(keystone_admin)]# glance image-list
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Traceback (most recent call last):
  File "/usr/bin/glance", line 6, in <module>
    from glanceclient.shell import main
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 30, in <module>
    from keystoneclient.v2_0 import client as ksclient
  File "/usr/lib/python2.7/site-packages/keystoneclient/v2_0/__init__.py", line 2, in <module>
    from keystoneclient.v2_0.client import Client
  File "/usr/lib/python2.7/site-packages/keystoneclient/v2_0/client.py", line 20, in <module>
    from keystoneclient import httpclient
  File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 27, in <module>
    import keyring
  File "/usr/lib/python2.7/site-packages/keyring/__init__.py", line 12, in <module>
    from .core import (set_keyring, get_keyring, set_password, get_password,
  File "/usr/lib/python2.7/site-packages/keyring/core.py", line 180, in <module>
    init_backend()
  File "/usr/lib/python2.7/site-packages/keyring/core.py", line 59, in init_backend
    set_keyring(load_config() or _get_best_keyring())
  File "/usr/lib/python2.7/site-packages/keyring/core.py", line 105, in load_config
    local_path = os.path.join(os.getcwd(), filename)
OSError: [Errno 2] No such file or directory

Version-Release number of selected component (if applicable):
RHEL7
python-glanceclient-0.13.1-1.el7ost.noarch
openstack-glance-2014.1.1-1.el7ost.noarch
python-glance-2014.1.1-1.el7ost.noarch
openstack-nova-compute-2014.1.1-4.el7ost.noarch


How reproducible:
Not sure first time, looks like a fluke one off problem to me.

Steps to Reproduce:
1. Booted an instance 
2. Created a snapshot of that running instance
3. Before snapshot upload completed, ran glance image-list.

Actual results:
Glance image-list failed with above trace

Expected results:
Glance image-list should worked without errors.

Comment 1 Tzach Shefi 2014-08-13 13:40:33 UTC
BTW forgot to mention running glance image-list a moment later worked fine.

Comment 2 Tzach Shefi 2014-08-13 13:47:38 UTC
BTW2, just noticed something odd my pwd at the time of the command was
/var/lib/nova/instances/snapshots/tm..  temp folder of snapshot

I think the problem is related or was caused by sending the command from this temp folder as it failed again but once I moved up one folder back I didn't get this trace error again.

Comment 3 Flavio Percoco 2014-08-21 09:16:52 UTC
The bug was definitely related to that. There's no much we can do here other than providing a better error. However, this is not a common case and the error is raised by keystoneclient.


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