The backend driver should be reloaded after the pool is updated

Bug #1387441 reported by Jeffrey Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
In Progress
High
Feilong Wang

Bug Description

After updating the pool's option, the backend driver behind pool should be reload to take these new options.

Changed in zaqar:
status: New → Triaged
Changed in zaqar:
importance: Undecided → High
milestone: none → kilo-1
Changed in zaqar:
milestone: kilo-1 → kilo-2
Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

add a `last_modified` field to the pool, when update the pool, this field is updated.
Then when the catalog get the drivers[0]. Compare the the `last_modified` field with the value cached in the catalog.

* if they are equal, the do noting and use the cached driver.
* if they are not equal, then destroy the old one and init a new driver by using the lasted pool options.

Is this a good direction?

[0] https://github.com/openstack/zaqar/blob/master/zaqar/storage/pooling.py#L530

Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

Another question:
I notice that we are using sqlalchemy without any db migration tool. How can we add new fields in sqlalchemy? It is not very friendly to produce environment. Should we add the migration tools?

Changed in zaqar:
assignee: nobody → Jeffrey Zhang (jeffrey4l)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zaqar (master)

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

Changed in zaqar:
status: Triaged → In Progress
Changed in zaqar:
milestone: kilo-2 → kilo-3
Changed in zaqar:
milestone: kilo-3 → kilo-rc1
Changed in zaqar:
milestone: kilo-rc1 → liberty-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on zaqar (master)

Change abandoned by Jeffrey Zhang (<email address hidden>) on branch: master
Review: https://review.openstack.org/143857

Thierry Carrez (ttx)
Changed in zaqar:
milestone: liberty-1 → liberty-2
Changed in zaqar:
assignee: Jeffrey Zhang (jeffrey4l) → nobody
Feilong Wang (flwang)
Changed in zaqar:
assignee: nobody → Fei Long Wang (flwang)
Changed in zaqar:
milestone: liberty-2 → liberty-3
Changed in zaqar:
milestone: liberty-3 → liberty-rc1
Changed in zaqar:
milestone: liberty-rc1 → none
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.