Glance image-update makes html output to console

Bug #1456607 reported by Kyrylo Romanenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
Medium
MOS Glance

Bug Description

Glance image-update shows html output to console instead of plain text when i try to perform restricted operation.

Steps:
1) glance image-create --disk-format raw --container-format bare

2) glance image-update --location filesystem:///etc/passwd <IMAGE_ID>

ACTUAL output:
"<html>
 <head>
  <title>400 Bad Request</title>
 </head>
 <body>
  <h1>400 Bad Request</h1>
  External source are not supported: 'filesystem:///etc/passwd'<br /><br />

 </body>"

EXPECTED output:

"The administrator has disabled API access to image locations (HTTP 400)"

Environement:
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "6.1"
  openstack_version: "2014.2.2-6.1"
  api: "1.0"
  build_number: "432"
  build_id: "2015-05-18_03-43-53"
  nailgun_sha: "076566b5df37f681c3fd5b139c966d680d81e0a5"
  python-fuelclient_sha: "38765563e1a7f14f45201fd47cf507393ff5d673"
  astute_sha: "cb655a9a9ad26848bcd9d9ace91857b6f4a0ec15"
  fuel-library_sha: "1621cb350af744f497c35f2b3bb889c2041465d8"
  fuel-ostf_sha: "9ce1800749081780b8b2a4a7eab6586583ffaf33"
  fuelmain_sha: "0e970647a83d9a7d336c4cc253606d4dd0d59a60"

Deployment in VirtualBox. Ubuntu 14.04.1, Neutron VLAN, Cinder and Glance on LVM
1 Controller+Cinder
1 Compute+Cinder
1 Cinder

Tags: glance
tags: added: glance
Changed in mos:
importance: Undecided → Medium
assignee: nobody → MOS Glance (mos-glance)
milestone: none → 6.1
Changed in mos:
milestone: 6.1 → 7.0
Revision history for this message
Inessa Vasilevskaya (ivasilevskaya) wrote :

I've checked on fresh kilo devstack - the return value is in plain text form:

400 Bad Request: External sources are not supported: 'PATH_TO_FILE'
(HTTP 400)

Seems this bug is invalid for upstream glance.

Changed in mos:
status: New → Confirmed
Revision history for this message
Mike Fedosin (mfedosin) wrote :

Fixed in client 0.16.1 https://review.openstack.org/#/c/148387/ Merged in MOS 7.0

Changed in mos:
status: Confirmed → Fix Committed
Revision history for this message
Alexey Galkin (agalkin) wrote :

Verified on MOS 7.0 in ISO #228.

root@node-1:~# glance image-update --location filesystem:///etc/passwd 188ef910-3ebc-4d16-8698-bdff56c30980
400 Bad Request: External sources are not supported: 'filesystem:///etc/passwd' (HTTP 400)

Changed in mos:
status: Fix Committed → Fix Released
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.