You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/03/06 20:33:57 UTC

[GitHub] [cloudstack] nvazquez opened a new pull request #6062: New feature: Add retry option for VMs in Error state

nvazquez opened a new pull request #6062:
URL: https://github.com/apache/cloudstack/pull/6062


   ### Description
   
   This PR adds a retry API for VMs failed on Error state
   Fixes: #5739 
   
   <img width="1039" alt="Screen Shot 2022-03-06 at 17 32 04" src="https://user-images.githubusercontent.com/5295080/156941030-6e9cdedc-9a98-482d-80ab-ec9ad6b1ccf4.png">
   <img width="832" alt="Screen Shot 2022-03-06 at 17 33 10" src="https://user-images.githubusercontent.com/5295080/156941056-5128263f-22f0-459c-88c3-4152982b2ca0.png">
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [x] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [x] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [x] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #6062: New feature: Add retry option for VMs in Error state

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6062:
URL: https://github.com/apache/cloudstack/pull/6062#discussion_r830944995



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/RetryDeployVMCmd.java
##########
@@ -0,0 +1,96 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.command.user.vm;
+
+import com.cloud.event.EventTypes;
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.NetworkRuleConflictException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.user.Account;
+import com.cloud.uservm.UserVm;
+import com.cloud.vm.VirtualMachine;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.command.user.UserCmd;
+import org.apache.cloudstack.api.response.SuccessResponse;
+import org.apache.cloudstack.api.response.UserVmResponse;
+import org.apache.log4j.Logger;
+
+@APICommand(name = RetryDeployVMCmd.APINAME,
+        description = "Retries the deployment of a virtual machine on Error state after an attempt has failed",
+        responseObject = SuccessResponse.class,
+        since = "4.17.0")
+public class RetryDeployVMCmd extends BaseAsyncCmd implements UserCmd {
+
+    private static final Logger LOG = Logger.getLogger(RetryDeployVMCmd.class);
+    public static final String APINAME = "retryDeployVirtualMachine";

Review comment:
       @nvazquez Can we re-use the _deployVirtualMachine/startVirtualMachine_ API, with retry parameter?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on pull request #6062: New feature: Add retry option for VMs in Error state

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #6062:
URL: https://github.com/apache/cloudstack/pull/6062#issuecomment-1072119492


   @nvazquez 
   is this still in progress or ready for review ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on pull request #6062: New feature: Add retry option for VMs in Error state

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #6062:
URL: https://github.com/apache/cloudstack/pull/6062#issuecomment-1072119492


   @nvazquez 
   is this still in progress or ready for review ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6062: New feature: Add retry option for VMs in Error state

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6062:
URL: https://github.com/apache/cloudstack/pull/6062#issuecomment-1060034411


   @nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #6062: New feature: Add retry option for VMs in Error state

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6062:
URL: https://github.com/apache/cloudstack/pull/6062#issuecomment-1073425584


   @weizhouapache it is still in progress, moving it to the next milestone since I won't be able to work further on it


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #6062: New feature: Add retry option for VMs in Error state

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6062:
URL: https://github.com/apache/cloudstack/pull/6062#issuecomment-1060034232


   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez edited a comment on pull request #6062: New feature: Add retry option for VMs in Error state

Posted by GitBox <gi...@apache.org>.
nvazquez edited a comment on pull request #6062:
URL: https://github.com/apache/cloudstack/pull/6062#issuecomment-1073425584


   @weizhouapache it is still in progress, moving it to the next milestone since I won't be able to work further on it for this release


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6062: New feature: Add retry option for VMs in Error state

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6062:
URL: https://github.com/apache/cloudstack/pull/6062#issuecomment-1060039719


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2778


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org