swift-container-info should try harder on /tmp db

Bug #1691596 reported by clayg on 2017-05-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Wishlist
Ruslan Gustomyasov

Bug Description

swift-[container|account]-info seem to require that database files end with .db

https://github.com/openstack/swift/blob/6e893e228840bc42cfd13546245438832bc2bb46/swift/cli/info.py#L370

... but that's not really fair! the db_replicator will currently rsync into a /tmp path like:

/srv/node3/sdb3/tmp/aa054313-c0f4-492e-b13c-f1d19c4614b8

Where the name of the db file there is a uuid with no extension (the database "id")

https://github.com/openstack/swift/blob/6e893e228840bc42cfd13546245438832bc2bb46/swift/common/db_replicator.py#L292

Reminds me of lp bug #1425679

Looks like this:

ubuntu@saio:~$ swift-container-info /srv/node3/sdb3/tmp/aa054313-c0f4-492e-b13c-f1d19c4614b8
DB file doesn't exist

Should be easy enough to fix, but could use a test.

clayg (clay-gerrard) wrote :
Changed in swift:
importance: Undecided → Wishlist
tags: added: low-hanging-fruit
Changed in swift:
assignee: nobody → Ruslan Gustomyasov (rusik)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers