swift-related code needs refactoring

Bug #1521197 reported by Pavlo Shchelokovskyy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Triaged
Wishlist
Unassigned

Bug Description

currently 3 places in Ironic use swift-related actions:
- ilo drivers uses SwiftAPI object from common/swift.py for virtual media boot
- conductor manager uses SwiftAPI object to store configdrive
- glance_service that creates temp_urls for glance images stored in Swift and _does not use_ SwiftAPI object

It would be beneficial to centralize Swift-related code in common/swift.py.

Moreover, we could reduce entanglement between service configs and do not need to have the "swift_temp_url_key" set in both swift's and Ironic's configs (that is used only for glance image_service), as Ironic can discover it from account headers when using proper swiftclient instead of functions from swift_utils, same as ILO drivers are doing already.

Tags: refactoring
tags: added: refactoring
Dmitry Tantsur (divius)
Changed in ironic:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/352289

Changed in ironic:
assignee: nobody → gzholtkevych (gzholtkevych)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to ironic (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/368782

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by Galyna Zholtkevych (<email address hidden>) on branch: master
Review: https://review.openstack.org/368782
Reason: not needed as soon as it tested alone

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Galyna Zholtkevych (<email address hidden>) on branch: master
Review: https://review.openstack.org/352289
Reason: since this patch is split into two logically indepependent paths

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Vladyslav Drok (<email address hidden>) on branch: master
Review: https://review.openstack.org/410767
Reason: Pavlo's patches take care of this, it can be abandoned.

Revision history for this message
Vladyslav Drok (vdrok) wrote :

There is only one patch left on review, and it does not fix the problem described here. I'm setting the bug back to triaged and unassigning, as Galyna does not work on ironic anymore.

Changed in ironic:
status: In Progress → Triaged
assignee: Galyna Zholtkevych (gzholtkevych) → nobody
Revision history for this message
Pavlo Shchelokovskyy (pshchelo) wrote :

I'd say that this patch https://review.openstack.org/#/c/526429/ kind of solves most of the problems I intended to be solved when reporting this bug, at least the config options entanglement.

Refactoring for glance_service to use SwiftAPI can still be beneficial though.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Julia Kreger <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/ironic/+/410764

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.