[horizon] Attempt to upload image via ftp makes queued image

Bug #1459633 reported by Kyrylo Romanenko
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
Timur Sufiev
7.0.x
Won't Fix
Medium
Vlad Okhrimenko
8.0.x
Fix Released
High
Timur Sufiev

Bug Description

Attempt to upload image via ftp creates queued image.

Steps:
1. Login to Horizon.
2. Go to Images tab.
3 .Click Create Image.
4. Specify Name and type FTP location instead of HTTP.

Actual:
Image with permanent "queued" status is created.

Expected to get some warning about unsupported protocol.
For example glance CLI does not allow to upload via FTP and warns user by words:
"400 Bad Request
...
External source are not supported"

Juno on Ubuntu 14.04.1
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "6.1"
  openstack_version: "2014.2.2-6.1"
  api: "1.0"
  build_number: "471"
  build_id: "2015-05-26_20-59-56"
  nailgun_sha: "f737675091bd1903aace0e36812e855ce47dfec7"
  python-fuelclient_sha: "e19f1b65792f84c4a18b5a9473f85ef3ba172fce"
  astute_sha: "0bd72c72369e743376864e8e8dabfe873d40450a"
  fuel-library_sha: "8cfeca1a86179ebed1e4e03b2133b49c27350f6f"
  fuel-ostf_sha: "87819878bc0ca572900e1f6933d9b99e666d6f62"
  fuelmain_sha: "13b3e9cf074ba1cf1ae06509c55fbab613c73f4e"

Changed in mos:
milestone: none → 7.0
importance: Undecided → Medium
assignee: nobody → MOS Glance (mos-glance)
tags: added: glance horizon
Changed in mos:
assignee: MOS Glance (mos-glance) → nobody
assignee: nobody → MOS Horizon (mos-horizon)
Changed in mos:
status: New → Confirmed
Changed in mos:
assignee: MOS Horizon (mos-horizon) → Vlad Okhrimenko (vokhrimenko)
Timur Sufiev (tsufiev-x)
Changed in mos:
status: Confirmed → Triaged
Changed in mos:
status: Triaged → In Progress
Revision history for this message
Vlad Okhrimenko (vokhrimenko) wrote :
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Moving to 8.0 because the fix requires a change in Glance API which is already too late for 7.0.

Changed in mos:
status: In Progress → Triaged
milestone: 7.0 → 8.0
assignee: Vlad Okhrimenko (vokhrimenko) → MOS Horizon (mos-horizon)
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Raising severity on a request from Support.

tags: added: customer-found enhancement support
Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

Are FTP URIs supported by Glance at all? (I assume, that Horizon just bypasses URIs to Glance directly and does not download images itself)

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

@Roman, no, they are not supported by Glance. We're currently discussing with Mike Fedosin the possibility of keeping a shared setting between Glance and Horizon (by means of Fuel) which enlists all URI schemas supported by Glance - so Horizon could validate the URI using Django form validation.

Revision history for this message
Mike Fedosin (mfedosin) wrote :

Glance doesn't support upload images from ftp. I discussed creation of ftp driver to glance_store on last summit, but they told me that "ftp is the last century" and they don't want to implement it.

As a temporary solution this one is optimal https://review.openstack.org/#/c/204105/ i.e. upload images from external source only by http/https. Anyway Glance doesn't support any other external resources (like ftp) and Swift or Ceph are normally used as internal storages.

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Ok, if limiting to http/https is enough on Horizon side, then we already have this feature flown from within upstream liberty, see https://review.fuel-infra.org/gitweb?p=openstack/horizon.git;a=commit;h=0f78517b60ae1c3ccaf16339c1c96c6d49ddaad2

Closing the bug as Fix Committed.

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

For anyone backporting this fix to earlier versions of MOS, I'd recommend checking https://review.openstack.org/#/c/204105/ since the commit https://review.fuel-infra.org/gitweb?p=openstack/horizon.git;a=commit;h=0f78517b60ae1c3ccaf16339c1c96c6d49ddaad2 relies on a presence of Django 1.7, which may not be true for earlier distributions.

Alexey Galkin (agalkin)
tags: added: on-verification
Revision history for this message
Alexey Galkin (agalkin) wrote :

Verified on

VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  openstack_version: "2015.1.0-8.0"
  api: "1.0"
  build_number: "183"
  build_id: "183"
  fuel-nailgun_sha: "7d7366c2ec9b46e4ac90d9c6d3c9e7b87e40ac14"
  python-fuelclient_sha: "e685d68c1c0d0fa0491a250f07d9c3a8d0f9608c"
  fuel-agent_sha: "6f3026d8c8e0927ee8fdf9d3171d506674cc7130"
  fuel-nailgun-agent_sha: "16f5c1a1575a6b482f5159dd2e4b255c03167a7e"
  astute_sha: "c8400f51b0b92254da206de55ef89d17fdf35393"
  fuel-library_sha: "d4f9d24cc2555945aac66c668f5927da46ef278c"
  fuel-ostf_sha: "c2e1fa0ca859c163a7ff445a70f1264d6be0893b"
  fuel-createmirror_sha: "994fed9b1ed889718b61a59733275c08c2dd4c64"
  fuelmenu_sha: "d12061b1aee82f81b3d074de74ea27a6e962a686"
  shotgun_sha: "c377d163519f6d10b69a654019d6086ba5f14edc"
  network-checker_sha: "a57e1d69acb5e765eb22cab0251c589cd76f51da"
  fuel-upgrade_sha: "1e894e26d4e1423a9b0d66abd6a79505f4175ff6"
  fuelmain_sha: "cd084cf5c4372a46184fb7c2f24568da4e030be2"

Alexey Galkin (agalkin)
tags: removed: on-verification
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

RRufanov, please use comment 6 as a guide when backporting the fix to MOS 6.1.

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Sorry, I meant comment#8

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

Release notes:

Horizon now only allows HTTP/HTTPS URLs in the "Upload Image" form. Previously it was possible to pass an image URL with a different unsupported schema (e.g. FTP) and that would silently fail later in Glance.

tags: added: release-notes
tags: added: 8.0 release-notes-done
removed: release-notes
tags: added: wontfix-workaround
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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