Reviewed: https://review.openstack.org/487592 Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=09a2afef35a2428ed7a551a3f16247e815fbabbd Submitter: Jenkins Branch: master
commit 09a2afef35a2428ed7a551a3f16247e815fbabbd Author: Pascal Boutin <[email protected]> Date: Wed Jul 26 17:15:29 2017 -0400 Fix the error format of glance's createImage Uppon failure, the createImage function returned a raw xhr error that was incompatible with the wizard modal, making it display the [Object object] error. This change makes it so a generic error message is thrown directly if it's not an handled glance error, so it could be shown on top of the wizard modal. Change-Id: I637bf1002630fe21f5ad20a7a047ec65ebc052dc Closes-bug: #1703708 ** Changed in: horizon Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Dashboard (Horizon). https://bugs.launchpad.net/bugs/1703708 Title: Horizon image upload with bad Glance CORS config fails with "[object Object]" Status in OpenStack Dashboard (Horizon): Fix Released Bug description: How to reproduce: Configure Horizon to use direct upload mode: HORIZON_IMAGES_UPLOAD_MODE=direct In glance-api.conf, make sure cors is enabled but configured badly with a bogus origin: [cors] allowed_origin = https://foobar Try uploading an image from Horizon. This should fail with this error in the console: XMLHttpRequest cannot load https://glance.example.org/v2/images/XXXX/file. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow- Origin' header is present on the requested resource. Origin 'https://foobar' is therefore not allowed access. And Horizon will show this error at the top of the image creation popup: [object Object] Expected result: The error message shown should not be the one mentioned above, it's not user friendly. It can be a generic one like "Unable to create the image." or specific one if we want to inform the user that the provider improperly configured cors support in Glance. To manage notifications about this bug go to: https://bugs.launchpad.net/horizon/+bug/1703708/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

