Commit Graph

855 Commits

Author SHA1 Message Date
Ignasi Barrera 6100b7c366 Fix BaseComputeServiceLiveTest configuration 2017-04-21 20:19:49 +02:00
Ignasi Barrera 8c2e7435da Fix the Jetty start statement used in compute live tests 2017-04-20 10:01:51 +02:00
Ignasi Barrera 7f589821d4 Provide a method to prepare an before taking an snapshot from it 2017-03-27 17:11:32 +02:00
Ignasi Barrera c6d8f80445 Take into account the template properties everytime the builder is retrieved 2017-03-06 16:52:51 +01:00
Ignasi Barrera cbc750cb8b Next development version 2.0.2-SNAPSHOT 2017-02-22 10:32:50 +01:00
Ignasi Barrera bafa52be97 Apache jclouds 2.0.1-rc2 release 2017-02-22 10:28:10 +01:00
Geoff Macartney e294de025e JCLOUDS-1237: Add compareTo() for IpPermission. 2017-02-21 23:14:15 +01:00
Ignasi Barrera 3749543809 Fix compute service integration tests 2017-01-31 11:51:51 +01:00
Andrea Turli 10a585e504 change hostname command to get the short form 2017-01-31 10:22:03 +01:00
Svetoslav Neykov 86f518dddc Select the latest available java package to install dynamically 2017-01-25 10:47:32 +01: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
Richard Downer 199e17ab2c Fix InitScriptConfigurationForTasks.initScriptPattern on Windows
This method has incorrect results when run on Windows. It is expected to
generate folder names compatible with Unix-like target machines, but by
using File.getParent it will actually be influenced by the host machine
OS type. This results in baseDir being set to a style that will not work
on Unix-like targets.
2016-10-25 16:05:39 +02:00
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