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/21 11:42:32 UTC
[GitHub] [cloudstack] Pearl1594 opened a new pull request #6146: configDrive: Fix failure to delete (unstarted) VM
Pearl1594 opened a new pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146
### Description
This PR fixes the issue observed when trying to expunge a VM created using config drive userdata service (with startVM=false) and the env has no secondary stores.
<!--- 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?
1. On an env with no secondary store, set the global setting: `vm.configdrive.primarypool.enabled` to true
2. Deploy a VM with a network offering with configDrive userdata service, but do not start it
3. Attempt deleting(expunge) the VM - the VM deletes successfully without NPE
Performed the above test with `vm.configdrive.primarypool.enabled` set to false and was also able to expunge the VM
<!-- 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-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#issuecomment-1079109490
@nvazquez a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. 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] blueorangutan commented on pull request #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#issuecomment-1079151377
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2987
--
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 #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#discussion_r831039366
##########
File path: server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
##########
@@ -639,7 +639,10 @@ private boolean deleteConfigDriveIso(final VirtualMachine vm) throws ResourceUna
if (location == Location.SECONDARY) {
dataStore = _dataStoreMgr.getImageStoreWithFreeCapacity(vm.getDataCenterId());
- agentId = findAgentIdForImageStore(dataStore);
+ if (!VirtualMachineManager.VmConfigDriveOnPrimaryPool.valueIn(vm.getDataCenterId()) &&
+ !VirtualMachineManager.VmConfigDriveForceHostCacheUse.valueIn(vm.getDataCenterId()) && dataStore != null) {
+ agentId = findAgentIdForImageStore(dataStore);
+ }
Review comment:
But, these settings doesn't indicate the VM config drive on primary store or host cache. What if these are changed after VM creation? Only when deploying a VM, this settings help to choose the config drive location.
--
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] Pearl1594 commented on a change in pull request #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on a change in pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#discussion_r831037435
##########
File path: server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
##########
@@ -639,7 +639,10 @@ private boolean deleteConfigDriveIso(final VirtualMachine vm) throws ResourceUna
if (location == Location.SECONDARY) {
dataStore = _dataStoreMgr.getImageStoreWithFreeCapacity(vm.getDataCenterId());
- agentId = findAgentIdForImageStore(dataStore);
+ if (!VirtualMachineManager.VmConfigDriveOnPrimaryPool.valueIn(vm.getDataCenterId()) &&
+ !VirtualMachineManager.VmConfigDriveForceHostCacheUse.valueIn(vm.getDataCenterId()) && dataStore != null) {
+ agentId = findAgentIdForImageStore(dataStore);
+ }
Review comment:
@sureshanaparti if case the config drive iso for the vm is on primary store or image cache, then there is no need to search for image store agent id . The logic is similar to https://github.com/apache/cloudstack/blob/main/server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java#L499-L502
--
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 merged pull request #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
weizhouapache merged pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146
--
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 a change in pull request #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#discussion_r831033305
##########
File path: server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
##########
@@ -639,7 +639,10 @@ private boolean deleteConfigDriveIso(final VirtualMachine vm) throws ResourceUna
if (location == Location.SECONDARY) {
dataStore = _dataStoreMgr.getImageStoreWithFreeCapacity(vm.getDataCenterId());
- agentId = findAgentIdForImageStore(dataStore);
+ if (!VirtualMachineManager.VmConfigDriveOnPrimaryPool.valueIn(vm.getDataCenterId()) &&
+ !VirtualMachineManager.VmConfigDriveForceHostCacheUse.valueIn(vm.getDataCenterId()) && dataStore != null) {
+ agentId = findAgentIdForImageStore(dataStore);
Review comment:
@Pearl1594 will `agentId` be null if the conditions do not match ?
--
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] Pearl1594 commented on a change in pull request #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on a change in pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#discussion_r831036457
##########
File path: server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
##########
@@ -639,7 +639,10 @@ private boolean deleteConfigDriveIso(final VirtualMachine vm) throws ResourceUna
if (location == Location.SECONDARY) {
dataStore = _dataStoreMgr.getImageStoreWithFreeCapacity(vm.getDataCenterId());
- agentId = findAgentIdForImageStore(dataStore);
+ if (!VirtualMachineManager.VmConfigDriveOnPrimaryPool.valueIn(vm.getDataCenterId()) &&
+ !VirtualMachineManager.VmConfigDriveForceHostCacheUse.valueIn(vm.getDataCenterId()) && dataStore != null) {
+ agentId = findAgentIdForImageStore(dataStore);
Review comment:
yes @weizhouapache it could be null - and it's handled by https://github.com/apache/cloudstack/blob/main/server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java#L651 - however, this exception, doesn't prevent the deletion of the VM
--
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 a change in pull request #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#discussion_r831060593
##########
File path: server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
##########
@@ -639,7 +639,10 @@ private boolean deleteConfigDriveIso(final VirtualMachine vm) throws ResourceUna
if (location == Location.SECONDARY) {
dataStore = _dataStoreMgr.getImageStoreWithFreeCapacity(vm.getDataCenterId());
- agentId = findAgentIdForImageStore(dataStore);
+ if (!VirtualMachineManager.VmConfigDriveOnPrimaryPool.valueIn(vm.getDataCenterId()) &&
+ !VirtualMachineManager.VmConfigDriveForceHostCacheUse.valueIn(vm.getDataCenterId()) && dataStore != null) {
+ agentId = findAgentIdForImageStore(dataStore);
+ }
Review comment:
agree with @sureshanaparti
it is better to check what do exist on primary, secondary or host.
--
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 #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#issuecomment-1079161009
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
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 a change in pull request #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
weizhouapache commented on a change in pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#discussion_r836505286
##########
File path: server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
##########
@@ -630,6 +630,10 @@ private DataStore getDatastoreForConfigDriveIso(DiskTO disk, VirtualMachineProfi
private boolean deleteConfigDriveIso(final VirtualMachine vm) throws ResourceUnavailableException {
Long hostId = (vm.getHostId() != null) ? vm.getHostId() : vm.getLastHostId();
Location location = getConfigDriveLocation(vm.getId());
Review comment:
@Pearl1594
move `Location location = getConfigDriveLocation(vm.getId());` to line 637 (just before `if (location == Location.HOST) {`) ?
--
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 #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#issuecomment-1080306241
@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
--
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] Pearl1594 commented on a change in pull request #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on a change in pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#discussion_r831102328
##########
File path: server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
##########
@@ -639,7 +639,10 @@ private boolean deleteConfigDriveIso(final VirtualMachine vm) throws ResourceUna
if (location == Location.SECONDARY) {
dataStore = _dataStoreMgr.getImageStoreWithFreeCapacity(vm.getDataCenterId());
- agentId = findAgentIdForImageStore(dataStore);
+ if (!VirtualMachineManager.VmConfigDriveOnPrimaryPool.valueIn(vm.getDataCenterId()) &&
+ !VirtualMachineManager.VmConfigDriveForceHostCacheUse.valueIn(vm.getDataCenterId()) && dataStore != null) {
+ agentId = findAgentIdForImageStore(dataStore);
+ }
Review comment:
got it @sureshanaparti @weizhouapache - I'll handle it Thanks.
--
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 #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#discussion_r831031676
##########
File path: server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
##########
@@ -639,7 +639,10 @@ private boolean deleteConfigDriveIso(final VirtualMachine vm) throws ResourceUna
if (location == Location.SECONDARY) {
dataStore = _dataStoreMgr.getImageStoreWithFreeCapacity(vm.getDataCenterId());
- agentId = findAgentIdForImageStore(dataStore);
+ if (!VirtualMachineManager.VmConfigDriveOnPrimaryPool.valueIn(vm.getDataCenterId()) &&
+ !VirtualMachineManager.VmConfigDriveForceHostCacheUse.valueIn(vm.getDataCenterId()) && dataStore != null) {
+ agentId = findAgentIdForImageStore(dataStore);
+ }
Review comment:
@Pearl1594 Any reason, why config drive deletion in secondary storage should depend on these settings _vm.configdrive.primarypool.enabled / vm.configdrive.use.host.cache.on.unsupported.pool_ (which are dynamic) ?
--
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 #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#discussion_r831031676
##########
File path: server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
##########
@@ -639,7 +639,10 @@ private boolean deleteConfigDriveIso(final VirtualMachine vm) throws ResourceUna
if (location == Location.SECONDARY) {
dataStore = _dataStoreMgr.getImageStoreWithFreeCapacity(vm.getDataCenterId());
- agentId = findAgentIdForImageStore(dataStore);
+ if (!VirtualMachineManager.VmConfigDriveOnPrimaryPool.valueIn(vm.getDataCenterId()) &&
+ !VirtualMachineManager.VmConfigDriveForceHostCacheUse.valueIn(vm.getDataCenterId()) && dataStore != null) {
+ agentId = findAgentIdForImageStore(dataStore);
+ }
Review comment:
@Pearl1594 Any reason, why config drive deletion should depend on these settings _vm.configdrive.primarypool.enabled / vm.configdrive.use.host.cache.on.unsupported.pool_ (which are dynamic) ?
--
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] Pearl1594 commented on a change in pull request #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on a change in pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#discussion_r831037435
##########
File path: server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
##########
@@ -639,7 +639,10 @@ private boolean deleteConfigDriveIso(final VirtualMachine vm) throws ResourceUna
if (location == Location.SECONDARY) {
dataStore = _dataStoreMgr.getImageStoreWithFreeCapacity(vm.getDataCenterId());
- agentId = findAgentIdForImageStore(dataStore);
+ if (!VirtualMachineManager.VmConfigDriveOnPrimaryPool.valueIn(vm.getDataCenterId()) &&
+ !VirtualMachineManager.VmConfigDriveForceHostCacheUse.valueIn(vm.getDataCenterId()) && dataStore != null) {
+ agentId = findAgentIdForImageStore(dataStore);
+ }
Review comment:
@sureshanaparti if case the config drive iso for the vm is on primary store or image cache, then there is no need to search for image store agent id ..
--
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 #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#issuecomment-1080985154
<b>Trillian test result (tid-3732)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 36691 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6146-t3732-kvm-centos7.zip
Smoke tests completed. 92 look OK, 0 have errors
Only failed tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
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 #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#issuecomment-1079565371
<b>Trillian test result (tid-3726)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 35622 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6146-t3726-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_primary_storage.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
--
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 #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#discussion_r831040131
##########
File path: server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
##########
@@ -639,7 +639,10 @@ private boolean deleteConfigDriveIso(final VirtualMachine vm) throws ResourceUna
if (location == Location.SECONDARY) {
dataStore = _dataStoreMgr.getImageStoreWithFreeCapacity(vm.getDataCenterId());
- agentId = findAgentIdForImageStore(dataStore);
+ if (!VirtualMachineManager.VmConfigDriveOnPrimaryPool.valueIn(vm.getDataCenterId()) &&
+ !VirtualMachineManager.VmConfigDriveForceHostCacheUse.valueIn(vm.getDataCenterId()) && dataStore != null) {
+ agentId = findAgentIdForImageStore(dataStore);
+ }
Review comment:
> But, these settings doesn't indicate the VM config drive on primary store or host cache. What if these are changed after VM creation? Only when deploying a VM, this settings help to choose the config drive location.
--
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 #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#discussion_r831039366
##########
File path: server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
##########
@@ -639,7 +639,10 @@ private boolean deleteConfigDriveIso(final VirtualMachine vm) throws ResourceUna
if (location == Location.SECONDARY) {
dataStore = _dataStoreMgr.getImageStoreWithFreeCapacity(vm.getDataCenterId());
- agentId = findAgentIdForImageStore(dataStore);
+ if (!VirtualMachineManager.VmConfigDriveOnPrimaryPool.valueIn(vm.getDataCenterId()) &&
+ !VirtualMachineManager.VmConfigDriveForceHostCacheUse.valueIn(vm.getDataCenterId()) && dataStore != null) {
+ agentId = findAgentIdForImageStore(dataStore);
+ }
Review comment:
But, these settings doesn't indicate the VM config drive on primary store or host cache. What if these are changed after VM creation?
--
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 #6146: configDrive: Fix failure to delete (unstarted) VM
Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #6146:
URL: https://github.com/apache/cloudstack/pull/6146#issuecomment-1080305935
@blueorangutan test
--
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