mount check is racy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
New
|
Undecided
|
Unassigned |
Bug Description
This is annoying and it keeps coming up [1, 2, 3]
#1 we need to document that the swift user should not have *permission* to create directories *in* /srv/node - only the directories *after* /srv/node/dX should the swift user be allowed to create directories. This mostly fixes the problem of filling up root partitions.
#2 to support fast 507 behavior with mount_check = false we need only to plumb the is_dir check from account & container servers like we already do for object-servers - then a broken system link or missing directory can easily stand in for "unmounted" on all services when not using a real mounted device.
https:/
#3 this one is harder, but we could *also* try to be more careful when we create partdirs in diskfile:
... and with atomic renamer:
... and rsync:
https:/
http://
... or just don't use rsync
If all of those places (and the ones I'm missing/forgetting) were codified to blow up when /srv/node/dX doesn't exist (instead of creating it with a blind mkdirs -p) we would never write to a root filesystem again.
1. lp bug #1470576 (best discussion from pete & sam)
2. lp bug #1014545 (add another "smattering" of checks)
3. https:/
Changed in swift: | |
assignee: | nobody → Yuxin Wang (chhyx2008) |
assignee: | Yuxin Wang (chhyx2008) → nobody |
Reviewed: https:/ /review. openstack. org/458070 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=163fb4d52a8 5e0467c8c6b616e 2cd9faa1faa41b
Committed: https:/
Submitter: Jenkins
Branch: master
commit 163fb4d52a85e04 67c8c6b616e2cd9 faa1faa41b
Author: Pavel Kvasnička <email address hidden>
Date: Wed Apr 19 15:09:40 2017 +0200
Always require device dir for containers
For test purposes (e.g. saio probetests) even if mount_check is False,
still require check_dir for account/container server storage when real
mount points are not used.
This behavior is consistent with the object-server's checks in diskfile.
Co-Author: Clay Gerrard <email address hidden> Change- Id: I344f9daaa038c6 946be11e1cf8c4e f104a09e68b 7e613ba243da5a4 d94e5adedf2 16bb367b4b6b322 bb41ae08764
Related lp bug #1693005
Related-
Depends-On: I52c4ecb70b1ae4
Change-Id: I3362a6ebff4230