swift-object-relinker does not handle unmounted disks well
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
If you followed best practices and made sure that root owns the mount point while your swift user owns the root of the filesystem that's usually mounted there, things aren't pretty but at least they're not misleading:
vagrant@
vagrant@
Relinking files for policy default under /srv/node2/
Traceback (most recent call last):
File "/usr/local/
exec(
File "/vagrant/
sys.
File "/vagrant/
return relink(
File "/vagrant/
for fname, _, _ in locations:
File "/vagrant/
hook_
File "/vagrant/
fd = os.open(lock_file, os.O_CREAT | os.O_WRONLY)
PermissionError: [Errno 13] Permission denied: '/srv/node2/
If you *didn't* do that, though (or you ran the relinker as root), there's no indication that there was a problem at all:
vagrant@
Relinking files for policy default under /srv/node2/
Relinked 0 diskfiles (0 errors)
We don't even log the "Skipping ..." message (https:/
Much better would be to log the message and exit with a status of 2 (like we do with other warnings).
Changed in swift: | |
status: | New → Fix Committed |
This issue was fixed in the openstack/swift 2.27.0 release.