bloomberg/chef-bcpc — pull request #137 by dspadea (2014-05-29 01:31:07+00:00)
Title: Add wildcard to s3 dns for bucket subdomain resolution.

Amazon's S3 exposes bucket names as subdomains of the s3 service name, of the form bucketname.s3.amazon.com. S3 then serves the contents of that bucket from the root of that virtual host.

The first step in allowing our S3 gateway to do that is to allow DNS wildcarding for subdomains of the s3 record. This pull request does that. It does *not* make the ceph changes required. While the addition is harmless and makes no change to existing functionality, I understand if you want this to pend until the ceph component is ready.

From a Cirros host on a VM cluster (I changed resolv.conf to point to the vip):

$ nslookup foo.bar.s3.bcpc.example.com
Server: 10.0.100.5
Address 1: 10.0.100.5

Name: foo.bar.s3.bcpc.example.com
Address 1: 192.168.100.5 s3.bcpc.example.com

$ nslookup s3.bcpc.example.com
Server: 10.0.100.5
Address 1: 10.0.100.5

Name: s3.bcpc.example.com
Address 1: 192.168.100.5 s3.bcpc.example.com

$ nslookup baz.s3.bcpc.example.com
Server: 10.0.100.5
Address 1: 10.0.100.5

Name: baz.s3.bcpc.example.com
Address 1: 192.168.100.5 s3.bcpc.example.com