You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by mirza-spc <no...@github.com> on 2016/05/17 18:33:23 UTC

[jclouds/jclouds-labs] ProfitBricks Compute API (#268)

@jasminSPC 
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-labs/pull/268

-- Commit Summary --

  * Profitbricks REST - Compute API
  * compute progress

-- File Changes --

    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/config/AzureComputeProperties.java (69)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/FalseOn204.java (27)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/ParseJobStatus.java (153)
    M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/functions/URIParser.java (194)
    M profitbricks-rest/pom.xml (12)
    M profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/ProfitBricksApiMetadata.java (7)
    A profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/compute/ProfitBricksComputeServiceAdapter.java (510)
    A profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/compute/concurrent/ProvisioningJob.java (62)
    A profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/compute/concurrent/ProvisioningManager.java (87)
    R profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/compute/config/ProfitBricksComputeServiceContextModule.java (117)
    A profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/compute/function/DataCenterToLocation.java (52)
    A profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/compute/function/LocationToLocation.java (46)
    A profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/compute/function/ProvisionableToImage.java (209)
    A profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/compute/function/ServerToNodeMetadata.java (169)
    A profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/compute/function/VolumeToVolume.java (44)
    M profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/config/ProfitBricksComputeProperties.java (2)
    M profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/domain/DataCenter.java (2)
    M profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/domain/Firewall.java (4)
    M profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/domain/Image.java (2)
    M profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/domain/Location.java (11)
    M profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/domain/Server.java (8)
    M profitbricks-rest/src/main/java/org/apache/jclouds/profitbricks/rest/domain/Snapshot.java (2)
    A profitbricks-rest/src/test/java/org/apache/jclouds/profitbricks/rest/compute/ProfitBricksComputeServiceLiveTest.java (121)
    A profitbricks-rest/src/test/java/org/apache/jclouds/profitbricks/rest/compute/ProfitBricksTemplateBuilderLiveTest.java (37)
    A profitbricks-rest/src/test/java/org/apache/jclouds/profitbricks/rest/compute/concurrent/ProvisioningManagerTest.java (118)
    A profitbricks-rest/src/test/java/org/apache/jclouds/profitbricks/rest/compute/config/StatusPredicateTest.java (122)
    A profitbricks-rest/src/test/java/org/apache/jclouds/profitbricks/rest/compute/function/DataCenterToLocationTest.java (76)
    A profitbricks-rest/src/test/java/org/apache/jclouds/profitbricks/rest/compute/function/LocationToLocationTest.java (62)
    A profitbricks-rest/src/test/java/org/apache/jclouds/profitbricks/rest/compute/function/ProvisionableToImageTest.java (203)
    A profitbricks-rest/src/test/java/org/apache/jclouds/profitbricks/rest/compute/function/ServerToNodeMetadataTest.java (142)
    A profitbricks-rest/src/test/java/org/apache/jclouds/profitbricks/rest/compute/function/VolumeToVolumeTest.java (59)
    M profitbricks-rest/src/test/java/org/apache/jclouds/profitbricks/rest/features/DataCenterApiLiveTest.java (2)
    M profitbricks-rest/src/test/java/org/apache/jclouds/profitbricks/rest/features/DataCenterApiMockTest.java (3)
    M profitbricks-rest/src/test/java/org/apache/jclouds/profitbricks/rest/features/ServerApiLiveTest.java (3)
    M profitbricks-rest/src/test/java/org/apache/jclouds/profitbricks/rest/internal/BaseProfitBricksLiveTest.java (10)
    A profitbricks-rest/src/test/resources/compute/datacenter.json (123)
    A profitbricks-rest/src/test/resources/compute/image.json (32)
    A profitbricks-rest/src/test/resources/compute/image1.json (32)
    A profitbricks-rest/src/test/resources/compute/image2.json (32)
    A profitbricks-rest/src/test/resources/compute/image3.json (32)
    A profitbricks-rest/src/test/resources/compute/predicate/datacenter-inprocess.json (41)
    A profitbricks-rest/src/test/resources/compute/predicate/datacenter.json (41)
    A profitbricks-rest/src/test/resources/compute/predicate/server-inprocess.json (173)
    A profitbricks-rest/src/test/resources/compute/predicate/server.json (173)
    A profitbricks-rest/src/test/resources/compute/predicate/snapshot-inprocess.json (30)
    A profitbricks-rest/src/test/resources/compute/predicate/snapshot.json (30)
    A profitbricks-rest/src/test/resources/compute/server.json (140)
    A profitbricks-rest/src/test/resources/compute/snapshot1.json (30)
    A profitbricks-rest/src/test/resources/compute/snapshot2.json (30)
    A profitbricks-rest/src/test/resources/compute/volume.json (33)

-- Patch Links --

https://github.com/jclouds/jclouds-labs/pull/268.patch
https://github.com/jclouds/jclouds-labs/pull/268.diff

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by alibazlamit <no...@github.com>.
@alibazlamit pushed 3 commits.

b7ef217  Added Nic to compute server and assigned an IP address
56d353b  Minor fixes
aaf3fdc  minor change

---
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268/files/5c9318f9704cad02d22261ca720b5fe98d215741..aaf3fdc8ad51999a373ff28e3c4892e5e1bfd8f9

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by mirza-spc <no...@github.com>.
This isn't ment to be a complete PR. We've only opened it because we needed your with a few issues.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#issuecomment-219997307

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by jasminSPC <no...@github.com>.
rebuild please

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#issuecomment-226018027

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by alibazlamit <no...@github.com>.
@jasminSPC  Could you close this PR i don't have the permission to

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#issuecomment-227271979

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by alibazlamit <no...@github.com>.
@nacx Do you have any idea what could be causing this issue:

  NoSuchElementException on node b99a9c31-a652-4212-823c-5a5de03b6ece/3054f358-b187-4684-8094-44d0832350d7:
java.util.NoSuchElementException: could not connect to any ip address port 22 on node {id=b99a9c31-a652-4212-823c-5a5de03b6ece/3054f358-b187-4684-8094-44d0832350d7, providerId=b99a9c31-a652-4212-823c-5a5de03b6ece/3054f358-b187-4684-8094-44d0832350d7, name=profitbricks-rests-9f6, location={scope=ZONE, id=b99a9c31-a652-4212-823c-5a5de03b6ece, description=computeServiceLiveTest, parent=us/las, metadata={version=4, state=AVAILABLE}}, group=profitbricks-rests, os={family=linux, description=linux, is64Bit=false}, status=RUNNING[AVAILABLE], loginPort=22, publicAddresses=[158.222.103.134], hardware={id=cpu=1,ram=1024,disk=10, providerId=cpu=1,ram=1024,disk=10, name=cpu=1,ram=1024,disk=10, location={scope=ZONE, id=b99a9c31-a652-4212-823c-5a5de03b6ece, description=computeServiceLiveTest, parent=us/las, metadata={version=4, state=AVAILABLE}}, processors=[{cores=1.0, speed=1.0}], ram=1024, volumes=[{id=f3fad40c-e47a-4ef3-bac8-27e997484c62, type=LOCAL, size=10.0, device=1, bootDevice=false, durable=true}], hypervisor=kvm, supportsImage=ALWAYS_TRUE}, loginUser=root}
 at org.jclouds.compute.util.ConcurrentOpenSocketFinder.findOpenSocketOnNode(ConcurrentOpenSocketFinder.java:107)
 at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.call(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:128)
 at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.apply(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:144)
 at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.apply(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:50)
 at com.google.common.util.concurrent.Futures$1.apply(Futures.java:713)
 at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:861)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#issuecomment-227209112

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by mirza-spc <no...@github.com>.
So I'm not sure how to reconcile the differences with the Compute Interface and PB REST API. Thus, I cannot get Compute live test to pass.

Take for example Compute Interface:
```
   Iterable<L> listLocations();

   N getNode(String id);

   // TODO consider making reboot/resume/suspend return the node they affected
   void destroyNode(String id);

   void rebootNode(String id);

   void resumeNode(String id);

   void suspendNode(String id);
```

However, in PB REST, additional data center id is required. 

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#issuecomment-223040106

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by Ignasi Barrera <no...@github.com>.
Closed #268.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#event-698654114

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by Ignasi Barrera <no...@github.com>.
This is usually because the port 22 is filtered in the VM (do you need to configure a firewall to enable access to that port?) or because the VM does not have a reachable ip address, or because the adapter/transformation function are not returning properly a reachable ip address when returning the node. It could be any of them.

I would be more than happy to help, but in order to do that, I need to be able to focus on the code that really matters. If you fix the pull request and remove all the invalid code (merge conflicts, etc) and push a proper, clean, rebased branch, I'll have a look at it and try to help!

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#issuecomment-227212912

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by alibazlamit <no...@github.com>.
@nacx i am working on fixing the PR mean while could you tell me if you came across this
`INFO: << configured node(1821134a-fa51-4d3a-8a3d-da1e891dc4d2/fc621963-76bc-495f-8585-afd0885d33a9) with bash: java: command not found and jetty head: cannot open '/usr/local/jetty/VERSION.txt' for reading: No such file or directory in 27s
`
i managed to pass the issue with the port 22 now i got this.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#issuecomment-227284324

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by alibazlamit <no...@github.com>.
@alibazlamit pushed 7 commits.

624b306  Profitbricks REST - LAN API
0de72b3  Added ServerInDataCenter
c4195e3  Added VolumeProvisoningStatusPredicate and ServerAvaiblablePredicate
c96999b  pb-ipblock-api
3230276  Merge branch 'pb-ipblock-api' into pb-compute-api
29e6d94  Merged from IpBlockApi branch
5c9318f  Merge branch 'pb-compute-api' of https://github.com/StackPointCloud/jclouds-labs into pb-compute-api

---
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268/files/dddf0cb3b341048ef1904d3ee043e5485f8fd73c..5c9318f9704cad02d22261ca720b5fe98d215741

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by Ignasi Barrera <no...@github.com>.
Any updates here?

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#issuecomment-222177321

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by Ignasi Barrera <no...@github.com>.
There are other providers that face this issue, and they encode the region in the node ID. You can have a look at how the [OpenStack Nova](https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/NovaComputeServiceAdapter.java#L221-L233) provider returns the nodes. It uses a `ServerInRegion` internal entity, just to transport all the region information to the [node transformation function](https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/functions/ServerInRegionToNodeMetadata.java#L102-L103). So nodes IDs in nova are something like "regionA/i-0001". Then the adapter takes this convention into account elsewhere, such as when [getting a node by id](https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/NovaComputeServiceAdapter.java#L253-L258). The use of that `ServerInRegion` cl
 ass is a
  clean way to encapsulate all this ID encoding behavior across the entire the portable abstraction layer.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#issuecomment-223555090

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by Ignasi Barrera <no...@github.com>.
> This isn't ment to be a complete PR. We've only opened it because we needed your with a few issues.

In any case, this does not even compile. There are java files with diff markers in there, which denotes that not enough care have been put on a simple "git pull / git merge".

This said, if you need some feedback, the best way to get it is to write an appropriate description, and ask there for the feedback you need. We don't have a crystall ball to guess the purpose of the pull request, its completeness, or what feedback you do exactly need.

Please, open a proper pull request, and take your time to write a description that properly gives us context and the questions you have, so we can start a proper discussion.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#issuecomment-219998354

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by jasminSPC <no...@github.com>.
@nacx could you close this PR. We will have to open a new one for Profitbricks compute

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#issuecomment-227317630

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by Ignasi Barrera <no...@github.com>.
Yes, that is OK, we can work together in the PR to fix things. This is a good place to discuss the code and propose changes, and track progress with the commits. Feel free to close this one and open a new one if that is easier for you.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#issuecomment-227218328

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by alibazlamit <no...@github.com>.
@nacx I can push of course but the Compute is still a work in progress, that's OK?

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#issuecomment-227213642

Re: [jclouds/jclouds-labs] ProfitBricks Compute API (#268)

Posted by Ignasi Barrera <no...@github.com>.
This PR is a mess. Just looking at the first two files, it contains unresolved merge conflicts. Please, amend and submit a proper patch that can be reviewed.

Also take your time to describe the contents of the pull request. The summary for this PR shows that there are 3.682 lines added, and this is huge to review, and especially if there is no context nor explanation of the contents of the PR. Please, describe what it adds: just the implementation of an interface? additional things? which live tests have been added and which is their status?



---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/268#issuecomment-219990150