{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/23007","labels_url":"https://api.github.com/repos/saltstack/salt/issues/23007/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/23007/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/23007/events","html_url":"https://github.com/saltstack/salt/issues/23007","id":70560248,"number":23007,"title":"Configure and read/write to Swift/S3 buckets","user":{"login":"renoirb","id":296940,"avatar_url":"https://avatars.githubusercontent.com/u/296940?v=3","gravatar_id":"","url":"https://api.github.com/users/renoirb","html_url":"https://github.com/renoirb","followers_url":"https://api.github.com/users/renoirb/followers","following_url":"https://api.github.com/users/renoirb/following{/other_user}","gists_url":"https://api.github.com/users/renoirb/gists{/gist_id}","starred_url":"https://api.github.com/users/renoirb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renoirb/subscriptions","organizations_url":"https://api.github.com/users/renoirb/orgs","repos_url":"https://api.github.com/users/renoirb/repos","events_url":"https://api.github.com/users/renoirb/events{/privacy}","received_events_url":"https://api.github.com/users/renoirb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P1","name":"P1","color":"2181ee"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Salt-Cloud","name":"Salt-Cloud","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars.githubusercontent.com/u/507599?v=3","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":2149,"closed_issues":1864,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2015-04-24T19:22:11Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-04-24T01:47:01Z","updated_at":"2015-04-24T19:22:49Z","closed_at":null,"body":"Hi all,\r\n\r\nI’ve been wondering how to configure salt to read/write files to a S3 nor Swift object store.\r\n\r\nEnvironment details:\r\n1. I’m not running on Amazon\r\n2. Ubuntu 14.04 LTS, w/ salt 2014.7.4\r\n3. I only have access to endpoint, key, secrets\r\n4. key is either in S3 or Swift format\r\n\r\n[Documentation][1] is unclear —and the source [doesn’t help][2] [either][3]— on how I can configure and use. All we are left is with trials and errors and half successes.\r\n\r\nSo far, I could get info from files on a bucket, but not download it. \r\n\r\nHere’s latest successful config:\r\n\r\n```yaml\r\n# file: /etc/salt/minion.d/s3.conf\r\ns3.keyid: bbbbbbbbbbbbbbbbbbar\r\ns3.key: ffffffffffffffffffffffffffffffffff-00000\r\ns3.service_url: objects.dreamhost.com\r\n```\r\n\r\nI tried many variants with no complete success\r\n\r\n```\r\nroot@salt:/home/renoirb# salt-call s3.head apt php5-memcached_2.2.0-wpd_amd64.deb\r\n[INFO    ] Starting new HTTPS connection (1): apt.objects.dreamhost.com\r\nlocal:\r\n    ----------\r\n    headers:\r\n        - content-length\r\n        - accept-ranges\r\n        - server\r\n        - last-modified\r\n        - etag\r\n        - x-pad\r\n        - date\r\n        - content-type\r\n        - x-amz-meta-mtime\r\n````\r\n\r\nAnd when I try to get a file from the bucket, it throws a \"not well-formed\" exception.\r\n\r\n```\r\nroot@salt:/home/renoirb# salt-call s3.get apt php5-memcached_2.2.0-wpd_amd64.deb\r\n[INFO    ] Starting new HTTPS connection (1): apt.objects.dreamhost.com\r\n[ERROR   ] An un-handled exception was caught by salt's global exception handler:\r\nParseError: not well-formed (invalid token): line 1, column 0\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/salt-call\", line 11, in <module>\r\n    salt_call()\r\n  File \"/usr/lib/python2.7/dist-packages/salt/scripts.py\", line 123, in salt_call\r\n    client.run()\r\n  File \"/usr/lib/python2.7/dist-packages/salt/cli/__init__.py\", line 422, in run\r\n    caller.run()\r\n  File \"/usr/lib/python2.7/dist-packages/salt/cli/caller.py\", line 227, in run\r\n    ret = self.call()\r\n  File \"/usr/lib/python2.7/dist-packages/salt/cli/caller.py\", line 129, in call\r\n    ret['return'] = func(*args, **kwargs)\r\n  File \"/usr/lib/python2.7/dist-packages/salt/modules/s3.py\", line 154, in get\r\n    verify_ssl=verify_ssl)\r\n  File \"/usr/lib/python2.7/dist-packages/salt/utils/s3.py\", line 212, in query\r\n    items = ET.fromstring(response)\r\n  File \"<string>\", line 124, in XML\r\nParseError: not well-formed (invalid token): line 1, column 0\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/salt-call\", line 11, in <module>\r\n    salt_call()\r\n  File \"/usr/lib/python2.7/dist-packages/salt/scripts.py\", line 123, in salt_call\r\n    client.run()\r\n  File \"/usr/lib/python2.7/dist-packages/salt/cli/__init__.py\", line 422, in run\r\n    caller.run()\r\n  File \"/usr/lib/python2.7/dist-packages/salt/cli/caller.py\", line 227, in run\r\n    ret = self.call()\r\n  File \"/usr/lib/python2.7/dist-packages/salt/cli/caller.py\", line 129, in call\r\n    ret['return'] = func(*args, **kwargs)\r\n  File \"/usr/lib/python2.7/dist-packages/salt/modules/s3.py\", line 154, in get\r\n    verify_ssl=verify_ssl)\r\n  File \"/usr/lib/python2.7/dist-packages/salt/utils/s3.py\", line 212, in query\r\n    items = ET.fromstring(response)\r\n  File \"<string>\", line 124, in XML\r\ncElementTree.ParseError: not well-formed (invalid token): line 1, column 0\r\n```\r\n\r\n\r\nIdeas, recommendations, what am I missing?\r\n\r\nThanks!\r\n\r\n  [1]: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.swift.html#module-salt.modules.swift\r\n  [2]: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.s3.html\r\n  [3]: https://github.com/saltstack/salt/blob/2014.7/salt/modules/s3.py"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/96041043","html_url":"https://github.com/saltstack/salt/issues/23007#issuecomment-96041043","issue_url":"https://api.github.com/repos/saltstack/salt/issues/23007","id":96041043,"user":{"login":"jfindlay","id":702905,"avatar_url":"https://avatars.githubusercontent.com/u/702905?v=3","gravatar_id":"","url":"https://api.github.com/users/jfindlay","html_url":"https://github.com/jfindlay","followers_url":"https://api.github.com/users/jfindlay/followers","following_url":"https://api.github.com/users/jfindlay/following{/other_user}","gists_url":"https://api.github.com/users/jfindlay/gists{/gist_id}","starred_url":"https://api.github.com/users/jfindlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfindlay/subscriptions","organizations_url":"https://api.github.com/users/jfindlay/orgs","repos_url":"https://api.github.com/users/jfindlay/repos","events_url":"https://api.github.com/users/jfindlay/events{/privacy}","received_events_url":"https://api.github.com/users/jfindlay/received_events","type":"User","site_admin":false},"created_at":"2015-04-24T19:22:49Z","updated_at":"2015-04-24T19:22:49Z","body":"@renoirb, thanks for the report."}}