500 error returned while uploading image using multi filesystem store and 'filesystem_store_metadata_file' option enabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Triaged
|
High
|
Unassigned | ||
glance_store |
Fix Released
|
High
|
Abhijeet Malawade |
Bug Description
When we try to upload image with multi filesystem store enabled and 'filesystem_
(containing list of all directories configured for multi filesystem store) is provided
then glance throws 'HTTPInternalSe
- Glance Configuration:
1. /etc/glance/
[DEFAULT]
show_multiple_
filesystem_
[glance_store]
filesystem_
filesystem_
2. /etc/glance/
[
{
"id": "f0781415-
},
{
"id": "5d2dd1db-
}
]
3. 'df -ha' command result:
openstack@
Filesystem Size Used Avail Use% Mounted on
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
tmpfs 799M 600K 798M 1% /run
/dev/sda1 236M 41M 183M 19% /boot
nfsd 0 0 0 - /proc/fs/nfsd
10.69.4.
10.69.4.
openstack@
- Steps to reproduce:
1. Create image:
glance --os-image-
2. Upload image data:
openstack@
HTTPInternalSer
openstack@
- glance-api.log :
2014-12-11 22:16:59.586 3495 ERROR glance_
object at 0x7fa1b184e390> returned invalid metadata [{u'mountpoint': u'/opt/
8684-46bb-
2014-12-11 22:16:59.591 3495 ERROR glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
2014-12-11 22:16:59.591 3495 TRACE glance.
When we enable 'filesystem_
This data is then used by NOVA to directly copy image using 'cp' command. (when glance image directories are shared between nova-compute and glance)
For direct download in nova.conf we need to enable 'allowed_
Also nova needs 'id' and 'moutpoint' keys to be present in glance-image metadata for direct image copy.
If there is only one glance image directory (ie- one nfs mountpoint) then we do not get this '500 internal server error'.
But if there are multiple image data directories configured and in metadata JSON file we give list of dicts containing all
mountpoints then we get above error.
IMO we need to validate glance metadata JSON file (for 'id' and 'mountpoint' keys) before adding it as image-metadata and if there are multiple mountpoints (directories) configured for glance then we need to add appropriate metadata to glance-image instead of adding all image metadata which is provided in JSON file.
Changed in glance: | |
assignee: | nobody → Abhijeet Malawade (abhijeet-malawade) |
no longer affects: | glance |
Changed in glance-store: | |
status: | New → In Progress |
assignee: | nobody → Abhijeet Malawade (abhijeet-malawade) |
Changed in glance: | |
milestone: | none → kilo-2 |
status: | Fix Committed → Fix Released |
Changed in glance: | |
importance: | Undecided → High |
Changed in glance-store: | |
importance: | Undecided → High |
status: | In Progress → Fix Committed |
Changed in glance: | |
status: | Fix Released → Triaged |
milestone: | kilo-2 → none |
Changed in glance-store: | |
milestone: | none → v0.1.11 |
Changed in glance: | |
assignee: | nobody → jelly (coding1314) |
Changed in glance-store: | |
status: | Fix Committed → Fix Released |
Fix proposed to master branch : https:/ /review. openstack. org/#/c/ 141311/