Hi Kirubakaran,

There is no need for your patch, you just need to edit your s3cfg config
file and modify the following 2 keys:
host_base
host_bucket
In both of them, your will have to remove the "%(bucket)" tag, and then
s3cmd will use the "path based" format that works right with swift3.
I'm used to work with a swift3 based service and it works ok.
But take note that swift3 will still has some annoying limitations.

Regards,
--
Florent

On Mon, Jan 25, 2016 at 1:46 PM, Kirubakaran Kaliannan <
kiru...@zadarastorage.com> wrote:

>
>
> Hi ,
>
>
>
> Openstack object store (SWIFT) has the swift3 middleware to provide S3
> compatible API’s.
>
>
>
> But, S3cmd is failing to work on the openstack as the URI (format_uri())
> is not formed correctly.
>
>
>
> Do we have plan to support open-stack ? Following are the code change, we
> have made to get this working. (similar fix is done on another github
> branch forked out of this)
>
>
>
> Please let me know if this support is in the roadmap of s3cmd development
> ?
>
>
>
>
>
> *diff --git a/s3cmd/s3cmd/S3/Config.py b/s3cmd/s3cmd/S3/Config.py*
>
> *index 82aa809..13bd44d 100644*
>
> *--- a/s3cmd/s3cmd/S3/Config.py*
>
> *+++ b/s3cmd/s3cmd/S3/Config.py*
>
> *@@ -46,6 +46,9 @@ class Config(object):*
>
> *     acl_public = None*
>
> *     acl_grants = []*
>
> *     acl_revokes = []*
>
> *+    swift_compatible = False*
>
> *     proxy_host = ""*
>
> *     proxy_port = 3128*
>
> *     encrypt = False*
>
> *diff --git a/s3cmd/s3cmd/S3/S3.py b/s3cmd/s3cmd/S3/S3.py*
>
> *index cd4a404..ead1c4e 100644*
>
> *--- a/s3cmd/s3cmd/S3/S3.py*
>
> *+++ b/s3cmd/s3cmd/S3/S3.py*
>
> *@@ -209,8 +209,14 @@ class S3(object):*
>
> *     def format_uri(self, resource):*
>
> *         if resource['bucket'] and not
> check_bucket_name_dns_conformity(resource['bucket']):*
>
> *             uri = "/%s%s" % (resource['bucket'], resource['uri'])*
>
> *         else:*
>
> *-            uri = resource['uri']*
>
> *+            if self.config.swift_compatible and resource['bucket']:*
>
> *+                uri = "/%s%s" % (resource['bucket'], resource['uri'])*
>
> *+            else:*
>
> *+                uri = resource['uri']*
>
> *+        debug('uri = %s/%s' %(uri, self.config.swift_compatible))*
>
> *         if self.config.proxy_host != "":*
>
> *             uri = "http://%s%s"; %
> (self.get_hostname(resource['bucket']), uri)*
>
> *         debug('format_uri(): ' + uri)*
>
>
>
> Thanks
>
> -kiru
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__pubads.g.doubleclick.net_gampad_clk-3Fid-3D267308311-26iu-3D_4140&d=CwICAg&c=IGDlg0lD0b-nebmJJ0Kp8A&r=GEhQqSrCDlzPsOu9ww_S8dL0RpfPwWzg7DpciZD7d7Y&m=_ruIdFaqeQO6oeGokQKi6VrWNRLlglQGxwoQWoMGIMo&s=wMXnxK3-1bRSpDSJXDPTHUnCAkdkgbkPnVq3n3URYSs&e=
> _______________________________________________
> S3tools-general mailing list
> S3tools-general@lists.sourceforge.net
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_s3tools-2Dgeneral&d=CwICAg&c=IGDlg0lD0b-nebmJJ0Kp8A&r=GEhQqSrCDlzPsOu9ww_S8dL0RpfPwWzg7DpciZD7d7Y&m=_ruIdFaqeQO6oeGokQKi6VrWNRLlglQGxwoQWoMGIMo&s=rKVfHl2ktjsbx8EL0OTuQ_KmoGdbO77BeiMCjesiSrE&e=
>
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
S3tools-general mailing list
S3tools-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/s3tools-general

Reply via email to