Commit Graph

31 Commits

Author SHA1 Message Date
yissachar 5b03f36b27 Merge pull request #2125 from justinsb/issue_2108
More logging around errors in s3 write path
2017-03-20 01:15:27 -04:00
yissachar e873950633 Merge pull request #2113 from justinsb/vfs_path_validation_error
Fix error for invalid vfs paths
2017-03-18 21:36:26 -04:00
Justin Santa Barbara cb4641fea3 Code updates 2017-03-16 02:40:50 -04:00
Justin Santa Barbara 8104ba2cea More logging around errors in s3 write path
Hopefully to shed some light on issues like #2108
2017-03-15 09:52:32 -04:00
Justin Santa Barbara 32b9e1b5b1 Fix error for invalid vfs paths
We should be printing the path when it fails validation
2017-03-13 10:42:31 -04:00
Justin Santa Barbara 3d14d07616 Support cloud-config on GCE 2017-02-28 20:08:03 -05:00
Justin Santa Barbara 645f330dad Re-enable GCE support
We move everything to the models.  We feature-flag it, because we
probably want to change the names etc, and we aren't going to be able to
offer smooth upgrades until that is done.
2017-02-28 20:08:03 -05:00
Seth Pollack b1702d749e
validate region 2017-02-23 12:03:03 -05:00
Justin Santa Barbara 1e5dab5a6c Actually retry on HTTP 404s
We were returning the "don't retry" value (true).

Also tidy up the logic a little.
2017-02-05 13:17:09 -05:00
Justin Santa Barbara 34cd84f5a7 Merge pull request #1705 from tazjin/fix/s3-location-call-timeout
fix s3context: Attempt a normal S3 call before bruteforcing location
2017-01-30 20:44:03 -05:00
Vincent Ambo 8c85935f1f
fix s3context: Attempt a normal S3 call before bruteforcing location
In cases where the user is the bucket owner an initial call to
s3.GetBucketLocation will succeed. If it does return an error we
fall back to the bruteforce method.

This effectively makes the behaviour unchanged from previous versions
for bucket owners.
2017-01-30 08:01:39 +01:00
Justin Santa Barbara 45a62a02aa s3 path: apply suffix to ReadTree also
Otherwise we were matching directories with the same prefix.
2017-01-29 21:35:26 -05:00
Kris Nova ca1ee3e1a2 Merge pull request #1247 from tazjin/fix/s3-cross-account
Fix issues related to cross-account S3 bucket sharing
2017-01-27 21:25:33 -07:00
Vincent Ambo cd6f9eb66a refactor s3context: Use Go time constants 2017-01-27 13:39:15 +01:00
Vincent Ambo 0728b7c9fa refactor vfs: Create location request further down
Minor refactor, the request was created one level up originally
because I had added two separate steps for initially determining
whether we have to use the bruteforce method.

However this is a premature optimisation and unnecessary due to the
concurrency behaviour we've got now.
2017-01-26 19:52:23 +01:00
Vincent Ambo 3b6e3bda56 chore: Run gofmt on new VFS code 2017-01-26 12:30:04 +01:00
Vincent Ambo 5a25a96c93 feat vfs: Fetch S3 bucket locations cross-account
The AWS API makes it difficult to retrieve S3 bucket locations from shared buckets
with bucket-policy based access delegations. This introduces a workaround for the
issue.

AWS is aware of the issue but for the time being they can not provide information
about when it will be fixed.

See #1247 for more information.
2017-01-26 11:47:09 +01:00
Vincent Ambo db0155b5b5 feat s3fs: Allow bucket object ACL override
When sharing S3 buckets across accounts it may be necessary to override ACLs
per object to avoid locking out different accounts.

This commit lets users specify a `KOPS_STATE_S3_ACL` environment variable which
(if specified) overrides the ACL in the PutObject request.

Fixes #907
2017-01-26 11:47:09 +01:00
Justin Santa Barbara bb42ae6723 Recognize file:// urls 2017-01-25 23:33:53 -05:00
Justin Santa Barbara 8c84ed3fe8 Retry readHttpLocation on 500 errors
Fix #1441
2017-01-15 20:59:02 -05:00
Justin Santa Barbara 0a56d3d2e1 Raise an error on an invalid s3 path
Fix #902
2017-01-08 14:37:46 -05:00
Justin Santa Barbara b36b75ad0c Always set CredentialsChainVerboseErrors when initializing AWS
Fix #605
2017-01-03 20:03:03 -05:00
Justin Santa Barbara afd0c25abe First model -> tf test 2016-12-11 17:11:10 -05:00
yancl aec534a93f change KOPS_AWS_REGION to AWS_REGION 2016-12-05 15:04:03 +00:00
yancl bc444fd535 fix the aws region that hardcoded to "us-east-1" which doesn't work in
some isolated regions(cn-north-1 and GovCloud, for example)
2016-11-21 08:53:45 +00:00
chrislovecnm 8fa2aac99f fixing more headers 2016-10-15 19:20:56 -06:00
Justin Santa Barbara defa53bb89 Fix S3 initialization 2016-10-07 01:52:01 -04:00
Justin Santa Barbara 767c9a6416 Fix tests; don't hit s3 until we need to 2016-10-07 01:38:44 -04:00
Justin Santa Barbara f7fa324858 Initial k8s-style kops API
We try to emulate the k8s Clientset approach
2016-10-07 01:13:02 -04:00
Justin Santa Barbara 39c3c85262 Skip directory objects in S3 when listing files
Issue #520
Issue #548
2016-09-30 10:07:15 -04:00
Justin Santa Barbara 5f8d68ec85 Refactor shared packages into util directory 2016-09-25 18:27:09 -04:00