842 Commits

Author SHA1 Message Date
Ignasi Barrera
06b69ffed4 Fix AWS EC2 compute live tests 2016-10-25 15:19:50 +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
25baad6d32 Address confusing operator precedence
Found via error-prone.
2016-10-23 06:39:46 -07:00
Ignasi Barrera
cce4495872 Proper template config in the image extension live tests 2016-10-13 15:06:50 +02:00
Ignasi Barrera
6cd22b0ae2 Better order for the ComputeService live tests 2016-10-13 15:06:49 +02:00
Ignasi Barrera
d98348d503 Better predicate signature for node operations 2016-09-23 10:22:23 +02:00
Iván Lomba
aac9b5fd5d JCLOUDS-482: Add support for ProfitBricks 2016-08-16 02:44:13 +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
Ivana Yovcheva
cf5a66ab14 Fix for ssh reload for CentOS 7 2016-08-16 00:42:57 +02:00
Ignasi Barrera
7dc73ee0bf Do not try to connect to ssh if already connected 2016-08-12 00:39:28 +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
Ignasi Barrera
87154bf89e Isolate the task cancellation in a test 2016-07-18 08:09:30 +02:00
Andrea Turli
a515ce2f22 Change line endings on files recursively 2016-07-14 00:02:13 +02:00
Ignasi Barrera
d197a9e0cb Allow subclasses to override the scripts 2016-06-22 00:26:18 +02:00
Andrew Gaul
1d192dfe56 Remove scoping annotations on abstract types
These annotations are not meaningful.  Found via error-prone.
2016-06-20 10:54:52 -07:00
Ignasi Barrera
179ed3b2f6 Properly set the permissions in the ~/.ssh folder
When writing the ~/.ssh/authorized_keys file in a script that is being
run as sudo, the file is created with the root owner, instead of the
user defined by the node credentials. File ownership should be enforced
to make sure the right owner is alwaays set.
2016-06-17 22:16:19 +02:00
Zack Shoylev
de88a72e7a Change the template to use CentOS instead. Avoids some openjdk-6 problems. 2016-06-07 17:37:33 -05:00
Ignasi Barrera
d05af2246b Allow to override the Image and Security extension bindings
Some providers, such as Azure ARM, might need additional
resources present in order to be able to use the extension.
This change allows to override its binding (Guice 4 by default does not
allow to override provider bindings, so we need to define them as final
ones and provide an alternate method for subclasses that need to
override the binding).
2016-05-25 21:14:26 +02:00
Sergey Tselovalnikov
0e41b45af5 Fix NPE when node is null 2016-05-17 16:46:24 +02:00
Andrew Gaul
da386ad0e2 Correct FindBugs warnings 2016-04-27 20:28:37 -07: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
kilida
59a0014bdf Duplicate conditional and body in VirtualSystemSettingDataHandler.java 2016-03-28 16:12:58 +02:00
Aled Sage
60e58dc989 Fix TemplateOptions.clone; adds RunScriptOptions.copyTo
Previously not all fields of RunScriptOptions were included in copyTo
(e.g. runAsRoot and initScript).

Also options.equals(options.clone()) failed if options.loginPassword
was originally null - in the cloned object, it would be Optional.absent.

Fixes RunScriptOptions.toString, to only say “loginPasswordPresent”
if optional.isPresent().
2016-03-08 21:49:55 +01:00
Zack Shoylev
5e3924947a Fix testSupplierExpirationReloadsTheCache sometimes failing 2016-02-17 16:39:14 -06:00
Reijhanniel Jearl Campos
a4b8a73790 JCLOUDS-1053: Fallback to -1 when sshj exit status returns null 2016-01-22 12:40:35 +01:00
Ignasi Barrera
40f31786c5 JCLOUDS-512: Implement the ImageCache
This commit refactors the ImageCacheSupplier to act as a
proper cache. It is used by the ImageExtesion and all operations
on the images are propagated to the cache.

A method has also been added to the TemplateBuilder to let users
force a cache refresh. There have been several requests to provide a way
to disable image caching in the compute abstraction, and this new method
should fix that.
2016-01-19 11:25:09 +01:00
Andrew Gaul
df48540cb7 Enable FindBugs CheckRelaxingNullnessAnnotation
Also fix up warnings.
2015-11-13 17:44:55 -08:00
Nikolay Sokolov
060b66a4f7 Close connection during ExecChannel 2015-10-25 23:02:33 +01:00
Aled Sage
502d96d22b UserAdd: guard groupadd with check if group exists
On SUSE, the “-f” force option is not available for groupadd,
so `groupadd -f wheel` returns exit code 9 if the group already
exists. To avoid this, first check if the group exists.

In normal usage, this doesn’t matter: the script continues with the
next command anyway.

However, if the statements generated by UserAdd or AdminAccess are
used outside of that context (e.g. by code external to jclouds), then
this can cause them to fail.
2015-10-25 22:02:31 +01:00
Ignasi Barrera
042222b647 GCE hardware profiles might not have volumes 2015-09-18 10:05:34 +02:00
Oliver Gondža
edde721937 JCLOUDS-962: Make all @Provider methods final 2015-09-02 23:54:44 +02:00
Oliver Gondža
6cd716f1ea JCLOUDS-962: Do not override provider methods 2015-09-02 23:54:44 +02:00
Yavor Yanchev
d45f08e82e JCLOUDS-973 Extending the sudo's configuration
- Adding env_reset to the default configuration in /etc/sudoers
- Adding secure_path to the default configuration in /etc/sudoers
- secure_path value is
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
2015-09-01 00:29:17 +02:00
Andrew Gaul
98b3105669 Address error-prone errors
Mostly of the form, Collection.size() >= 0.
2015-07-30 15:40:03 -07:00
Ignasi Barrera
5d30f859aa Fix AWS and EC2 TemplateBuilder live tests 2015-07-29 11:58:19 +02:00
Alex Heneveld
a6aff306e7 add deprecated flag to Hardware and prefer non-deprecated hardware types
deprecated hardware types in EC2 are flagged using this, according to latest AWS advice,
to fix situations where deprecated hardware types would be chosen when a non-deprecated alternative exists.
we also deprecate T2 because it requires a VPC.

also fixes semantics of ImagesToRegionAndIdMap to match the logic used in the TemplateBuilderImpl;
RegionAndName should contain the ID not the ProviderID.  this is only really used in tests so no external impact.
(previously the cache only worked if provider ID matched the non-location segment of the image ID.)
however this does now assert that image id's are in the right format for AWS, as suggested by @nacx.
2015-07-20 17:40:07 +02:00
Zack Shoylev
a472a878b0 Updates live tests and template builder settings for compute 2015-07-14 10:21:32 -05:00
Reijhanniel Jearl Campos
107c9d0d55 Fix template equals assertion to consider location scope 2015-06-25 14:25:47 +02:00
Ignasi Barrera
8182f8c4ae Improve image check in the BaseImageExtensionLiveTest 2015-06-15 22:18:07 +02:00
Ignasi Barrera
278ada8b19 Added CoreOS to the OSFamily enum 2015-06-11 10:34:41 +02:00
Svetoslav Neykov
3bdac1cc33 Make home folder globally accessible when creating a user
Certain hardened images will have "umask 0077" set for the root user, making the newly created /home/users folder inaccessible to non-root. This results in a failure when trying to ssh with the new account. Explicitly set permissions to be independent of default umask.
2015-05-13 22:01:10 +02:00
Ignasi Barrera
058c0fa54b Properly clone the login credentials 2015-04-08 16:00:29 +02:00
Andrew Gaul
6a7a52642a Convert Windows to Unix line endings
Converted with:

mvn checkstyle:checkstyle --quiet -Dcheckstyle.output.file=/dev/stdout -Dcheckstyle.output.format=plain | grep warn | cut -f1 -d: | uniq | xargs -n 1 dos2unix
2015-03-31 18:25:54 -07:00
Ignasi Barrera
f469cf8b51 Next development version 2.0.0-SNAPSHOT 2015-03-24 10:52:01 +01:00
Ignasi Barrera
bb41ed4341 Apache jclouds 1.9.0 release 2015-03-24 10:35:42 +01:00
Hugo Viejo
b54c788e7c Update setupPublicCurl.sh
Add the fqdn to /etc/hosts file becouse if you only add the hostname then it is posible to lose the fqdn
changed expected script adding  "`hostname -f` "
Added "-s" option to ensure to get the short name
Added "-s" option to ensure search using the short name
2015-03-11 22:51:49 +01:00
Zack Shoylev
07f1fb69a7 Fixes more tests with timing problems 2015-02-18 03:46:37 -06:00
Zack Shoylev
66457ff8f8 fix jclouds live tests failing when a keypair is missing. 2015-02-05 17:00:49 -06:00
Zack Shoylev
c64470e0b1 Fixes flavor and template tests to be more robust. 2015-01-30 15:19:55 -06:00