Commit Graph

2559 Commits

Author SHA1 Message Date
Timur Alperovich 3668a9905b GetBucketLocation should use path-style requests.
When making a GetBucketLocation request, Amazon may route the request
to the bucket region. When making it with v4 signer, the request may
fail because of the region mismatch. Concretely, a request to
test.s3.amazonaws.com may resolve to s3-us-west-2-w.amazonaws.com. The
request itself is prepared for the us-east-1 region (s3.amazonaws.com
endpoint), but then fails when the DNS resolution points to a
us-west-2 endpoint.

Bucket-in-path works around this for the GetBucketLocation requests.
That means that every GetBucketLocation request will be of the form:
https://s3.amazonaws.com/{bucket}?location. This ensures that jclouds
requests will not be subjected to Amazon's routing/DNS pointers.

Fixes: JCLOUDS-1213
2017-01-11 22:54:36 -08:00
mildis a1733e5b68 WindowsEveryonePrincipal : update regex for FR
"Everyone" in a french Windows is "Tout le monde".
Thus, the line.split(" ") returns only "Tout" and putBlob() throws an exception.
The modified regex search for the first two consecutive white char to return the name.
Windows's whoami returns a bunch of 0x20 between the name and the type.
2017-01-10 13:34:44 -06:00
Etienne CARRIERE 01d749694e JCLOUDS-1220: Possibility to change the name of Header of Identity v1 protocol 2017-01-05 16:19:18 +01:00
Andrea Turli 1d562d910e update Docker README
improve description for osx
2017-01-05 09:24:27 +01:00
Andrew Gaul f2413cd191 Avoid creating temporary files via relative paths
This avoids creating junk in the source directory.
2016-11-15 20:30:23 -08:00
Ignasi Barrera 970f521bcd Next development version 2.0.1-SNAPSHOT 2016-11-15 01:17:08 +01:00
Ignasi Barrera 6a3a37f4e0 Apache jclouds 2.0.0-rc3 release 2016-11-09 22:30:45 +01:00
Andrea Turli 9b3e6d91bf Fix retryOnRenew classes
These classes should not close the release the payload as they are not
reading it.

- fix swift
- fix openstack-swift v1 and v2
- fix RetryOnRenewTest for v1 and v2
2016-10-28 17:29:05 +02:00
Zack Shoylev 78b3120e5e filesystem: Modify the backslash only on Windows 2016-10-26 19:53:55 -05:00
Erich Duda dff16876ee Change types of variables in docker ImageSummary
The int type is not sufficient for size and virtualSize
parameters, if the image is bigger than 2gb.

This fixes https://issues.apache.org/jira/browse/JCLOUDS-1190
2016-10-26 21:31:13 +02:00
Zack Shoylev fc91f64290 Ensure that jclouds consistently uses /, works with \\, and uses File.separator on the filesystem level. 2016-10-25 17:23:32 -05:00
Andrea Turli a1f6b7ebf2 update CloudstackTemplateOptions pattern 2016-10-25 15:49:46 +02:00
Josef Cacek c10540b04d [JCLOUDS-1162] DockerComputeServiceAdapter shouldn't remove container if it stops with non-zero exit code quickly after start. The commit also adds feature which prints container logs into JClouds Compute Log during Node destroy if the TRACE log level is enabled 2016-10-25 15:34:09 +02:00
Andrew Gaul 3c9f66b8e9 Avoid lower-case l literal suffix
Readers can confuse this with 1.  Found via error-prone.  Fixed via:

find -name \*.java | xargs sed -i 's/\( [0-9][0-9]*\)l/\1L/g'
find -name \*.java | xargs sed -i 's/\(([0-9][0-9]*\)l/\1L/g'
2016-10-23 14:24:35 -07:00
Andrew Gaul 8117574c83 Avoid C-style array declarations
Found via error-prone.
2016-10-23 13:51:59 -07:00
Andrew Gaul d1508b2d23 Make inner class static
Found via error-prone.
2016-10-23 06:39:46 -07:00
Andrew Gaul 2a04a52d56 Remove unused imports
Found via error-prone.
2016-10-23 06:39:46 -07:00
Ignasi Barrera 7e21cf0a4a Fixed infinite recursion in EC2 image live test 2016-10-20 12:21:51 +02:00
Shri Javadekar 7826d22d30 JCLOUDS-1161: Make AWSS3BlobRequestSignerV4 the default signer.
Added new live tests and fixed some unit tests accordingly.
2016-10-18 20:06:34 -07:00
Zack Shoylev 00f7ee0738 jclouds was not properly retrying on an expect: 100-continue PUT request that requires re-athentication because of java protocol code
JCLOUDS-1179 This fix also addresses the same problem with other providers

No currently working tests because of https://github.com/square/okhttp/issues/675

This is a common problem in other tools as well https://curl.haxx.se/mail/lib-2004-08/0002.html
2016-10-13 12:17:19 -05:00
Ignasi Barrera b06795ebe4 JCLOUDS-1182: Added Seoul and Mumbai regions to AWS 2016-10-13 18:14:20 +02:00
Ignasi Barrera cce4495872 Proper template config in the image extension live tests 2016-10-13 15:06:50 +02:00
Andrew Gaul 50e6d44433 JCLOUDS-945: fix local blobstore marker handling
Previously using prefix markers would not correctly find the next key.
Add test for this behavior.
2016-10-12 22:22:28 -07:00
Ignasi Barrera d98348d503 Better predicate signature for node operations 2016-09-23 10:22:23 +02:00
Arvind Nadendla 34b54ad163 Remove hardcoded limitation of content size in Openstack Nova CreateServerOptions API
Fix issue JCLOUDS-1175 by removing hardcoded content sizes in Openstack
Nova API
2016-09-23 10:20:01 +02:00
Andrew Gaul 76995a363d Do not fail AWS S3 signer tests with expiry
Regression from 41bdd9c5a9.
References #1008.
2016-09-17 12:13:28 -07:00
Zack Shoylev 4bbca9edf9 More fixes to parallel download resource cleanup 2016-09-14 14:36:44 -05:00
Zack Shoylev de68c2a1b0 Some handles were not properly closed 2016-09-07 16:28:00 -05:00
Andrew Gaul 7cde28a4d2 JCLOUDS-1074: Guava 20 compatibility
* dynamically call TypeToken.isSupertypeOf with Guava 19 and later and
  TypeToken.isAssignableFrom with Guava 18 and earlier
* consume or ignore values from methods with CheckReturnValue
* replace usage of removed Iterators.emptyIterator
2016-09-06 21:49:20 -07:00
Zack Shoylev 05c05e3de2 Allows users to download large files efficiently and directly to disk. 2016-09-02 14:05:26 -05:00
Francois Rigault dacd9825f0 Allow overriding getUserDefinedFileAttributeView
Today the filesystem blobstore provider use the extended attributes of the
filesystem to store metadata. This is not always desirable as some filesystems
(such as NFSv3) do not support extended metadata.  The current source code does
not allow to change this easily. getUserDefinedFileAttributeView could easily
be overriden for this purpose and allow extensions that customize where the
metadata should be stored.

See also JCLOUDS-658
2016-09-01 11:19:38 -05:00
Ignasi Barrera 0fd013da06 Fixed OAuth instructions for Azure 2016-09-01 09:56:16 +02:00
Daniel Haeser Rech 913fdeb168 JCLOUDS-1148: Fix token caches in OAuth flows 2016-09-01 09:55:23 +02:00
Ignasi Barrera 9662edf903 Update poms to include Docker and fixed groupId after promotion 2016-08-30 11:14:33 +02:00
Ignasi Barrera c493e2aa49 Promoted Docker from jclouds-labs 2016-08-30 11:14:20 +02:00
Josef Cacek a4e2110a63 JCLOUDS-1158 fix Docker find image Predicate for cases where repoTags field contains 'docker.io/' registry host prefix 2016-08-29 22:31:44 +02:00
Josef Cacek 71dd766227 Docker live test fix - SshToCustomPortLiveTest didn't work for remote docker endpoints due to wrong port number used 2016-08-29 22:27:32 +02:00
Josef Cacek c4605a32d4 [JCLOUDS-1157] fix networks in DockerComputeServiceAdapterLiveTest 2016-08-19 17:51:42 +02:00
Josef Cacek 58e11d42d1 Update Docker README.md 2016-08-19 17:49:25 +02:00
Iván Lomba 79e95c5a4c JCLOUDS-482: Add support for arbitrary CPU and RAM
This is a combination of 16 commits:

* First approach to ArbitraryCpuRamTemplateBuilderImpl
* Several fixes: refactoring some names, format, identation problems, some missing license headers and generateId method
* Refactored parse utility
* Added GoogleComputeEngineArbitraryCpuRamTemplateBuilderImpl to support GCE custom machine URI
* extracted hardware creation to automaticHardwareForCpuAndRam method
* Fixed ide automatic asterisk imports
* correcting WIP base case PR according to comments
* added machineTypeUriToHardware to set custom hardware in nodes
* fix checkstyle violations and other PR comments
* Set the providerId to custom machineType URI and fix adding node log
* Arbitrary hardware tests added to BaseTemplateBuilderLiveTest and GoogleComputeEngineTemplateBuilderLiveTest
* Added two more tests to BaseTemplateBuilderLiveTest
* Move repeated constants to TestUtils to reuse code
* Fix full path in the Hardware id and URI
* Add custom hardware tests to BaseComputeServiceLiveTest and GCEServiceLiveTest
* Change customHardware test to use buildTemplate and fix identation
2016-08-16 02:44:04 +02:00
Josef Cacek 9af449651d JCLOUDS-1153 Fix empty Docker repoTags field in ImageToImage function 2016-08-12 09:27:08 +02:00
Ignasi Barrera 449c6d8d84 Always take into account the configured template builder spec when building a template in live tests 2016-08-12 00:28:01 +02:00
Josef Cacek 0616b865ed [JCLOUDS-1147] upgrade snakeyaml version in byon and resolve removed deprecated Loader class 2016-08-02 15:28:41 +02:00
Andrew Donald Kennedy 6408c3a835 Add Network autovalue builder and tests 2016-08-01 11:42:31 +02:00
Andrew Donald Kennedy f2ce5679cc Connect container to list of networks in options 2016-08-01 11:42:26 +02:00
neonbunny e7bf9b1298 Ensure the canonicalRequest is logged properly
Resolves JCLOUDS-1143
2016-07-19 14:50:03 +01:00
Zack Shoylev 42079e1392 Parallel upload for BaseBlobStore 2016-07-15 04:15:17 -05:00
Andrea Turli a515ce2f22 Change line endings on files recursively 2016-07-14 00:02:13 +02:00
Andrew Gaul 4874a1eb18 JCLOUDS-1137: Handle TOCTOU during blobMetadata
A similar issue exists when getting a blob payload when a caller
simultaneously removes the blob.
2016-07-11 22:02:15 -07:00
Andrew Gaul 08e78c979e Add S3Proxy profile to skip failing tests 2016-07-11 16:42:09 -07:00
Zack Shoylev 6bff97b6d3 Changes the upload behavior to parallel, a TODO 2016-07-01 11:26:56 -05:00
Duncan Grant 7a979ba87b ImageId can be image name or id and will pull from hub 2016-06-28 09:47:43 +02:00
Andrew Gaul fff12293f9 JCLOUDS-1125: Add missing expected exception 2016-06-23 23:06:13 -07:00
Andrew Gaul 6df0472ab5 JCLOUDS-1125: local blobstore list MPUs 2016-06-23 21:45:04 -07:00
Arvind Nadendla 112c64e92a Make links nullable 2016-06-20 18:11:12 -05:00
Ignasi Barrera bde70457d0 JCLOUDS-1105: Do not create the default security group if custom groups are specified 2016-06-17 22:18:35 +02:00
urban 71b3a2b631 JCLOUDS-1129:Add more interfaces of the same network 2016-06-17 22:16:59 +02:00
Andrew Donald Kennedy 496fbae646 Fix incorrect key format check in Docker 2016-06-17 00:01:35 +02:00
Andrew Gaul 5fec2346a6 JCLOUDS-1028: Configure idempotent methods
Enable POST for Atmos, S3, and Swift.
2016-06-15 16:35:22 -07:00
Andrew Gaul 0bd2959410 JCLOUDS-1125: portable list multipart uploads
Only Azure, B2, and S3 support this operation.  Some MultipartUpload
fields become nullable.
2016-06-13 16:26:43 -07:00
Andrew Gaul 445664c9f1 JCLOUDS-1125: S3 list multipart uploads 2016-06-13 16:26:43 -07:00
Aled Sage 730a4cfe87 Docker.ContainerToNodeMetadata: remove needless mocking
Previously it mocked the container and the StateToStatus. It just
asserted that getter methods were called, rather than confirming the
resulting NodeMetadata had the right values.

By removing some of the mocks, it not only simplifies the code but
improves code-coverage. (e.g. if StateToStatus was being passed the
wrong value, the previous test would not have noticed).
2016-06-13 17:18:01 +02:00
Aled Sage fc88756d5a docker: get container’s IPs from all networks 2016-06-13 17:17:56 +02:00
Duncan Grant 91339b200e Node json should be optional
The Node element of the container json is optional
as well as nullable.
2016-06-13 12:56:05 +02:00
Zack Shoylev c1ce819f61 updateTemporaryUrlKey test 2016-06-07 17:37:39 -05:00
Duncan Grant ebc8f7568f Use container host ip not manager ip
When providing node ip in metadata jclouds was using the
ip of the docker manager which was fine for docker machine
but fails when using a swarm cluster.  This uses the ip returned
from docker.
2016-06-06 16:16:44 +02:00
Andrew Gaul a67ae3f27b Make inner classes static where possible
Found via error-prone.
2016-06-01 20:03:54 -07:00
Josef Cacek c0469cc9b7 [JCLOUDS-1118] fix configuration options location; mark some fields Nullable 2016-05-26 12:07:39 +02:00
Josef Cacek d4cf774389 [JCLOUDS-1117] fix for advanced Docker configuration - the Config.Builder should stay unchanged if used 2016-05-26 12:07:33 +02:00
Andrew Gaul 4ef28251c5 Add missing import
Regression from c5d845d368adf01909fd8ab5eeb824f7c44fb69e.
2016-05-23 20:26:01 -07:00
Andrew Donald Kennedy 61fb3ec145 Support supplying key and certificate to Docker as data 2016-05-23 17:52:24 +02:00
Jim Spring f46b38dd89 client credentials JWT support 2016-05-20 00:10:37 +02:00
Zack Shoylev c96cfb6176 Fix cleanup when the security group extension is not available. 2016-05-19 12:08:36 -05:00
Andrew Gaul 41bdd9c5a9 Skip unimplemented signed URL tests in S3 provider
jclouds aws-s3 provider supports these but s3 does not.  Also expect
failure in atmos and azureblob.  Follow on to
a4c40e15cd.
2016-05-12 12:12:52 -07:00
Andrew Gaul e423bc949e Avoid use of primitive wrapper constructors
Deprecated in Java 9.
2016-05-09 22:47:27 -07:00
Andrew Gaul 62410d31ae Handle missing containers in LocalBlobStore.list
Also fix FilesystemStorageStrategyImpl.getContainerMetadata to return
null on missing container as jdbc and transient already do.
2016-05-06 21:36:28 -07:00
Andrew Gaul a4c40e15cd Handle unimplemented signed URL tests in providers
This commit makes it evident in source code which providers do not
support this feature.
2016-05-06 10:31:37 -07:00
Andrew Gaul 0af3380a60 Address error-prone CheckReturnValue errors
Found via Guava 20.0.
2016-04-28 14:16:22 -07:00
Andrew Gaul da386ad0e2 Correct FindBugs warnings 2016-04-27 20:28:37 -07:00
Ignasi Barrera 04f1bb2b49 JCLOUDS-1104: Extension namespaces are deprecated and can be null 2016-04-26 22:38:45 +02:00
Andrew Donald Kennedy 42d0576aa9 Add openStdin option to Docker template options and set all port bindings explicitly 2016-04-26 10:33:17 +02:00
Andrew Gaul 6446627aad Correct equals with incompatible types
Found via error-prone.
2016-04-24 23:28:55 -07:00
Andrew Gaul 66cda12b50 Avoid eager evaluation of Preconditions messages
Found via error-prone.
2016-04-24 23:28:55 -07:00
Andrew Donald Kennedy 49f7bc37af Make DockerTemplateOptions values null safe 2016-04-19 17:01:18 +02:00
Andrew Gaul 3cf4e3d79c JCLOUDS-1101: Correct generics wildcard errors
Always incorrect but previously broken on Java 9.  Reference:

https://bugs.openjdk.java.net/browse/JDK-8075793
2016-04-18 09:49:58 -07:00
Ignasi Barrera 819141a608 Fixed OAuth authentication flow injections 2016-04-07 10:10:10 +02:00
Andrew Donald Kennedy 047595c7bb Added volumesFrom to Docker template options 2016-04-05 10:22:56 +02:00
Jim Spring 0420741690 Add support for Azure AD authentication using Service Principal and Password 2016-04-01 14:50:09 +02:00
Oleg 74a2a2683f JCLOUDS-1102: Fix. Rackspace returns a new structure for volume types. 2016-04-01 14:48:12 +02:00
Fernando Ribeiro 80beb9b397 JCLOUDS-1098: Fix OpenStack Marconi Unit Tests 2016-03-23 16:28:34 +01:00
Fernando Ribeiro 92e6319cd7 JCLOUDS-1095: Update OpenStack KeyStone Support for Zaqar 2016-03-23 10:29:07 +01:00
Zack Shoylev 760995a46e Use non-privileged mode for compute 2016-03-21 12:49:07 -05:00
Andrew Gaul 6e7801ad58 JCLOUDS-766: Fix issues with chunked upload signer
Previously we created a new builder instead of using the one the
method modified and did not preserve content encoding.  Addresses
AWSS3BlobIntegrationLiveTest.testPutInputStream test failures.
2016-03-20 16:06:51 -07:00
Andrew Gaul 8053abb530 JCLOUDS-766: Check metadata and headers for MD5
Addresses AWSS3ClientLiveTest.testMultipartSynchronously test
failures.
2016-03-18 22:56:54 -07:00
Andrew Gaul 35c5d7ffc0 JCLOUDS-766: Include Content-MD5 in v4 signature
Addresses AWSS3BlobIntegrationLiveTest.deleteMultipleObjects test
failures.
2016-03-18 16:58:03 -07:00
Andrew Gaul feae011c4d JCLOUDS-766: URL encode path for v4 signatures
Addresses AWSS3BlobIntegrationLiveTest.deleteObject test failures.
2016-03-18 15:05:05 -07:00
IgnacioCalvo 7d2f1e8b4d JCLOUDS-1080: Force JSON format for requests
Also make all fields optional.
2016-03-17 20:40:51 -07:00
Josef Cacek f3ee898c13 [JCLOUDS-1089] Add image history support to Docker ImageApi 2016-03-08 23:06:21 +01:00
Josef Cacek 831cdc67c3 [JCLOUDS-1002] provide access to Docker container Config object in the Node template options 2016-03-08 23:01:52 +01:00
Zack Shoylev f8ebbfdf8a Fixes an intermittently failing swift live test. 2016-03-08 12:38:13 -06:00