s3api storage_domain list should be sorted longest to shortest
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
In Progress
|
Undecided
|
Unassigned |
Bug Description
If you have multiple storage domains configured and one is a subdomain of another, you get different behavior depending on the order in which you configure them. For example, with
storage_domain = user1.cluster.
things will work reasonably well (aside from the fact that other users won't be able to access buckets named "user1" with bucket-in-host addressing), but
storage_domain = cluster.domain, user1.cluster.
*won't* work well -- when a request comes in for "bucket.
This is because we currently track the list of domains in the order configured by the user, then iterate through them until we find one that's a suffix of the requested domain. If we instead sort them from longest to shortest when loading the config, we'll have more consistent behavior that generally works better.
Fix proposed to branch: master /review. opendev. org/c/openstack /swift/ +/898679
Review: https:/