glance database creation error

Bug #1307894 reported by Peter Zhou
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-manuals
Fix Released
Undecided
Unassigned

Bug Description

run "glance-manage db_sync", got msg:
2014-04-15 16:06:18.356 6816 CRITICAL glance [-] AttributeError: 'NoneType' object has no attribute 'drivername'

log file /var/log/glance/api.log shows:
2014-04-15 15:49:47.775 6474 ERROR glance.store.sheepdog [-] Error in store configuration: Unexpected error while running command.
Command: None
Exit code: -
Stdout: "Unexpected error while running command.\nCommand: collie\nExit code: 127\nStdout: ''\nStderr: '/bin/sh: 1: collie: not found\\n'"
Stderr: None
2014-04-15 15:49:47.777 6474 WARNING glance.store.base [-] Failed to configure store correctly: Store sheepdog could not be configured correctly. Reason: Error in store configuration: Unexpected error while running command.
Command: None
Exit code: -
Stdout: "Unexpected error while running command.\nCommand: collie\nExit code: 127\nStdout: ''\nStderr: '/bin/sh: 1: collie: not found\\n'"
Stderr: None Disabling add method.
2014-04-15 15:49:47.778 6474 WARNING glance.store [-] Deprecated: glance.store.sheepdog.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-04-15 15:49:47.790 6474 WARNING glance.store [-] Deprecated: glance.store.rbd.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-04-15 15:49:47.793 6474 WARNING glance.store.base [-] Failed to configure store correctly: Store gridfs could not be configured correctly. Reason: Missing dependencies: pymongo Disabling add method.
2014-04-15 15:49:47.793 6474 WARNING glance.store [-] Deprecated: glance.store.gridfs.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-04-15 15:49:47.871 6474 WARNING glance.store.base [-] Failed to configure store correctly: Store cinder could not be configured correctly. Reason: Cinder storage requires a context. Disabling add method.
2014-04-15 15:49:47.872 6474 WARNING glance.store [-] Deprecated: glance.store.cinder.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-04-15 15:49:47.878 6474 ERROR glance.store.filesystem [-] Permission to write in /var/lib/glance/images/ denied
2014-04-15 15:49:47.878 6474 TRACE glance.store.filesystem None
2014-04-15 15:49:47.878 6474 TRACE glance.store.filesystem
2014-04-15 15:49:47.880 6474 WARNING glance.store.base [-] Failed to configure store correctly: Store filesystem could not be configured correctly. Reason: Permission to write in /var/lib/glance/images/ denied Disabling add method.
2014-04-15 15:49:47.886 6474 WARNING glance.store [-] Deprecated: glance.store.swift.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-04-15 15:49:47.967 6474 WARNING glance.store [-] Deprecated: glance.store.vmware_datastore.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-04-15 15:49:47.970 6474 WARNING glance.store [-] Deprecated: glance.store.s3.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-04-15 15:49:47.977 6474 ERROR glance.store.filesystem [5b7d5afd-9466-4cf9-8b77-73bd5c01cf24 - - - - -] Permission to write in /var/lib/glance/images/ denied
2014-04-15 15:49:47.977 6474 TRACE glance.store.filesystem None
2014-04-15 15:49:47.977 6474 TRACE glance.store.filesystem
2014-04-15 15:49:47.983 6474 WARNING glance.store.base [5b7d5afd-9466-4cf9-8b77-73bd5c01cf24 - - - - -] Failed to configure store correctly: Store filesystem could not be configured correctly. Reason: Permission to write in /var/lib/glance/images/ denied Disabling add method.
2014-04-15 15:49:48.039 6474 WARNING glance.api.v2.images [-] Could not find schema properties file schema-image.json. Continuing without custom properties
2014-04-15 16:03:37.549 6768 CRITICAL glance [-] AttributeError: 'NoneType' object has no attribute 'drivername'

2014-04-15 16:06:18.356 6816 CRITICAL glance [-] AttributeError: 'NoneType' object has no attribute 'drivername'

-----------------------------------
Built: 2014-04-15T07:04:25 00:00
git SHA: 7da1268a285f60348ed94111dfcbcc41167b877b
URL: http://docs.openstack.org/trunk/install-guide/install/apt/content/glance-install.html
source File: file:/home/jenkins/workspace/openstack-install-deploy-guide-ubuntu/doc/install-guide/section_glance-install.xml
xml:id: glance-install

Revision history for this message
Tom Fifield (fifieldt) wrote :

Hi,

What are the permissions on /var/lib/glance/images ?

ls -l /var/lib/glance/images

ls -l /var/lib/glance

Changed in openstack-manuals:
status: New → Incomplete
Revision history for this message
Peter Zhou (zhouyb13) wrote :

I ran the database creation, I guess that's why I don't really have a file under /var/lib/glance/images
But check the "ls -l /var/lib/glance", i got:
drwxr-xr-x 5 root root 4096 Apr 15 15:49 image-cache
drwxr-xr-x 2 root root 4096 Apr 3 19:34 images

in fact, I ran "glance-manage db_sync" under root.

Revision history for this message
Tom Fifield (fifieldt) wrote :

Your directories have the wrong permissions. You'll need to chown glance:glance on those directories.

This is not a documentation bug.

Changed in openstack-manuals:
status: Incomplete → Invalid
Revision history for this message
Peter Zhou (zhouyb13) wrote :

Thanks Tom.

But I followed the doc command by command. if the file is "root,root", must be something wrong during the installation of glance in the doc.

Revision history for this message
Tom Fifield (fifieldt) wrote :

ubuntu 12.04 or 14.04?

Changed in openstack-manuals:
status: Invalid → Incomplete
Revision history for this message
Peter Zhou (zhouyb13) wrote :

ubuntu 12.04 LTS

Revision history for this message
Tom Fifield (fifieldt) wrote :

Ok, Peter, I think they fixed the bug. glance-manage was changing the permissions of some files.

We now put the command in a su wrapper to ensure it's run as glance:

su -s /bin/sh -c "glance-manage db_sync" glance

Changed in openstack-manuals:
status: Incomplete → Fix Released
milestone: none → icehouse
Revision history for this message
Peter Zhou (zhouyb13) wrote :
Download full text (3.8 KiB)

Tom, thanks. Saw the change in doc. So quick! ;-)

But still get:
2014-04-17 14:15:29.845 2344 CRITICAL glance [-] AttributeError: 'NoneType' object has no attribute 'drivername'

glance api.log:
2014-04-17 14:14:06.118 1059 ERROR glance.store.sheepdog [-] Error in store configuration: Unexpected error while running command.
Command: None
Exit code: -
Stdout: "Unexpected error while running command.\nCommand: collie\nExit code: 127\nStdout: ''\nStderr: '/bin/sh: 1: collie: not found\\n'"
Stderr: None
2014-04-17 14:14:06.121 1059 WARNING glance.store.base [-] Failed to configure store correctly: Store sheepdog could not be configured correctly. Reason: Error in store configuration: Unexpected error while running command.
Command: None
Exit code: -
Stdout: "Unexpected error while running command.\nCommand: collie\nExit code: 127\nStdout: ''\nStderr: '/bin/sh: 1: collie: not found\\n'"
Stderr: None Disabling add method.
2014-04-17 14:14:06.127 1059 WARNING glance.store [-] Deprecated: glance.store.sheepdog.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-04-17 14:14:06.137 1059 WARNING glance.store [-] Deprecated: glance.store.rbd.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-04-17 14:14:06.140 1059 WARNING glance.store.base [-] Failed to configure store correctly: Store gridfs could not be configured correctly. Reason: Missing dependencies: pymongo Disabling add method.
2014-04-17 14:14:06.143 1059 WARNING glance.store [-] Deprecated: glance.store.gridfs.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-04-17 14:14:07.093 1059 WARNING glance.store.base [-] Failed to configure store correctly: Store cinder could not be configured correctly. Reason: Cinder storage requires a context. Disabling add method.
2014-04-17 14:14:07.094 1059 WARNING glance.store [-] Deprecated: glance.store.cinder.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-04-17 14:14:07.096 1059 ERROR glance.store.filesystem [-] Permission to write in /var/lib/glance/images/ denied
2014-04-17 14:14:07.096 1059 TRACE glance.store.filesystem None
2014-04-17 14:14:07.096 1059 TRACE glance.store.filesystem
2014-04-17 14:14:07.097 1059 WARNING glance.store.base [-] Failed to configure store correctly: Store filesystem could not be configured correctly. Reason: Permission to write in /var/lib/glance/images/ denied Disabling add method.
2014-04-17 14:14:07.130 1059 WARNING glance.store [-] Deprecated: glance.store.swift.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-04-17 14:14:07.944 1059 WARNING glance.store [-] Deprecated: glance.store.vmware_datastore.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-04-17 14:14:07.953 1059 WARNING glance.store [-] Deprecated: glance.store.s3.Store not found in `known_store`. Stores need to be explicitly enabled in the configuration file.
2014-04-17 14:14:07.980 1059 ERROR glance.store.filesystem [43842698-7841-4aad-9406-ce78c37e...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.