Pearl1594 opened a new pull request #5992:
URL: https://github.com/apache/cloudstack/pull/5992


   ### Description
   
   This PR fixes the test failure observed on main branch for 
`test_06_disk_offering_strictness_false`
   The main reason for the failure, is that the volume fails to resize on 
change of service offering reporting that the volume has a parent.
   ```
   022-02-14 07:22:01,410 ERROR [c.c.h.v.r.VmwareResource] 
(DirectAgent-80:ctx-df1ac830 10.0.34.173, job-59/job-60, cmd: 
ResizeVolumeCommand) (logid:02e59892) Resize of volume in VM [name: i-6-7-VM] 
is not supported because Disk device [path: i-6-7-VM] has Parents: 
[6000C296-e4fb-b280-4d56-8e62cda83de9].
   2022-02-14 07:22:01,410 ERROR [c.c.h.v.r.VmwareResource] 
(DirectAgent-80:ctx-df1ac830 10.0.34.173, job-59/job-60, cmd: 
ResizeVolumeCommand) (logid:02e59892) Failed to resize volume of VM [name: 
i-6-7-VM] due to: [Resize of volume in VM [name: i-6-7-VM] is not supported 
because Disk device [path: i-6-7-VM] has Parents: 
[6000C296-e4fb-b280-4d56-8e62cda83de9].].
   java.lang.Exception: Resize of volume in VM [name: i-6-7-VM] is not 
supported because Disk device [path: i-6-7-VM] has Parents: 
[6000C296-e4fb-b280-4d56-8e62cda83de9].
           at 
com.cloud.hypervisor.vmware.resource.VmwareResource.getDiskAfterResizeDiskValidations(VmwareResource.java:951)
           at 
com.cloud.hypervisor.vmware.resource.VmwareResource.execute(VmwareResource.java:878)
           at 
com.cloud.hypervisor.vmware.resource.VmwareResource.executeRequest(VmwareResource.java:569)
           at 
com.cloud.agent.manager.DirectAgentAttache$Task.runInContext(DirectAgentAttache.java:315)
           at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:48)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
           at 
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:45)
           at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at 
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
           at java.base/java.lang.Thread.run(Thread.java:829)
   
   ```
   For resizing volumes in VMware it is required that 
`vmware.create.full.clone` be true. Hence, the test has been modified to set it 
to true at the start of the test and reset it back on completion.
   <!--- Describe your changes in DETAIL - And how has behaviour functionally 
changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to 
reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be 
closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- 
*********************************************************************************
 -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE 
DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- 
*********************************************************************************
 -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [X] 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
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [X] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to 
-->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) 
document -->
   


-- 
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-unsubscr...@cloudstack.apache.org

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


Reply via email to