Error in --cf-invalidate #8

Open
cyno opened this Issue Oct 17, 2011 · 4 comments

Projects

None yet

4 participants

@cyno
cyno commented Oct 17, 2011

I get the following error using --cf-invalidate with the current s3cmd code :

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
An unexpected error has occurred.
Please report the following lines to:
s3tools-bugs@lists.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Problem: KeyError: 'S3Origin'
S3cmd: 1.1.0-beta1

Traceback (most recent call last):
File "/usr/bin/s3cmd-beta", line 1790, in
main()
File "/usr/bin/s3cmd-beta", line 1732, in main
cmd_func(args)
File "/usr/bin/s3cmd-beta", line 965, in cmd_sync
return cmd_sync_local2remote(args)
File "/usr/bin/s3cmd-beta", line 955, in cmd_sync_local2remote
result = cf.InvalidateObjects(uri, uploaded_objects_list)
File "/usr/share/s3cmd-beta/S3/CloudFront.py", line 428, in InvalidateObjects
cfuri = self.get_dist_name_for_bucket(uri)
File "/usr/share/s3cmd-beta/S3/CloudFront.py", line 556, in get_dist_name_for_bucket
CloudFront.dist_list[getBucketFromHostname(d.info['S3Origin']['DNSName'])[0]] = d.uri()
KeyError: 'S3Origin'

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
An unexpected error has occurred.
Please report the above lines to:
s3tools-bugs@lists.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

@mludvig
Collaborator
mludvig commented Oct 17, 2011

That's interesting. Can you run it with --debug and send me the output?

Thanks!

Michal

On 10/18/2011 04:37 AM, Nicolas Cynober wrote:

I get the following error using --cf-invalidate with the current s3cmd code :

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
An unexpected error has occurred.
Please report the following lines to:
s3tools-bugs@lists.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Problem: KeyError: 'S3Origin'
S3cmd: 1.1.0-beta1

Traceback (most recent call last):
File "/usr/bin/s3cmd-beta", line 1790, in
main()
File "/usr/bin/s3cmd-beta", line 1732, in main
cmd_func(args)
File "/usr/bin/s3cmd-beta", line 965, in cmd_sync
return cmd_sync_local2remote(args)
File "/usr/bin/s3cmd-beta", line 955, in cmd_sync_local2remote
result = cf.InvalidateObjects(uri, uploaded_objects_list)
File "/usr/share/s3cmd-beta/S3/CloudFront.py", line 428, in InvalidateObjects
cfuri = self.get_dist_name_for_bucket(uri)
File "/usr/share/s3cmd-beta/S3/CloudFront.py", line 556, in get_dist_name_for_bucket
CloudFront.dist_list[getBucketFromHostname(d.info['S3Origin']['DNSName'])[0]] = d.uri()
KeyError: 'S3Origin'

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
An unexpected error has occurred.
Please report the above lines to:
s3tools-bugs@lists.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

@mdomsch
Member
mdomsch commented Mar 9, 2013

@cyno can you test with 1.5.0-alphaX (or current git HEAD on master branch) and update or close this issue? This code path has had significant change since you filed this bug.

Thanks,
Matt

@unbrice
unbrice commented Aug 6, 2014

I just reproduced it with the current version:

DEBUG: Unicodising '/Users/unbrice/bin/.homebrew/bin/s3cmd' using UTF-8
DEBUG: Unicodising 'cfmodify' using UTF-8
DEBUG: Unicodising 'cf://E2MC6I0SFSDYRQ' using UTF-8
DEBUG: Unicodising '--debug' using UTF-8
Invoked as: /Users/unbrice/bin/.homebrew/bin/s3cmd cfmodify cf://E2MC6I0SFSDYRQ --debug
Problem: KeyError: 'S3Origin'
S3cmd: 1.5.0-rc1
python: 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]
environment LANG=en_IE.UTF-8

Traceback (most recent call last):
File "/Users/unbrice/bin/.homebrew/bin/s3cmd", line 2523, in
rc = main()
File "/Users/unbrice/bin/.homebrew/bin/s3cmd", line 2441, in main
rc = cmd_func(args)
File "/Users/unbrice/bin/.homebrew/Cellar/s3cmd/1.5.0-rc1/libexec/S3/CloudFront.py", line 733, in modify
default_root_object = Cmd.options.cf_default_root_object)
File "/Users/unbrice/bin/.homebrew/Cellar/s3cmd/1.5.0-rc1/libexec/S3/CloudFront.py", line 373, in ModifyDistribution
response = self.SetDistConfig(cfuri, dc, response['headers']['etag'])
File "/Users/unbrice/bin/.homebrew/Cellar/s3cmd/1.5.0-rc1/libexec/S3/CloudFront.py", line 422, in SetDistConfig
request_body = str(dist_config)
File "/Users/unbrice/bin/.homebrew/Cellar/s3cmd/1.5.0-rc1/libexec/S3/CloudFront.py", line 180, in str
appendXmlTextNode("DNSName", self.info['S3Origin']['DNSName'], s3org)
KeyError: 'S3Origin'

@unbrice
unbrice commented Aug 6, 2014

It seems there is a patch here http://sourceforge.net/p/s3tools/bugs/119/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment