container-updater can't suppress accounts with whitespace in name

Bug #2040332 reported by Tim Burke
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
New
Undecided
Unassigned

Bug Description

The container-updater has a unique account-suppression feature: if it cannot successfully update a quorum of account replicas, it will attempt to suppress further updates to that account for some period of time. Within a single worker handling a single part, this is easy enough. To share state between workers, though, we create a temporary files per-worker [0] which we write to as failures occur [1], and then read back in the manager process [2].

The serialization format is very simple: write out a line like "<account> <next allowed update time>". However, accounts (like all virtual paths in Swift) can contain not just spaces but newlines as well; if such an account is suppressed, it may lead to ValueErrors during unpacking or even cause us to suppress the wrong account.

[0] https://github.com/openstack/swift/blob/2.32.0/swift/container/updater.py#L154-L165
[1] https://github.com/openstack/swift/blob/2.32.0/swift/container/updater.py#L304-L306
[2] https://github.com/openstack/swift/blob/2.32.0/swift/container/updater.py#L117-L128

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.