Public bug reported: 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. ** Affects: horizon Importance: Undecided Status: New -- 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): New 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

