Swift file upload fails on zed with "This name already exists." for non-existing files

Bug #1993005 reported by Corey Bryant
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
Unassigned
horizon (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Swift file upload fails on zed with "This name already exists." for non-existing files.

Please see attached screenshot for the behavior.

I've narrowed this down to a change in 'function getObjectDetails' in swift.service.js.

The 'Migrate to AngularJS v1.8.2' change in commit f044c4b0a3 updated the file with:

@@ -297,9 +297,9 @@
       );
       if (ignoreError) {
         // provide a noop error handler so the error is ignored
- return promise.error(angular.noop);
+ return promise.catch(angular.noop);
       }
- return promise.error(function () {
+ return promise.catch(function onError() {
         toastService.add('error', gettext('Unable to get details of the object.'));
       });
     }

If I revert these 2 lines of code, I'm able to upload a file again without the error, however I'm also able to upload it twice and overwrite the existing file the 2nd time.

Update: Specifically reverting the first LOC to the following seems to fix this:

return promise.error(angular.noop);

Changed in horizon (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Corey Bryant (corey.bryant) wrote :
description: updated
description: updated
Changed in horizon (Ubuntu):
importance: High → Medium
Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :
Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/874351
Committed: https://opendev.org/openstack/horizon/commit/a327842a25f904397be0c3c141ada1f9ac8050cd
Submitter: "Zuul (22348)"
Branch: master

commit a327842a25f904397be0c3c141ada1f9ac8050cd
Author: Mohammed Naser <email address hidden>
Date: Sun Feb 19 18:47:11 2023 +0000

    fix(swift): allow object creation

    It is currently not possible to create any new objects inside
    Swift as you'd always get an error that the new object name
    already exists all the time.

    This fixes that issue and enables you to upload files again.

    Closes-Bug: #1993005
    Related-Change-Id: Idfb90a327e94ccaa3263aaaad1d6d52fa46312f4
    Change-Id: Ib2f1aaae87820e8d5c4a6c9b01b6a6e9a5552952

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/horizon/+/878436

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/zed)

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/horizon/+/878437

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package horizon - 4:23.1.0-0ubuntu1

---------------
horizon (4:23.1.0-0ubuntu1) lunar; urgency=medium

  * New upstream release for OpenStack Antelope.
  * Refresh xstatic assets.
  * d/control: Align (Build-)Depends with upstream.
  * d/p/fix-swift-allow-object-creation.patch: Cherry-picked from
    upstream to fix swift uploads (LP: #1993005).

 -- Corey Bryant <email address hidden> Fri, 24 Mar 2023 08:28:10 -0400

Changed in horizon (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/878436
Committed: https://opendev.org/openstack/horizon/commit/858d4790cfc6cc3d6155e960ef4f7cae3c87bd73
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 858d4790cfc6cc3d6155e960ef4f7cae3c87bd73
Author: Mohammed Naser <email address hidden>
Date: Sun Feb 19 18:47:11 2023 +0000

    fix(swift): allow object creation

    It is currently not possible to create any new objects inside
    Swift as you'd always get an error that the new object name
    already exists all the time.

    This fixes that issue and enables you to upload files again.

    Closes-Bug: #1993005
    Related-Change-Id: Idfb90a327e94ccaa3263aaaad1d6d52fa46312f4
    Change-Id: Ib2f1aaae87820e8d5c4a6c9b01b6a6e9a5552952
    (cherry picked from commit a327842a25f904397be0c3c141ada1f9ac8050cd)

Revision history for this message
himanshubhatt (vincentiohimanshu) wrote :

i have been chnaged in files
1. openstack_dashboard/static/app/core/openstack-service-api/swift.service.js

2. openstack_dashboard/static/app/core/openstack-service-api/swift.service.spec.js

but not work in my environment.

Revision history for this message
Istvan Magyar (zaraquer) wrote :

I'm also tried to add the changes to swift.service.js and swift.service.spec.js, but not for me either on zed.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/878437
Committed: https://opendev.org/openstack/horizon/commit/d4ff4f3c21cf260d5c96c999711f34893fbe46d9
Submitter: "Zuul (22348)"
Branch: stable/zed

commit d4ff4f3c21cf260d5c96c999711f34893fbe46d9
Author: Mohammed Naser <email address hidden>
Date: Sun Feb 19 18:47:11 2023 +0000

    fix(swift): allow object creation

    It is currently not possible to create any new objects inside
    Swift as you'd always get an error that the new object name
    already exists all the time.

    This fixes that issue and enables you to upload files again.

    Closes-Bug: #1993005
    Related-Change-Id: Idfb90a327e94ccaa3263aaaad1d6d52fa46312f4
    Change-Id: Ib2f1aaae87820e8d5c4a6c9b01b6a6e9a5552952
    (cherry picked from commit a327842a25f904397be0c3c141ada1f9ac8050cd)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 23.2.0

This issue was fixed in the openstack/horizon 23.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 23.0.1

This issue was fixed in the openstack/horizon 23.0.1 release.

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.