sureshanaparti opened a new pull request, #9468:
URL: https://github.com/apache/cloudstack/pull/9468

   ### Description
   
   This PR disconnects/detachs config drive ISO (if exists) on stop VM in 
VMware. This is required for support some VM operations involving export OVF, 
on stopped VMs.
   
   Root cause: Export OVF fails as there is no config drive file, it is removed 
when VM is stopped.
   
   Fixes #9453
   
   <!--- 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: AUTOMATION 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)
   - [ ] build/CI
   - [ ] test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [x] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   Manually tested the start,stop,start VM operations and VM instance volume 
snapshots with config drive on VMware.
   
   Before =>
   
   
![Before_ConfigDrive_NotDetached_VMware](https://github.com/user-attachments/assets/9d2e5e45-daee-431f-868e-ad12c28ef62b)
   
   <img width="1000" alt="Before_ConfigDrive_NotDetached_And_Snapshot_CS" 
src="https://github.com/user-attachments/assets/c0033c7f-8d38-4aed-a9cc-4a432ace9253";>
   
   After =>
   
   
![After_ConfigDrive_Detached_VMware](https://github.com/user-attachments/assets/7b6ccb29-13c1-4bdd-9f7e-536c58c8a697)
   
   <img width="1014" alt="After_ConfigDrive_Detached_And_Snapshot_CS" 
src="https://github.com/user-attachments/assets/346a270b-4b0c-42a1-b590-63556d4272a2";>
   
   ```
   2024-07-29T15:56:17,721 DEBUG [c.c.a.t.Request] 
(Work-Job-Executor-2:[ctx-bd90a732, job-217/job-218, ctx-bd64bbee]) 
(logid:fd80b170) Seq 1-234468655599976463: Executing:  { Cmd , MgmtId: 
32989425697365, via: 1(10.0.34.85), Ver: v1, Flags: 100011, 
[{"com.cloud.agent.api.StopCommand":{"isProxy":"false","checkBeforeCleanup":"false","forceStop":"false","vlanToPersistenceMap":{"1727":"true"},"volumesToDisconnect":[],"vmName":"i-2-25-VM","executeInSequence":"false","wait":"0","bypassHostMaintenance":"false"}}]
 }
   ...
   2024-07-29T15:56:21,045 INFO  [c.c.h.v.r.VmwareResource] 
(DirectAgent-14:[ctx-7ac38317, 10.0.34.85, job-217/job-218, cmd: StopCommand]) 
(logid:fd80b170) Disconnecting config drive at location: 
[c25a36f2689731989d17a452538ae70d] configdrive/i-2-25-VM.iso
   
   2024-07-29T15:56:21,253 DEBUG [c.c.n.e.ConfigDriveNetworkElement] 
(Work-Job-Executor-2:[ctx-bd90a732, job-217/job-218, ctx-bd64bbee]) 
(logid:fd80b170) Deleting config drive ISO for vm: i-2-25-VM
   2024-07-29T15:56:21,256 DEBUG [c.c.a.m.ClusteredAgentAttache] 
(Work-Job-Executor-2:[ctx-bd90a732, job-217/job-218, ctx-bd64bbee]) 
(logid:fd80b170) Seq 2-4190599453268246540: Routed from 32989425697365
   2024-07-29T15:56:21,257 DEBUG [c.c.a.t.Request] 
(Work-Job-Executor-2:[ctx-bd90a732, job-217/job-218, ctx-bd64bbee]) 
(logid:fd80b170) Seq 3-4190599453268246540: Sending  { Cmd , MgmtId: 
32989425697365, via: 3(s-2-VM), Ver: v1, Flags: 100011, 
[{"com.cloud.agent.api.HandleConfigDriveIsoCommand":{"isoFile":"configdrive/i-2-25-VM.iso","create":"false","destStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"NFS://10.0.32.4/acs/secondary/pr9346-t10845-vmware-80/pr9346-t10845-vmware-80-sec1","_role":"Image"}},"useHostCacheOnUnsupportedPool":"false","preferHostCache":"false","wait":"0","bypassHostMaintenance":"false"}}]
 }
   2024-07-29T15:56:21,321 DEBUG [c.c.a.t.Request] (AgentManager-Handler-8:[]) 
(logid:) Seq 3-4190599453268246540: Processing:  { Ans: , MgmtId: 
32989425697365, via: 3, Ver: v1, Flags: 10, 
[{"com.cloud.agent.api.HandleConfigDriveIsoAnswer":{"result":"true","wait":"0","bypassHostMaintenance":"false"}}]
 }
   2024-07-29T15:56:21,321 DEBUG [c.c.a.t.Request] 
(Work-Job-Executor-2:[ctx-bd90a732, job-217/job-218, ctx-bd64bbee]) 
(logid:fd80b170) Seq 3-4190599453268246540: Received:  { Ans: , MgmtId: 
32989425697365, via: 3(s-2-VM), Ver: v1, Flags: 10, { 
HandleConfigDriveIsoAnswer } }
   ...
   2024-07-29T15:56:21,213 DEBUG [c.c.a.t.Request] 
(DirectAgent-14:[ctx-7ac38317]) (logid:fd80b170) Seq 1-234468655599976463: 
Processing:  { Ans: , MgmtId: 32989425697365, via: 1(10.0.34.85), Ver: v1, 
Flags: 10, [{"com.cloud.agent.api.StopAnswer":{"result":"true","details":"Stop 
VM i-2-25-VM Succeed","wait":"0","bypassHostMaintenance":"false"}}] }
   2024-07-29T15:56:21,213 DEBUG [c.c.a.t.Request] 
(Work-Job-Executor-2:[ctx-bd90a732, job-217/job-218, ctx-bd64bbee]) 
(logid:fd80b170) Seq 1-234468655599976463: Received:  { Ans: , MgmtId: 
32989425697365, via: 1(10.0.34.85), Ver: v1, Flags: 10, { StopAnswer } }
   ```
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to 
-->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to