You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "borisstoyanov (via GitHub)" <gi...@apache.org> on 2023/02/11 07:29:14 UTC

[GitHub] [cloudstack] borisstoyanov opened a new issue, #7196: systemvm/VR Volumes left in Destroy state after pool set to maintenance

borisstoyanov opened a new issue, #7196:
URL: https://github.com/apache/cloudstack/issues/7196

   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and main branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete the comments.
   -->
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
    
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   VR, SSVM, storage
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on main branch.
   -->
   
   ~~~
   4.18
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, advanced networking, etc.  N/A otherwise
   -->
   NFS storage, but could be others as well, discovered with KVM
   
   
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   When a primary pool is set to prepare for maintenance and there are running system-vms and/or VRs  volumes on it, it fails to destroy the remaining volumes on storage, therefore pool not removable and volume still present.
   
   They appear in Destroy state which does not go into Expunged. 
   In my env I get 
   ```
   mysql> select id,state,pool_id,removed,name,vm_id,vm_name from volume_view;
   +----+----------+---------+---------------------+--------+-------+-----------------------------------------+
   | id | state    | pool_id | removed             | name   | vm_id | vm_name                                 |
   +----+----------+---------+---------------------+--------+-------+-----------------------------------------+
   |  1 | Ready    |       2 | NULL                | ROOT-1 |     1 | s-1-VM                                  |
   |  2 | Destroy  |       1 | NULL                | ROOT-2 |     2 | v-2-VM                                  |
   |  3 | Expunged |       1 | 2023-02-11 07:00:24 | ROOT-3 |  NULL | NULL                                    |
   |  4 | Destroy  |       1 | NULL                | ROOT-4 |     4 | r-4-VM                                  |
   |  5 | Ready    |       2 | NULL                | ROOT-2 |     2 | v-2-VM                                  |
   |  6 | Ready    |       2 | NULL                | ROOT-4 |     4 | r-4-VM                                  |
   |  7 | Ready    |       2 | NULL                | ROOT-3 |     3 | VM-5b0a2d7b-ed32-4d33-b13e-ccc609210540 |
   +----+----------+---------+---------------------+--------+-------+-----------------------------------------+
   7 rows in set (0.00 sec)
   ``` 
   
   and expunge delay and wait settings are both on 100, so I would've expected within 5 mins those to get Expunge, but they never do. 
   
   Also in UI:
   
   ![Screenshot 2023-02-11 at 9 18 24](https://user-images.githubusercontent.com/13551960/218246218-8dbfd040-5c4a-471b-a8fe-954ee39ae6db.png)
   
   
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   
   <!-- Paste example playbooks or commands between quotes below -->
   ~~~
   Run 2 or more NFS pools
   Create VR and systemvms on one of the pools
   Set the pool to maintenance
   Observe the systemvms and VR are migrated, but old volumes still present
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   Old volumes should be removed 
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   They are still there
   ~~~
   
   ##### Workaround: 
   
   I guess the workaround is to manually check the leftover volumes are migrated successfully to other storage and if they systemvm/VR their VMs are running. Then I think it's safe to manually delete them on storage and set the state to 'Expunge' and removed  to now() with mysql. 
   


-- 
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.apache.org

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


[GitHub] [cloudstack] weizhouapache commented on issue #7196: systemvm/VR Volumes left in Destroy state after pool set to maintenance

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #7196:
URL: https://github.com/apache/cloudstack/issues/7196#issuecomment-1538242840

   this cannot be reproduced, closing 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] weizhouapache commented on issue #7196: systemvm/VR Volumes left in Destroy state after pool set to maintenance

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #7196:
URL: https://github.com/apache/cloudstack/issues/7196#issuecomment-1426662712

   Thanks Bobby @borisstoyanov 
   Have you tested running user vms ?


-- 
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 closed issue #7196: systemvm/VR Volumes left in Destroy state after pool set to maintenance

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache closed issue #7196: systemvm/VR Volumes left in Destroy state after pool set to maintenance 
URL: https://github.com/apache/cloudstack/issues/7196


-- 
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 issue #7196: systemvm/VR Volumes left in Destroy state after pool set to maintenance

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #7196:
URL: https://github.com/apache/cloudstack/issues/7196#issuecomment-1427595969

   Thanks Bobby @borisstoyanov 
   
   I can reproduce the issue in 4.18. The volume should be expunged by background task.
   it seems like a regression caused by #6868 
   
   https://github.com/apache/cloudstack/pull/6868/files#diff-cf68e132ad7711cfa9250cda5819c09f51cba9933aa595cd82ad5a02b4edbe64R1331-R1338
   
   ```
                           if (Type.ROOT.equals(vol.getVolumeType())) {
                                VMInstanceVO vmInstanceVO = _vmInstanceDao.findById(vol.getInstanceId());
                                if (vmInstanceVO != null && vmInstanceVO.getState() == State.Destroyed) {
                                    s_logger.debug(String.format("ROOT volume [%s] will not be expunged because the VM is [%s], therefore this volume will be expunged with the VM"
                                            + " cleanup job.", vol.getUuid(), vmInstanceVO.getState()));
                                    continue;
                                }
                           }
   ```
   
   I will look into 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] weizhouapache commented on issue #7196: systemvm/VR Volumes left in Destroy state after pool set to maintenance

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #7196:
URL: https://github.com/apache/cloudstack/issues/7196#issuecomment-1427626616

   @borisstoyanov 
   after restarting mgmt server with new global settings, it seems to be working
   ![image](https://user-images.githubusercontent.com/57355700/218423176-f7e78826-295a-4048-914c-6ede0fd63544.png)
   
   


-- 
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] borisstoyanov commented on issue #7196: systemvm/VR Volumes left in Destroy state after pool set to maintenance

Posted by "borisstoyanov (via GitHub)" <gi...@apache.org>.
borisstoyanov commented on issue #7196:
URL: https://github.com/apache/cloudstack/issues/7196#issuecomment-1426685780

   They don’t get migrated when you maintenance a pool. They get stopped.
   
   On Sat, 11 Feb 2023 at 10:40, Wei Zhou ***@***.***> wrote:
   
   > Thanks Bobby @borisstoyanov <https://github.com/borisstoyanov>
   > Have you tested running user vms ?
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/cloudstack/issues/7196#issuecomment-1426662712>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/ADHMSWBUEWDODWVELP5QOA3WW5F7XANCNFSM6AAAAAAUYRVDGQ>
   > .
   > You are receiving this because you were mentioned.Message 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] weizhouapache commented on issue #7196: systemvm/VR Volumes left in Destroy state after pool set to maintenance

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #7196:
URL: https://github.com/apache/cloudstack/issues/7196#issuecomment-1427633770

   @borisstoyanov 
   can you restart the mgmt server and wait a while to seem if volumes are Expunged ?


-- 
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] harikrishna-patnala commented on issue #7196: systemvm/VR Volumes left in Destroy state after pool set to maintenance

Posted by "harikrishna-patnala (via GitHub)" <gi...@apache.org>.
harikrishna-patnala commented on issue #7196:
URL: https://github.com/apache/cloudstack/issues/7196#issuecomment-1469401440

   @weizhouapache @borisstoyanov I've tested the scenario and it seems to be working as expected.
   
   I've set the storage.cleanup.delay and storage.cleanup.interval to 100 seconds and the old volumes get expunged 
   
   ![image](https://user-images.githubusercontent.com/3348673/225221939-5e983190-e60f-44c9-8726-156385733727.png)
   
   I think you have set expunge.delay and expunge.interval, but those wrt VMs


-- 
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