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/09/21 11:15:28 UTC
[GitHub] [cloudstack] davidjumani opened a new pull request, #6755: Feature: Safely shutdown cloudstack
davidjumani opened a new pull request, #6755:
URL: https://github.com/apache/cloudstack/pull/6755
### Description
Adds the feature to safely shutdown CloudStack
It does the following :
- Prevents new Async jobs from being added
- Waits for existing jobs to finish before shutting down
Contains 4 new apis :
- TriggerShutdown - Prevents new jobs and shuts down once all pending jobs are completed
- ReadyForShutdown - Returns whether a shutdown has been triggered and the no of pending jobs
- PrepareForShutdown - Prevents new jobs from being added but does not shutdown when there are zero pending jobs : Useful when admin changes are required in ACS which can impact operations
- CancelShutdown - Cancel a shutdown if possible
### 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
- [ ] Major
- [x] Minor
### Screenshots (if appropriate):
![Screenshot from 2022-09-21 16-44-55](https://user-images.githubusercontent.com/8244774/191490193-cd17251a-b60a-493e-a012-5c8e7fe5c43f.png)
### How Has This Been Tested?
TODO
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1254547859
UI build: :heavy_check_mark:
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6755 (SL-JID-2396)
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1439580339
@davidjumani 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] blueorangutan commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1473589545
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 5741
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1296574464
@acs-robot a Jenkins job has been kicked to build UI QA env. 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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1327396962
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 4647
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1492377677
<b>Trillian test result (tid-6345)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 43283 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6755-t6345-kvm-centos7.zip
Smoke tests completed. 109 look OK, 0 have errors, 0 did not run
Only failed and skipped 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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1331704049
@davidjumani 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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1296676699
Packaging result: :heavy_multiplication_x: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 4592
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1305370329
@acs-robot a Jenkins job has been kicked to build UI QA env. 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] acs-robot commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
acs-robot commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1305368512
Found UI changes, kicking a new UI QA build
@blueorangutan ui
--
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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1491265093
@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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1438554088
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [18 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![0.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.3%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [0.3% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1438775866
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [18 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![0.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.3%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [0.3% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1439519920
@davidjumani 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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1506305058
Thanks @rohityadavcloud I'll create a PR to address this
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1330236070
UI build: :heavy_multiplication_x:
(SL-JID-2649)
--
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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1253623530
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![C](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/C-16px.png 'C')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![0.8%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.8%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [0.8% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![11.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20-16px.png '11.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [11.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1254543595
@acs-robot a Jenkins job has been kicked to build UI QA env. 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] codecov[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1296720880
# [Codecov](https://codecov.io/gh/apache/cloudstack/pull/6755?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#6755](https://codecov.io/gh/apache/cloudstack/pull/6755?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f851091) into [main](https://codecov.io/gh/apache/cloudstack/commit/434f15a9b29d788ca9ba7108ebfd81763ab3f356?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (434f15a) will **increase** coverage by `0.43%`.
> The diff coverage is `33.68%`.
```diff
@@ Coverage Diff @@
## main #6755 +/- ##
============================================
+ Coverage 10.42% 10.85% +0.43%
- Complexity 6701 7117 +416
============================================
Files 2458 2491 +33
Lines 243246 245512 +2266
Branches 38067 38331 +264
============================================
+ Hits 25358 26654 +1296
- Misses 214713 215584 +871
- Partials 3175 3274 +99
```
| [Impacted Files](https://codecov.io/gh/apache/cloudstack/pull/6755?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ache/cloudstack/api/command/CancelShutdownCmd.java](https://codecov.io/gh/apache/cloudstack/pull/6755/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGx1Z2lucy9zaHV0ZG93bi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvY2xvdWRzdGFjay9hcGkvY29tbWFuZC9DYW5jZWxTaHV0ZG93bkNtZC5qYXZh) | `0.00% <0.00%> (ø)` | |
| [.../cloudstack/api/command/PrepareForShutdownCmd.java](https://codecov.io/gh/apache/cloudstack/pull/6755/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGx1Z2lucy9zaHV0ZG93bi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvY2xvdWRzdGFjay9hcGkvY29tbWFuZC9QcmVwYXJlRm9yU2h1dGRvd25DbWQuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...he/cloudstack/api/command/ReadyForShutdownCmd.java](https://codecov.io/gh/apache/cloudstack/pull/6755/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGx1Z2lucy9zaHV0ZG93bi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvY2xvdWRzdGFjay9hcGkvY29tbWFuZC9SZWFkeUZvclNodXRkb3duQ21kLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...che/cloudstack/api/command/TriggerShutdownCmd.java](https://codecov.io/gh/apache/cloudstack/pull/6755/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGx1Z2lucy9zaHV0ZG93bi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvY2xvdWRzdGFjay9hcGkvY29tbWFuZC9UcmlnZ2VyU2h1dGRvd25DbWQuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...pache/cloudstack/shutdown/ShutdownManagerImpl.java](https://codecov.io/gh/apache/cloudstack/pull/6755/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGx1Z2lucy9zaHV0ZG93bi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvY2xvdWRzdGFjay9zaHV0ZG93bi9TaHV0ZG93bk1hbmFnZXJJbXBsLmphdmE=) | `54.54% <54.54%> (ø)` | |
| [...udstack/api/response/ReadyForShutdownResponse.java](https://codecov.io/gh/apache/cloudstack/pull/6755/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGx1Z2lucy9zaHV0ZG93bi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvY2xvdWRzdGFjay9hcGkvcmVzcG9uc2UvUmVhZHlGb3JTaHV0ZG93blJlc3BvbnNlLmphdmE=) | `57.14% <57.14%> (ø)` | |
| [...rce/wrapper/LibvirtResizeVolumeCommandWrapper.java](https://codecov.io/gh/apache/cloudstack/pull/6755/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGx1Z2lucy9oeXBlcnZpc29ycy9rdm0vc3JjL21haW4vamF2YS9jb20vY2xvdWQvaHlwZXJ2aXNvci9rdm0vcmVzb3VyY2Uvd3JhcHBlci9MaWJ2aXJ0UmVzaXplVm9sdW1lQ29tbWFuZFdyYXBwZXIuamF2YQ==) | `49.50% <0.00%> (-27.17%)` | :arrow_down: |
| [...org/apache/cloudstack/quota/vo/QuotaBalanceVO.java](https://codecov.io/gh/apache/cloudstack/pull/6755/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZnJhbWV3b3JrL3F1b3RhL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jbG91ZHN0YWNrL3F1b3RhL3ZvL1F1b3RhQmFsYW5jZVZPLmphdmE=) | `28.20% <0.00%> (-17.95%)` | :arrow_down: |
| [.../cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java](https://codecov.io/gh/apache/cloudstack/pull/6755/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGx1Z2lucy9oeXBlcnZpc29ycy9rdm0vc3JjL21haW4vamF2YS9jb20vY2xvdWQvaHlwZXJ2aXNvci9rdm0vc3RvcmFnZS9LVk1QaHlzaWNhbERpc2suamF2YQ==) | `70.45% <0.00%> (-10.80%)` | :arrow_down: |
| [...pper/LibvirtPrepareForMigrationCommandWrapper.java](https://codecov.io/gh/apache/cloudstack/pull/6755/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGx1Z2lucy9oeXBlcnZpc29ycy9rdm0vc3JjL21haW4vamF2YS9jb20vY2xvdWQvaHlwZXJ2aXNvci9rdm0vcmVzb3VyY2Uvd3JhcHBlci9MaWJ2aXJ0UHJlcGFyZUZvck1pZ3JhdGlvbkNvbW1hbmRXcmFwcGVyLmphdmE=) | `43.10% <0.00%> (-10.09%)` | :arrow_down: |
| ... and [155 more](https://codecov.io/gh/apache/cloudstack/pull/6755/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1296613843
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![C](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/C-16px.png 'C')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![29.5%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/25-16px.png '29.5%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [29.5% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![7.5%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/10-16px.png '7.5%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [7.5% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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] github-actions[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1455532872
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
--
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] github-actions[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1502953009
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
--
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] davidjumani commented on a diff in pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on code in PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#discussion_r1138364228
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/shutdown/ShutdownManagerImpl.java:
##########
@@ -0,0 +1,252 @@
+// 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.shutdown;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.api.command.CancelShutdownCmd;
+import org.apache.cloudstack.api.command.PrepareForShutdownCmd;
+import org.apache.cloudstack.api.command.ReadyForShutdownCmd;
+import org.apache.cloudstack.api.command.TriggerShutdownCmd;
+import org.apache.cloudstack.api.response.ReadyForShutdownResponse;
+import org.apache.cloudstack.framework.jobs.AsyncJobManager;
+import org.apache.cloudstack.management.ManagementServerHost.State;
+import org.apache.cloudstack.shutdown.command.CancelShutdownManagementServerHostCommand;
+import org.apache.cloudstack.shutdown.command.PrepareForShutdownManagementServerHostCommand;
+import org.apache.cloudstack.shutdown.command.TriggerShutdownManagementServerHostCommand;
+import org.apache.cloudstack.utils.identity.ManagementServerNode;
+import org.apache.log4j.Logger;
+
+import com.cloud.agent.api.Command;
+import com.cloud.cluster.ClusterManager;
+import com.cloud.cluster.ManagementServerHostVO;
+import com.cloud.cluster.dao.ManagementServerHostDao;
+import com.cloud.serializer.GsonHelper;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.component.PluggableService;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.gson.Gson;
+
+public class ShutdownManagerImpl extends ManagerBase implements ShutdownManager, PluggableService{
+
+ private static Logger logger = Logger.getLogger(ShutdownManagerImpl.class);
+ Gson gson;
+
+ @Inject
+ private AsyncJobManager jobManager;
+ @Inject
+ private ManagementServerHostDao msHostDao;
+ @Inject
+ private ClusterManager clusterManager;
+
+ private boolean shutdownTriggered = false;
+ private boolean preparingForShutdown = false;
+
+ private Timer timer = new Timer();
+ private TimerTask shutdownTask;
+
+ protected ShutdownManagerImpl() {
+ super();
+ gson = GsonHelper.getGson();
+ }
+
+ @Override
+ public boolean isShutdownTriggered() {
+ return shutdownTriggered;
+ }
+
+ @Override
+ public boolean isPreparingForShutdown() {
+ return preparingForShutdown;
+ }
+
+ @Override
+ public long countPendingJobs(Long... msIds) {
+ return jobManager.countPendingNonPseudoJobs(msIds);
+ }
+
+ @Override
+ public void triggerShutdown() {
+ if (this.shutdownTriggered) {
+ throw new CloudRuntimeException("A shutdown has already been triggered");
+ }
+ this.shutdownTriggered = true;
+ prepareForShutdown(true);
+ }
+
+ private void prepareForShutdown(boolean postTrigger) {
+ // Ensure we don't throw an error if triggering a shutdown after just preparing for it
+ if (!postTrigger && this.preparingForShutdown) {
+ throw new CloudRuntimeException("A shutdown has already been triggered");
+ }
+ this.preparingForShutdown = true;
+ jobManager.disableAsyncJobs();
+ if (this.shutdownTask != null) {
+ this.shutdownTask.cancel();
+ this.shutdownTask = null;
+ }
+ this.shutdownTask = new ShutdownTask(this);
+ timer.scheduleAtFixedRate(shutdownTask, 0, 30 * 1000);
+ }
+
+ @Override
+ public void prepareForShutdown() {
+ prepareForShutdown(false);
+ }
+
+ @Override
+ public void cancelShutdown() {
+ if (!this.preparingForShutdown) {
+ throw new CloudRuntimeException("A shutdown has not been triggered");
+ }
+
+ this.preparingForShutdown = false;
+ this.shutdownTriggered = false;
+ jobManager.enableAsyncJobs();
+ if (shutdownTask != null) {
+ shutdownTask.cancel();
+ }
+ shutdownTask = null;
+ }
+
+ @Override
+ public ReadyForShutdownResponse readyForShutdown(Long managementserverid) {
+ Long[] msIds = null;
+ boolean shutdownTriggered = this.shutdownTriggered;
+ if (managementserverid == null) {
+ List<ManagementServerHostVO> msHosts = msHostDao.listBy(State.ShuttingDown, State.PreparingToShutDown, State.ReadyToShutDown);
+ if (msHosts != null && !msHosts.isEmpty()) {
+ msIds = new Long[msHosts.size()];
+ for (int i = 0; i < msHosts.size(); i++) {
+ msIds[i] = msHosts.get(i).getMsid();
+ }
+ shutdownTriggered = !msHosts.isEmpty();
+ }
+ } else {
+ msIds = new Long[]{msHostDao.findById(managementserverid).getMsid()};
+ }
+ long pendingJobCount = countPendingJobs(msIds);
+ return new ReadyForShutdownResponse(managementserverid, shutdownTriggered, pendingJobCount == 0, pendingJobCount);
+ }
+
+ @Override
+ public ReadyForShutdownResponse readyForShutdown(ReadyForShutdownCmd cmd) {
+ return readyForShutdown(cmd.getMsId());
+ }
+
+ @Override
+ public ReadyForShutdownResponse prepareForShutdown(PrepareForShutdownCmd cmd) {
+ ManagementServerHostVO msHost = msHostDao.findById(cmd.getMsId());
+ final Command[] cmds = new Command[1];
+ cmds[0] = new PrepareForShutdownManagementServerHostCommand(msHost.getMsid());
+ String result = clusterManager.execute(String.valueOf(msHost.getMsid()), 0, gson.toJson(cmds), true);
+ logger.info("PrepareForShutdownCmd result : " + result);
+
+ msHost.setState(State.PreparingToShutDown);
+ msHostDao.persist(msHost);
+
+ return readyForShutdown(cmd.getMsId());
+ }
+
+ @Override
+ public ReadyForShutdownResponse triggerShutdown(TriggerShutdownCmd cmd) {
+ ManagementServerHostVO msHost = msHostDao.findById(cmd.getMsId());
+ final Command[] cmds = new Command[1];
+ cmds[0] = new TriggerShutdownManagementServerHostCommand(msHost.getMsid());
+ String result = clusterManager.execute(String.valueOf(msHost.getMsid()), 0, gson.toJson(cmds), true);
+ logger.info("TriggerShutdownCmd result : " + result);
+
+ msHost.setState(State.ShuttingDown);
+ msHostDao.persist(msHost);
+
+ return readyForShutdown(cmd.getMsId());
+ }
+
+ @Override
+ public ReadyForShutdownResponse cancelShutdown(CancelShutdownCmd cmd) {
+ ManagementServerHostVO msHost = msHostDao.findById(cmd.getMsId());
+ final Command[] cmds = new Command[1];
+ cmds[0] = new CancelShutdownManagementServerHostCommand(msHost.getMsid());
+ String result = clusterManager.execute(String.valueOf(msHost.getMsid()), 0, gson.toJson(cmds), true);
+ logger.info("CancelShutdownCmd result : " + result);
+
+ msHost.setState(State.Up);
+ msHostDao.persist(msHost);
+
+ return readyForShutdown(cmd.getMsId());
+ }
+
+ @Override
+ public List<Class<?>> getCommands() {
+ final List<Class<?>> cmdList = new ArrayList<>();
+ cmdList.add(CancelShutdownCmd.class);
+ cmdList.add(PrepareForShutdownCmd.class);
+ cmdList.add(ReadyForShutdownCmd.class);
+ cmdList.add(TriggerShutdownCmd.class);
+ return cmdList;
+ }
+
+ private final class ShutdownTask extends TimerTask {
+
+ private ShutdownManager shutdownManager;
+
+ public ShutdownTask(ShutdownManager shutdownManager) {
+ this.shutdownManager = shutdownManager;
+ }
+
+ @Override
+ public void run() {
+ try {
+ Long totalPendingJobs = shutdownManager.countPendingJobs(ManagementServerNode.getManagementServerId());
+ String msg = String.format("Checking for triggered shutdown... shutdownTriggered [%b] AllowAsyncJobs [%b] PendingJobCount [%d]",
+ shutdownManager.isShutdownTriggered(), shutdownManager.isPreparingForShutdown(), totalPendingJobs);
+ logger.info(msg);
+
+ // If the shutdown has been cancelled
+ if (!shutdownManager.isPreparingForShutdown()) {
+ logger.info("Shutdown cancelled. Terminating the shutdown timer task");
+ this.cancel();
+ return;
+ }
+
+ // No more pending jobs. Good to terminate
+ if (totalPendingJobs == 0) {
+ if (shutdownManager.isShutdownTriggered()) {
+ logger.info("Shutting down now");
+ System.exit(0);
+ }
+ if (shutdownManager.isPreparingForShutdown()) {
+ logger.info("Ready to shutdown");
+ ManagementServerHostVO msHost = msHostDao.findByMsid(ManagementServerNode.getManagementServerId());
+ msHost.setState(State.ReadyToShutDown);
+ msHostDao.persist(msHost);
+ }
+ }
+
+ logger.info("Pending jobs. Trying again later");
+ } catch (final Exception e) {
Review Comment:
IMO yes as this runs as an independent thread so it would be good to catch and log
--
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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1486491675
@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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1505046100
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![13.6%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '13.6%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [13.6% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1305381398
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![C](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/C-16px.png 'C')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![28.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/25-16px.png '28.3%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [28.3% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![7.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/10-16px.png '7.4%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [7.4% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1305288176
@acs-robot a Jenkins job has been kicked to build UI QA env. 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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1331744976
Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 4692
--
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] acs-robot commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
acs-robot commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1254543239
Found UI changes, kicking a new UI QA build
@blueorangutan ui
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1254551048
UI build: :heavy_check_mark:
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6755 (SL-JID-2397)
--
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] rohityadavcloud commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1505419098
Thanks, great feature. The banner background colour and text colour aren't in-line with our current AntD theme. Should this be warning (yellow) or error (red) for the message? https://antdv.com/components/alert/#Alert
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1485560950
<b>Trillian test result (tid-6320)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 38014 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6755-t6320-kvm-centos7.zip
Smoke tests completed. 109 look OK, 0 have errors, 0 did not run
Only failed and skipped 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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1486587833
@davidjumani 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] blueorangutan commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1487262369
<b>Trillian test result (tid-6328)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 21691 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6755-t6328-kvm-centos7.zip
Smoke tests completed. 84 look OK, 0 have errors, 25 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
all_test_safe_shutdown | `Skipped` | --- | test_safe_shutdown.py
all_test_login | `Skipped` | --- | test_login.py
all_test_scale_vm | `Skipped` | --- | test_scale_vm.py
all_test_metrics_api | `Skipped` | --- | test_metrics_api.py
all_test_outofbandmanagement | `Skipped` | --- | test_outofbandmanagement.py
all_test_outofbandmanagement_nestedplugin | `Skipped` | --- | test_outofbandmanagement_nestedplugin.py
all_test_routers_iptables_default_policy | `Skipped` | --- | test_routers_iptables_default_policy.py
all_test_secondary_storage | `Skipped` | --- | test_secondary_storage.py
all_test_service_offerings | `Skipped` | --- | test_service_offerings.py
all_test_storage_policy | `Skipped` | --- | test_storage_policy.py
all_test_update_security_group | `Skipped` | --- | test_update_security_group.py
all_test_usage_events | `Skipped` | --- | test_usage_events.py
all_test_vm_autoscaling | `Skipped` | --- | test_vm_autoscaling.py
all_test_vm_deployment_planner | `Skipped` | --- | test_vm_deployment_planner.py
all_test_vm_life_cycle | `Skipped` | --- | test_vm_life_cycle.py
all_test_vm_lifecycle_unmanage_import | `Skipped` | --- | test_vm_lifecycle_unmanage_import.py
all_test_vm_snapshot_kvm | `Skipped` | --- | test_vm_snapshot_kvm.py
all_test_vm_snapshots | `Skipped` | --- | test_vm_snapshots.py
all_test_volumes | `Skipped` | --- | test_volumes.py
all_test_vpc_ipv6 | `Skipped` | --- | test_vpc_ipv6.py
all_test_vpc_redundant | `Skipped` | --- | test_vpc_redundant.py
all_test_vpc_router_nics | `Skipped` | --- | test_vpc_router_nics.py
all_test_vpc_vpn | `Skipped` | --- | test_vpc_vpn.py
all_test_host_maintenance | `Skipped` | --- | test_host_maintenance.py
all_test_hostha_kvm | `Skipped` | --- | test_hostha_kvm.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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1473291107
@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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1432643443
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![C](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/C-16px.png 'C')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![28.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/25-16px.png '28.3%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [28.3% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![7.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/10-16px.png '7.4%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [7.4% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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] acs-robot commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
acs-robot commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1296574284
Found UI changes, kicking a new UI QA build
@blueorangutan ui
--
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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1296586367
@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] blueorangutan commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1305046441
@davidjumani 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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1491317114
@davidjumani 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] blueorangutan commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1253561744
@acs-robot a Jenkins job has been kicked to build UI QA env. 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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1330204450
@davidjumani 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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1330204291
@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] DaanHoogland commented on a diff in pull request #6755: Feature: Safely shutdown cloudstack
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#discussion_r1109810420
##########
plugins/shutdown/src/test/java/org/apache/cloudstack/shutdown/ShutdownManagerImplTest.java:
##########
@@ -17,14 +17,14 @@
package org.apache.cloudstack.shutdown;
-import org.apache.cloudstack.api.response.ReadyForShutdownResponse;
+// import org.apache.cloudstack.api.response.ReadyForShutdownResponse;
Review Comment:
code in comment (but then again, still in draft ....)
--
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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1439574665
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![15.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '15.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [15.0% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1486491946
@davidjumani 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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1437932897
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![C](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/C-16px.png 'C')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [2 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [30 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![0.8%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.8%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [0.8% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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] DaanHoogland commented on a diff in pull request #6755: Feature: Safely shutdown cloudstack
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#discussion_r1115415468
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/api/command/CancelShutdownCmd.java:
##########
@@ -0,0 +1,61 @@
+// 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;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.log4j.Logger;
+
+import com.cloud.user.Account;
+
+import org.apache.cloudstack.api.response.ReadyForShutdownResponse;
+import org.apache.cloudstack.acl.RoleType;
+
+@APICommand(name = CancelShutdownCmd.APINAME,
+ description = "Cancels a triggered shutdown",
+ responseObject = ReadyForShutdownResponse.class,
+ requestHasSensitiveInfo = false, responseHasSensitiveInfo = false,
+ authorized = {RoleType.Admin})
Review Comment:
any need for a since parameter?
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/api/command/PrepareForShutdownCmd.java:
##########
@@ -0,0 +1,60 @@
+// 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;
+
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.log4j.Logger;
+
+import com.cloud.user.Account;
+
+import org.apache.cloudstack.api.response.ReadyForShutdownResponse;
+import org.apache.cloudstack.acl.RoleType;
+
+@APICommand(name = PrepareForShutdownCmd.APINAME,
+ description = "Prepares CloudStack for a safe manual shutdown by preventing new jobs from being accepted",
+ responseObject = ReadyForShutdownResponse.class,
+ requestHasSensitiveInfo = false, responseHasSensitiveInfo = false,
+ authorized = {RoleType.Admin})
Review Comment:
since?
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/api/command/ReadyForShutdownCmd.java:
##########
@@ -0,0 +1,79 @@
+// 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;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.response.ManagementServerResponse;
+import org.apache.cloudstack.api.response.ReadyForShutdownResponse;
+import org.apache.cloudstack.shutdown.ShutdownManager;
+import org.apache.log4j.Logger;
+import com.cloud.user.Account;
+
+@APICommand(name = ReadyForShutdownCmd.APINAME,
+ description = "Returs the status of CloudStack, whether a shutdown has been triggered and if ready to shutdown",
+ responseObject = ReadyForShutdownResponse.class,
+ requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
Review Comment:
since?
##########
api/src/main/java/org/apache/cloudstack/api/response/AsyncJobResponse.java:
##########
@@ -71,6 +71,10 @@ public class AsyncJobResponse extends BaseResponse {
@Param(description = "the unique ID of the instance/entity object related to the job")
private String jobInstanceId;
+ @SerializedName("managementserverid")
+ @Param(description = "the msid of the management server on which the job is running")
Review Comment:
add a since parameter to the annotation?
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/shutdown/ShutdownManagerImpl.java:
##########
@@ -0,0 +1,252 @@
+// 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.shutdown;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.api.command.CancelShutdownCmd;
+import org.apache.cloudstack.api.command.PrepareForShutdownCmd;
+import org.apache.cloudstack.api.command.ReadyForShutdownCmd;
+import org.apache.cloudstack.api.command.TriggerShutdownCmd;
+import org.apache.cloudstack.api.response.ReadyForShutdownResponse;
+import org.apache.cloudstack.framework.jobs.AsyncJobManager;
+import org.apache.cloudstack.management.ManagementServerHost.State;
+import org.apache.cloudstack.shutdown.command.CancelShutdownManagementServerHostCommand;
+import org.apache.cloudstack.shutdown.command.PrepareForShutdownManagementServerHostCommand;
+import org.apache.cloudstack.shutdown.command.TriggerShutdownManagementServerHostCommand;
+import org.apache.cloudstack.utils.identity.ManagementServerNode;
+import org.apache.log4j.Logger;
+
+import com.cloud.agent.api.Command;
+import com.cloud.cluster.ClusterManager;
+import com.cloud.cluster.ManagementServerHostVO;
+import com.cloud.cluster.dao.ManagementServerHostDao;
+import com.cloud.serializer.GsonHelper;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.component.PluggableService;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.gson.Gson;
+
+public class ShutdownManagerImpl extends ManagerBase implements ShutdownManager, PluggableService{
+
+ private static Logger logger = Logger.getLogger(ShutdownManagerImpl.class);
+ Gson gson;
+
+ @Inject
+ private AsyncJobManager jobManager;
+ @Inject
+ private ManagementServerHostDao msHostDao;
+ @Inject
+ private ClusterManager clusterManager;
+
+ private boolean shutdownTriggered = false;
+ private boolean preparingForShutdown = false;
+
+ private Timer timer = new Timer();
+ private TimerTask shutdownTask;
+
+ protected ShutdownManagerImpl() {
+ super();
+ gson = GsonHelper.getGson();
+ }
+
+ @Override
+ public boolean isShutdownTriggered() {
+ return shutdownTriggered;
+ }
+
+ @Override
+ public boolean isPreparingForShutdown() {
+ return preparingForShutdown;
+ }
+
+ @Override
+ public long countPendingJobs(Long... msIds) {
+ return jobManager.countPendingNonPseudoJobs(msIds);
+ }
+
+ @Override
+ public void triggerShutdown() {
+ if (this.shutdownTriggered) {
+ throw new CloudRuntimeException("A shutdown has already been triggered");
+ }
+ this.shutdownTriggered = true;
+ prepareForShutdown(true);
+ }
+
+ private void prepareForShutdown(boolean postTrigger) {
+ // Ensure we don't throw an error if triggering a shutdown after just preparing for it
+ if (!postTrigger && this.preparingForShutdown) {
+ throw new CloudRuntimeException("A shutdown has already been triggered");
+ }
+ this.preparingForShutdown = true;
+ jobManager.disableAsyncJobs();
+ if (this.shutdownTask != null) {
+ this.shutdownTask.cancel();
+ this.shutdownTask = null;
+ }
+ this.shutdownTask = new ShutdownTask(this);
+ timer.scheduleAtFixedRate(shutdownTask, 0, 30 * 1000);
Review Comment:
```suggestion
timer.scheduleAtFixedRate(shutdownTask, 0, 30L * 1000);
```
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/shutdown/ShutdownManagerImpl.java:
##########
@@ -0,0 +1,252 @@
+// 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.shutdown;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.api.command.CancelShutdownCmd;
+import org.apache.cloudstack.api.command.PrepareForShutdownCmd;
+import org.apache.cloudstack.api.command.ReadyForShutdownCmd;
+import org.apache.cloudstack.api.command.TriggerShutdownCmd;
+import org.apache.cloudstack.api.response.ReadyForShutdownResponse;
+import org.apache.cloudstack.framework.jobs.AsyncJobManager;
+import org.apache.cloudstack.management.ManagementServerHost.State;
+import org.apache.cloudstack.shutdown.command.CancelShutdownManagementServerHostCommand;
+import org.apache.cloudstack.shutdown.command.PrepareForShutdownManagementServerHostCommand;
+import org.apache.cloudstack.shutdown.command.TriggerShutdownManagementServerHostCommand;
+import org.apache.cloudstack.utils.identity.ManagementServerNode;
+import org.apache.log4j.Logger;
+
+import com.cloud.agent.api.Command;
+import com.cloud.cluster.ClusterManager;
+import com.cloud.cluster.ManagementServerHostVO;
+import com.cloud.cluster.dao.ManagementServerHostDao;
+import com.cloud.serializer.GsonHelper;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.component.PluggableService;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.gson.Gson;
+
+public class ShutdownManagerImpl extends ManagerBase implements ShutdownManager, PluggableService{
+
+ private static Logger logger = Logger.getLogger(ShutdownManagerImpl.class);
+ Gson gson;
+
+ @Inject
+ private AsyncJobManager jobManager;
+ @Inject
+ private ManagementServerHostDao msHostDao;
+ @Inject
+ private ClusterManager clusterManager;
+
+ private boolean shutdownTriggered = false;
+ private boolean preparingForShutdown = false;
+
+ private Timer timer = new Timer();
+ private TimerTask shutdownTask;
+
+ protected ShutdownManagerImpl() {
+ super();
+ gson = GsonHelper.getGson();
+ }
+
+ @Override
+ public boolean isShutdownTriggered() {
+ return shutdownTriggered;
+ }
+
+ @Override
+ public boolean isPreparingForShutdown() {
+ return preparingForShutdown;
+ }
+
+ @Override
+ public long countPendingJobs(Long... msIds) {
+ return jobManager.countPendingNonPseudoJobs(msIds);
+ }
+
+ @Override
+ public void triggerShutdown() {
+ if (this.shutdownTriggered) {
+ throw new CloudRuntimeException("A shutdown has already been triggered");
+ }
+ this.shutdownTriggered = true;
+ prepareForShutdown(true);
+ }
+
+ private void prepareForShutdown(boolean postTrigger) {
+ // Ensure we don't throw an error if triggering a shutdown after just preparing for it
+ if (!postTrigger && this.preparingForShutdown) {
+ throw new CloudRuntimeException("A shutdown has already been triggered");
+ }
+ this.preparingForShutdown = true;
+ jobManager.disableAsyncJobs();
+ if (this.shutdownTask != null) {
+ this.shutdownTask.cancel();
+ this.shutdownTask = null;
+ }
+ this.shutdownTask = new ShutdownTask(this);
+ timer.scheduleAtFixedRate(shutdownTask, 0, 30 * 1000);
+ }
+
+ @Override
+ public void prepareForShutdown() {
+ prepareForShutdown(false);
+ }
+
+ @Override
+ public void cancelShutdown() {
+ if (!this.preparingForShutdown) {
+ throw new CloudRuntimeException("A shutdown has not been triggered");
+ }
+
+ this.preparingForShutdown = false;
+ this.shutdownTriggered = false;
+ jobManager.enableAsyncJobs();
+ if (shutdownTask != null) {
+ shutdownTask.cancel();
+ }
+ shutdownTask = null;
+ }
+
+ @Override
+ public ReadyForShutdownResponse readyForShutdown(Long managementserverid) {
+ Long[] msIds = null;
+ boolean shutdownTriggered = this.shutdownTriggered;
+ if (managementserverid == null) {
+ List<ManagementServerHostVO> msHosts = msHostDao.listBy(State.ShuttingDown, State.PreparingToShutDown, State.ReadyToShutDown);
+ if (msHosts != null && !msHosts.isEmpty()) {
+ msIds = new Long[msHosts.size()];
+ for (int i = 0; i < msHosts.size(); i++) {
+ msIds[i] = msHosts.get(i).getMsid();
+ }
+ shutdownTriggered = !msHosts.isEmpty();
+ }
+ } else {
+ msIds = new Long[]{msHostDao.findById(managementserverid).getMsid()};
+ }
+ long pendingJobCount = countPendingJobs(msIds);
+ return new ReadyForShutdownResponse(managementserverid, shutdownTriggered, pendingJobCount == 0, pendingJobCount);
+ }
+
+ @Override
+ public ReadyForShutdownResponse readyForShutdown(ReadyForShutdownCmd cmd) {
+ return readyForShutdown(cmd.getMsId());
+ }
+
+ @Override
+ public ReadyForShutdownResponse prepareForShutdown(PrepareForShutdownCmd cmd) {
+ ManagementServerHostVO msHost = msHostDao.findById(cmd.getMsId());
+ final Command[] cmds = new Command[1];
+ cmds[0] = new PrepareForShutdownManagementServerHostCommand(msHost.getMsid());
+ String result = clusterManager.execute(String.valueOf(msHost.getMsid()), 0, gson.toJson(cmds), true);
+ logger.info("PrepareForShutdownCmd result : " + result);
+
+ msHost.setState(State.PreparingToShutDown);
+ msHostDao.persist(msHost);
+
+ return readyForShutdown(cmd.getMsId());
+ }
+
+ @Override
+ public ReadyForShutdownResponse triggerShutdown(TriggerShutdownCmd cmd) {
+ ManagementServerHostVO msHost = msHostDao.findById(cmd.getMsId());
+ final Command[] cmds = new Command[1];
+ cmds[0] = new TriggerShutdownManagementServerHostCommand(msHost.getMsid());
+ String result = clusterManager.execute(String.valueOf(msHost.getMsid()), 0, gson.toJson(cmds), true);
+ logger.info("TriggerShutdownCmd result : " + result);
+
+ msHost.setState(State.ShuttingDown);
+ msHostDao.persist(msHost);
+
+ return readyForShutdown(cmd.getMsId());
+ }
+
+ @Override
+ public ReadyForShutdownResponse cancelShutdown(CancelShutdownCmd cmd) {
+ ManagementServerHostVO msHost = msHostDao.findById(cmd.getMsId());
+ final Command[] cmds = new Command[1];
+ cmds[0] = new CancelShutdownManagementServerHostCommand(msHost.getMsid());
+ String result = clusterManager.execute(String.valueOf(msHost.getMsid()), 0, gson.toJson(cmds), true);
+ logger.info("CancelShutdownCmd result : " + result);
+
+ msHost.setState(State.Up);
+ msHostDao.persist(msHost);
+
+ return readyForShutdown(cmd.getMsId());
+ }
+
+ @Override
+ public List<Class<?>> getCommands() {
+ final List<Class<?>> cmdList = new ArrayList<>();
+ cmdList.add(CancelShutdownCmd.class);
+ cmdList.add(PrepareForShutdownCmd.class);
+ cmdList.add(ReadyForShutdownCmd.class);
+ cmdList.add(TriggerShutdownCmd.class);
+ return cmdList;
+ }
+
+ private final class ShutdownTask extends TimerTask {
+
+ private ShutdownManager shutdownManager;
+
+ public ShutdownTask(ShutdownManager shutdownManager) {
+ this.shutdownManager = shutdownManager;
+ }
+
+ @Override
+ public void run() {
+ try {
+ Long totalPendingJobs = shutdownManager.countPendingJobs(ManagementServerNode.getManagementServerId());
+ String msg = String.format("Checking for triggered shutdown... shutdownTriggered [%b] AllowAsyncJobs [%b] PendingJobCount [%d]",
+ shutdownManager.isShutdownTriggered(), shutdownManager.isPreparingForShutdown(), totalPendingJobs);
+ logger.info(msg);
+
+ // If the shutdown has been cancelled
+ if (!shutdownManager.isPreparingForShutdown()) {
+ logger.info("Shutdown cancelled. Terminating the shutdown timer task");
+ this.cancel();
+ return;
+ }
+
+ // No more pending jobs. Good to terminate
+ if (totalPendingJobs == 0) {
+ if (shutdownManager.isShutdownTriggered()) {
+ logger.info("Shutting down now");
+ System.exit(0);
+ }
+ if (shutdownManager.isPreparingForShutdown()) {
+ logger.info("Ready to shutdown");
+ ManagementServerHostVO msHost = msHostDao.findByMsid(ManagementServerNode.getManagementServerId());
+ msHost.setState(State.ReadyToShutDown);
+ msHostDao.persist(msHost);
+ }
+ }
+
+ logger.info("Pending jobs. Trying again later");
+ } catch (final Exception e) {
Review Comment:
do we need to catch'em all?
##########
test/integration/smoke/test_safe_shutdown.py:
##########
@@ -0,0 +1,123 @@
+# 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.
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.lib.utils import *
+from marvin.lib.base import *
+from marvin.lib.common import *
+
+class TestLogin(cloudstackTestCase):
Review Comment:
this test stops/starts the MS and seems more of a component test than a smoke test to me. My take on this is that smoke test should be able to be executed in a life environment. What do you think?
##########
ui/src/components/page/GlobalLayout.vue:
##########
@@ -16,8 +16,12 @@
// under the License.
<template>
- <a-layout class="layout" :class="[device]">
- <a-affix style="z-index: 200">
+ <div>
+ <a-affix v-if="this.$store.getters.shutdownTriggered" >
+ <div class="shutdownHeader" v-html="$t('message.shutdown.triggered')"/>
+ </a-affix>
+ <a-layout class="layout" :class="[device]">
+ <a-affix style="z-index: 200" :offsetTop="this.$store.getters.shutdownTriggered ? 25 : 0">
Review Comment:
one more level of indentation?
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/api/command/TriggerShutdownCmd.java:
##########
@@ -0,0 +1,76 @@
+// 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;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.log4j.Logger;
+
+import com.cloud.user.Account;
+
+import org.apache.cloudstack.api.response.ReadyForShutdownResponse;
+import org.apache.cloudstack.acl.RoleType;
+
+@APICommand(name = TriggerShutdownCmd.APINAME,
+ description = "Triggers an automatic safe shutdown of CloudStack by not accepting new jobs and shutting down when all pending jobbs have been completed. Triggers an immediate shutdown if forced",
+ responseObject = ReadyForShutdownResponse.class,
+ requestHasSensitiveInfo = false, responseHasSensitiveInfo = false,
+ authorized = {RoleType.Admin})
Review Comment:
since?
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/shutdown/ShutdownManagerImpl.java:
##########
@@ -0,0 +1,252 @@
+// 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.shutdown;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.api.command.CancelShutdownCmd;
+import org.apache.cloudstack.api.command.PrepareForShutdownCmd;
+import org.apache.cloudstack.api.command.ReadyForShutdownCmd;
+import org.apache.cloudstack.api.command.TriggerShutdownCmd;
+import org.apache.cloudstack.api.response.ReadyForShutdownResponse;
+import org.apache.cloudstack.framework.jobs.AsyncJobManager;
+import org.apache.cloudstack.management.ManagementServerHost.State;
+import org.apache.cloudstack.shutdown.command.CancelShutdownManagementServerHostCommand;
+import org.apache.cloudstack.shutdown.command.PrepareForShutdownManagementServerHostCommand;
+import org.apache.cloudstack.shutdown.command.TriggerShutdownManagementServerHostCommand;
+import org.apache.cloudstack.utils.identity.ManagementServerNode;
+import org.apache.log4j.Logger;
+
+import com.cloud.agent.api.Command;
+import com.cloud.cluster.ClusterManager;
+import com.cloud.cluster.ManagementServerHostVO;
+import com.cloud.cluster.dao.ManagementServerHostDao;
+import com.cloud.serializer.GsonHelper;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.component.PluggableService;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.gson.Gson;
+
+public class ShutdownManagerImpl extends ManagerBase implements ShutdownManager, PluggableService{
+
+ private static Logger logger = Logger.getLogger(ShutdownManagerImpl.class);
+ Gson gson;
+
+ @Inject
+ private AsyncJobManager jobManager;
+ @Inject
+ private ManagementServerHostDao msHostDao;
+ @Inject
+ private ClusterManager clusterManager;
+
+ private boolean shutdownTriggered = false;
+ private boolean preparingForShutdown = false;
+
+ private Timer timer = new Timer();
+ private TimerTask shutdownTask;
+
+ protected ShutdownManagerImpl() {
+ super();
+ gson = GsonHelper.getGson();
+ }
+
+ @Override
+ public boolean isShutdownTriggered() {
+ return shutdownTriggered;
+ }
+
+ @Override
+ public boolean isPreparingForShutdown() {
+ return preparingForShutdown;
+ }
+
+ @Override
+ public long countPendingJobs(Long... msIds) {
+ return jobManager.countPendingNonPseudoJobs(msIds);
+ }
+
+ @Override
+ public void triggerShutdown() {
+ if (this.shutdownTriggered) {
+ throw new CloudRuntimeException("A shutdown has already been triggered");
+ }
+ this.shutdownTriggered = true;
+ prepareForShutdown(true);
+ }
+
+ private void prepareForShutdown(boolean postTrigger) {
+ // Ensure we don't throw an error if triggering a shutdown after just preparing for it
+ if (!postTrigger && this.preparingForShutdown) {
+ throw new CloudRuntimeException("A shutdown has already been triggered");
+ }
+ this.preparingForShutdown = true;
+ jobManager.disableAsyncJobs();
+ if (this.shutdownTask != null) {
+ this.shutdownTask.cancel();
+ this.shutdownTask = null;
+ }
+ this.shutdownTask = new ShutdownTask(this);
+ timer.scheduleAtFixedRate(shutdownTask, 0, 30 * 1000);
+ }
+
+ @Override
+ public void prepareForShutdown() {
+ prepareForShutdown(false);
+ }
+
+ @Override
+ public void cancelShutdown() {
+ if (!this.preparingForShutdown) {
+ throw new CloudRuntimeException("A shutdown has not been triggered");
+ }
+
+ this.preparingForShutdown = false;
+ this.shutdownTriggered = false;
+ jobManager.enableAsyncJobs();
+ if (shutdownTask != null) {
+ shutdownTask.cancel();
+ }
+ shutdownTask = null;
+ }
+
+ @Override
+ public ReadyForShutdownResponse readyForShutdown(Long managementserverid) {
+ Long[] msIds = null;
+ boolean shutdownTriggered = this.shutdownTriggered;
Review Comment:
sonar warns about this. Why not use `this.shutdownTriggered` in this method?
or use a different name if it has a different meaning?
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/shutdown/ShutdownManagerImpl.java:
##########
@@ -0,0 +1,252 @@
+// 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.shutdown;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.api.command.CancelShutdownCmd;
+import org.apache.cloudstack.api.command.PrepareForShutdownCmd;
+import org.apache.cloudstack.api.command.ReadyForShutdownCmd;
+import org.apache.cloudstack.api.command.TriggerShutdownCmd;
+import org.apache.cloudstack.api.response.ReadyForShutdownResponse;
+import org.apache.cloudstack.framework.jobs.AsyncJobManager;
+import org.apache.cloudstack.management.ManagementServerHost.State;
+import org.apache.cloudstack.shutdown.command.CancelShutdownManagementServerHostCommand;
+import org.apache.cloudstack.shutdown.command.PrepareForShutdownManagementServerHostCommand;
+import org.apache.cloudstack.shutdown.command.TriggerShutdownManagementServerHostCommand;
+import org.apache.cloudstack.utils.identity.ManagementServerNode;
+import org.apache.log4j.Logger;
+
+import com.cloud.agent.api.Command;
+import com.cloud.cluster.ClusterManager;
+import com.cloud.cluster.ManagementServerHostVO;
+import com.cloud.cluster.dao.ManagementServerHostDao;
+import com.cloud.serializer.GsonHelper;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.component.PluggableService;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.gson.Gson;
+
+public class ShutdownManagerImpl extends ManagerBase implements ShutdownManager, PluggableService{
+
+ private static Logger logger = Logger.getLogger(ShutdownManagerImpl.class);
+ Gson gson;
+
+ @Inject
+ private AsyncJobManager jobManager;
+ @Inject
+ private ManagementServerHostDao msHostDao;
+ @Inject
+ private ClusterManager clusterManager;
+
+ private boolean shutdownTriggered = false;
+ private boolean preparingForShutdown = false;
+
+ private Timer timer = new Timer();
+ private TimerTask shutdownTask;
+
+ protected ShutdownManagerImpl() {
+ super();
+ gson = GsonHelper.getGson();
+ }
+
+ @Override
+ public boolean isShutdownTriggered() {
+ return shutdownTriggered;
+ }
+
+ @Override
+ public boolean isPreparingForShutdown() {
+ return preparingForShutdown;
+ }
+
+ @Override
+ public long countPendingJobs(Long... msIds) {
+ return jobManager.countPendingNonPseudoJobs(msIds);
+ }
+
+ @Override
+ public void triggerShutdown() {
+ if (this.shutdownTriggered) {
+ throw new CloudRuntimeException("A shutdown has already been triggered");
+ }
+ this.shutdownTriggered = true;
+ prepareForShutdown(true);
+ }
+
+ private void prepareForShutdown(boolean postTrigger) {
+ // Ensure we don't throw an error if triggering a shutdown after just preparing for it
+ if (!postTrigger && this.preparingForShutdown) {
+ throw new CloudRuntimeException("A shutdown has already been triggered");
+ }
+ this.preparingForShutdown = true;
+ jobManager.disableAsyncJobs();
+ if (this.shutdownTask != null) {
+ this.shutdownTask.cancel();
+ this.shutdownTask = null;
+ }
+ this.shutdownTask = new ShutdownTask(this);
+ timer.scheduleAtFixedRate(shutdownTask, 0, 30 * 1000);
+ }
+
+ @Override
+ public void prepareForShutdown() {
+ prepareForShutdown(false);
+ }
+
+ @Override
+ public void cancelShutdown() {
+ if (!this.preparingForShutdown) {
+ throw new CloudRuntimeException("A shutdown has not been triggered");
+ }
+
+ this.preparingForShutdown = false;
+ this.shutdownTriggered = false;
+ jobManager.enableAsyncJobs();
+ if (shutdownTask != null) {
+ shutdownTask.cancel();
+ }
+ shutdownTask = null;
+ }
+
+ @Override
+ public ReadyForShutdownResponse readyForShutdown(Long managementserverid) {
+ Long[] msIds = null;
+ boolean shutdownTriggered = this.shutdownTriggered;
+ if (managementserverid == null) {
+ List<ManagementServerHostVO> msHosts = msHostDao.listBy(State.ShuttingDown, State.PreparingToShutDown, State.ReadyToShutDown);
+ if (msHosts != null && !msHosts.isEmpty()) {
+ msIds = new Long[msHosts.size()];
+ for (int i = 0; i < msHosts.size(); i++) {
+ msIds[i] = msHosts.get(i).getMsid();
+ }
+ shutdownTriggered = !msHosts.isEmpty();
Review Comment:
this indicates that the meaning is not what the name suggests
##########
api/src/main/java/org/apache/cloudstack/api/command/user/job/ListAsyncJobsCmd.java:
##########
@@ -36,6 +37,9 @@ public class ListAsyncJobsCmd extends BaseListAccountResourcesCmd {
@Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, description = "The start date of the async job (use format \"yyyy-MM-dd'T'HH:mm:ss'+'SSSS\")")
private Date startDate;
+ @Parameter(name = ApiConstants.MANAGEMENT_SERVER_ID, type = CommandType.UUID, entityType = ManagementServerResponse.class, description = "The id of the management server")
Review Comment:
since?
##########
server/src/main/java/com/cloud/api/ApiDispatcher.java:
##########
@@ -85,7 +90,11 @@ public void setMigrateQueueSizeLimit(final Long migrateLimit) {
}
public void dispatchCreateCmd(final BaseAsyncCreateCmd cmd, final Map<String, String> params) throws Exception {
- asyncCreationDispatchChain.dispatch(new DispatchTask(cmd, params));
+ if (asyncJobManager.isAsyncJobsEnabled()) {
+ asyncCreationDispatchChain.dispatch(new DispatchTask(cmd, params));
+ } else {
+ throw new CloudRuntimeException("A shutdown has been triggered. Can not accept new jobs");
+ }
Review Comment:
what in the case that this MS is triggered for shutdown but gets a async request that can be executed on another MS. Is that scenario covered/good to go?
A user may be behind a proxy and not understand, do we accept that/ explain?
##########
test/integration/smoke/test_safe_shutdown.py:
##########
@@ -0,0 +1,123 @@
+# 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.
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.lib.utils import *
+from marvin.lib.base import *
+from marvin.lib.common import *
+
+class TestLogin(cloudstackTestCase):
+ """
+ Tests safely shutting down the Management Server
+ """
+
+ def setUp(self):
+ self.apiclient = self.testClient.getApiClient()
+ self.mgtSvrDetails = self.config.__dict__["mgtSvr"][0].__dict__
+ self.cleanup = []
+
+ def tearDown(self):
+ try:
+ cleanup_resources(self.apiclient, self.cleanup)
+ except Exception as e:
+ raise Exception("Warning: Exception during cleanup : %s" % e)
Review Comment:
```suggestion
def tearDown(self):
super(TestLogin, self).tearDown()
```
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1254601651
@acs-robot a Jenkins job has been kicked to build UI QA env. 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] davidjumani commented on a diff in pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
davidjumani commented on code in PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#discussion_r1009029612
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/shutdown/ShutdownManagerImpl.java:
##########
@@ -0,0 +1,118 @@
+package org.apache.cloudstack.shutdown;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.api.command.CancelShutdownCmd;
+import org.apache.cloudstack.api.command.PrepareForShutdownCmd;
+import org.apache.cloudstack.api.command.ReadyForShutdownCmd;
+import org.apache.cloudstack.api.command.TriggerShutdownCmd;
+import org.apache.cloudstack.api.response.ReadyForShutdownResponse;
+import org.apache.cloudstack.framework.jobs.AsyncJobManager;
+import org.apache.log4j.Logger;
+
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.component.PluggableService;
+import com.cloud.utils.exception.CloudRuntimeException;
+
+public class ShutdownManagerImpl extends ManagerBase implements ShutdownManager, PluggableService{
+
+ private static Logger s_logger = Logger.getLogger(ShutdownManagerImpl.class);
+
+ @Inject
+ private AsyncJobManager _jobMgr;
+
+ private boolean shutdownTriggered = false;
+
+ @Override
+ public boolean isShutdownTriggered() {
+ return shutdownTriggered;
+ }
+
+ protected ShutdownManagerImpl() {
+ super();
+ }
+
+ @Override
+ public long countPendingJobs() {
+ return _jobMgr.countPendingNonPseudoJobs();
+ }
+
+ @Override
+ public ReadyForShutdownResponse readyForShutdown() {
+ long pendingJobCount = countPendingJobs();
+ return new ReadyForShutdownResponse(!_jobMgr.isAllowAsyncJobs(), pendingJobCount == 0, pendingJobCount);
+ }
+
+ @Override
+ public ReadyForShutdownResponse prepareForShutdown() {
+ _jobMgr.disableAllowAsyncJobs();
+ return readyForShutdown();
+ }
+
+ @Override
+ public ReadyForShutdownResponse triggerShutdown(Boolean forced) {
+ this.shutdownTriggered = true;
+ if (forced != null && forced) {
+ System.exit(0);
+ }
+ _jobMgr.disableAllowAsyncJobs();
+ Thread shutdownTask = new ShutdownTask(this);
+ shutdownTask.start();
+ return readyForShutdown();
+ }
+
+ @Override
+ public ReadyForShutdownResponse cancelShutdown() {
+ this.shutdownTriggered = false;
+ if (_jobMgr.isAllowAsyncJobs()) {
+ throw new CloudRuntimeException("A shutdown has not been triggered");
+ }
+
+ _jobMgr.enableAllowAsyncJobs();
+ return readyForShutdown();
+ }
+
+ @Override
+ public List<Class<?>> getCommands() {
+ final List<Class<?>> cmdList = new ArrayList<>();
+ cmdList.add(CancelShutdownCmd.class);
+ cmdList.add(PrepareForShutdownCmd.class);
+ cmdList.add(ReadyForShutdownCmd.class);
+ cmdList.add(TriggerShutdownCmd.class);
+ return cmdList;
+ }
+
+ private final class ShutdownTask extends Thread {
+
+ private ShutdownManager shutdownManager;
+
+ private ShutdownTask(final ShutdownManager shutdownManager) {
+ this.shutdownManager = shutdownManager;
+ }
+
+ @Override
+ public void run() {
+ while(true) {
+ try {
+ String msg = String.format("Checking for triggered shutdown... shutdownTriggered [%b] AllowAsyncJobs [%b] PendingJobCount [%d]",
+ shutdownManager.isShutdownTriggered(), _jobMgr.isAllowAsyncJobs(), shutdownManager.countPendingJobs());
+ s_logger.info(msg);
+ if (!shutdownManager.isShutdownTriggered()) {
+ return;
+ }
+ if (shutdownManager.countPendingJobs() == 0) {
+ s_logger.info("Shutting down now");
+ System.exit(0);
Review Comment:
When `System.exit()` is called, all shutdown hooks are triggered and only when complete does the program exit
https://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#exit(int)
--
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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1305045735
> @davidjumani can you explain this?
That's right, it only shuts down the MS which handles the request
--
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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1331703333
@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] github-actions[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1438561845
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
--
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] davidjumani commented on a diff in pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on code in PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#discussion_r1118304578
##########
server/src/main/java/com/cloud/api/ApiDispatcher.java:
##########
@@ -85,7 +90,11 @@ public void setMigrateQueueSizeLimit(final Long migrateLimit) {
}
public void dispatchCreateCmd(final BaseAsyncCreateCmd cmd, final Map<String, String> params) throws Exception {
- asyncCreationDispatchChain.dispatch(new DispatchTask(cmd, params));
+ if (asyncJobManager.isAsyncJobsEnabled()) {
+ asyncCreationDispatchChain.dispatch(new DispatchTask(cmd, params));
+ } else {
+ throw new CloudRuntimeException("A shutdown has been triggered. Can not accept new jobs");
+ }
Review Comment:
No, in the docs, it is required that the user remove the MS from the LB prior to any shutdown actions
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1472051881
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 5733
--
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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1473451150
@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] davidjumani commented on a diff in pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on code in PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#discussion_r1138361633
##########
test/integration/smoke/test_safe_shutdown.py:
##########
@@ -0,0 +1,123 @@
+# 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.
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.lib.utils import *
+from marvin.lib.base import *
+from marvin.lib.common import *
+
+class TestLogin(cloudstackTestCase):
Review Comment:
I'm neutral on this one. Lets get @borisstoyanov to decide
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1474562853
<b>Trillian test result (tid-6291)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 51306 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6755-t6291-kvm-centos7.zip
Smoke tests completed. 108 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_08_upgrade_kubernetes_ha_cluster | `Error` | 4027.02 | test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster | `Failure` | 0.06 | test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown | `Error` | 80.96 | 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] blueorangutan commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1491265272
@davidjumani 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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1491316862
@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
[GitHub] [cloudstack] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1305451477
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![C](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/C-16px.png 'C')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![28.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/25-16px.png '28.3%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [28.3% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![7.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/10-16px.png '7.4%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [7.4% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1254681254
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![C](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/C-16px.png 'C')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![29.5%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/25-16px.png '29.5%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [29.5% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![9.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/10-16px.png '9.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [9.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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] acs-robot commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
acs-robot commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1254600724
Found UI changes, kicking a new UI QA build
@blueorangutan ui
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1326451162
@davidjumani a Jenkins job has been kicked to build UI QA env. 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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1440768544
<b>Trillian test result (tid-6215)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 44086 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6755-t6215-kvm-centos7.zip
Smoke tests completed. 109 look OK, 0 have errors, 0 did not run
Only failed and skipped 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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1473454717
@davidjumani 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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1473644288
@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
[GitHub] [cloudstack] blueorangutan commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1474788803
@davidjumani 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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1472071633
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![13.8%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '13.8%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [13.8% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1473389523
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![11.7%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '11.7%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [11.7% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1475012842
<b>Trillian test result (tid-6298)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 44201 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6755-t6298-kvm-centos7.zip
Smoke tests completed. 108 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_08_upgrade_kubernetes_ha_cluster | `Failure` | 592.10 | 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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1471832134
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![13.9%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '13.9%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [13.9% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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] acs-robot commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
acs-robot commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1254546509
Found UI changes, kicking a new UI QA build
@blueorangutan ui
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1254605941
UI build: :heavy_check_mark:
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6755 (SL-JID-2399)
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1253567635
UI build: :heavy_check_mark:
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6755 (SL-JID-2390)
--
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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1305045991
@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] acs-robot commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
acs-robot commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1305287586
Found UI changes, kicking a new UI QA build
@blueorangutan ui
--
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] davidjumani commented on a diff in pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
davidjumani commented on code in PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#discussion_r1009044842
##########
framework/jobs/src/main/java/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java:
##########
@@ -116,6 +116,8 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
private static final int HEARTBEAT_INTERVAL = 2000;
private static final int GC_INTERVAL = 10000; // 10 seconds
+ private boolean allowAsyncJobs = true ;
Review Comment:
I'm guessing this can be reused later, hence the more generic naming. I'll look into polishing the message accordingly
--
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] github-actions[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1359265669
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
--
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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1438874175
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [18 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![0.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.3%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [0.3% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1439563593
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 5626
--
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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1473627615
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![13.6%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '13.6%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [13.6% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1486586167
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![11.8%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '11.8%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [11.8% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1491312825
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 5818
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1326460702
UI build: :heavy_multiplication_x:
(SL-JID-2638)
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1296586875
@davidjumani 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] DaanHoogland commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1296594027
> looks generally good. A functional question though, there is a UI component, but will the API let all clustered MS shutdown? (I didn´t see code for that) It seems only the MS that happens to handle the API will shut down.
@davidjumani can you explain this?
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1296581249
UI build: :heavy_check_mark:
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6755 (SL-JID-2596)
--
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] acs-robot commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
acs-robot commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1253558157
Found UI changes, kicking a new UI QA build
@blueorangutan ui
--
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] acs-robot commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
acs-robot commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1253561186
Found UI changes, kicking a new UI QA build
@blueorangutan ui
--
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] DaanHoogland merged pull request #6755: Feature: Safely shutdown cloudstack
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755
--
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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1486586292
@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
[GitHub] [cloudstack] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1438170603
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [38 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![0.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.4%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [0.4% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1438022470
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [46 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![0.7%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.7%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [0.7% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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] DaanHoogland commented on a diff in pull request #6755: Feature: Safely shutdown cloudstack
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#discussion_r1109808308
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/shutdown/ShutdownJobDispatcher.java:
##########
@@ -0,0 +1,71 @@
+package org.apache.cloudstack.shutdown;
Review Comment:
rat
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1473291908
@davidjumani 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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1473645370
@davidjumani 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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1439519579
@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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1447764934
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![13.8%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '13.8%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [13.8% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1486575654
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 5789
--
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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1439580094
@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
[GitHub] [cloudstack] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1474788463
@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
[GitHub] [cloudstack] blueorangutan commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1473370586
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 5740
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1471934872
@davidjumani 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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "davidjumani (via GitHub)" <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1471934209
@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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1438409716
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [18 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![0.3%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.3%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [0.3% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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] DaanHoogland commented on a diff in pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on code in PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#discussion_r981207221
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/api/command/PrepareForShutdownCmd.java:
##########
@@ -0,0 +1,45 @@
+package org.apache.cloudstack.api.command;
Review Comment:
license
##########
framework/jobs/src/main/java/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java:
##########
@@ -116,6 +116,8 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
private static final int HEARTBEAT_INTERVAL = 2000;
private static final int GC_INTERVAL = 10000; // 10 seconds
+ private boolean allowAsyncJobs = true ;
Review Comment:
seems like this should be called `shutdownTriggered`, or else the messages of the exceptions are to specific and we don´t know the reason the async jobs are disallowed is a shutdown instead of some other maintenance task.
##########
plugins/shutdown/src/test/java/org/apache/cloudstack/shutdown/ShutdownManagerImplTest.java:
##########
@@ -0,0 +1,98 @@
+package org.apache.cloudstack.shutdown;
Review Comment:
license
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/shutdown/ShutdownManagerImpl.java:
##########
@@ -0,0 +1,118 @@
+package org.apache.cloudstack.shutdown;
Review Comment:
license
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/api/command/TriggerShutdownCmd.java:
##########
@@ -0,0 +1,58 @@
+package org.apache.cloudstack.api.command;
Review Comment:
license
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/shutdown/ShutdownManagerImpl.java:
##########
@@ -0,0 +1,118 @@
+package org.apache.cloudstack.shutdown;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.api.command.CancelShutdownCmd;
+import org.apache.cloudstack.api.command.PrepareForShutdownCmd;
+import org.apache.cloudstack.api.command.ReadyForShutdownCmd;
+import org.apache.cloudstack.api.command.TriggerShutdownCmd;
+import org.apache.cloudstack.api.response.ReadyForShutdownResponse;
+import org.apache.cloudstack.framework.jobs.AsyncJobManager;
+import org.apache.log4j.Logger;
+
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.component.PluggableService;
+import com.cloud.utils.exception.CloudRuntimeException;
+
+public class ShutdownManagerImpl extends ManagerBase implements ShutdownManager, PluggableService{
+
+ private static Logger s_logger = Logger.getLogger(ShutdownManagerImpl.class);
Review Comment:
```suggestion
private static Logger LOG = Logger.getLogger(ShutdownManagerImpl.class);
```
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/api/command/CancelShutdownCmd.java:
##########
@@ -0,0 +1,47 @@
+package org.apache.cloudstack.api.command;
Review Comment:
license
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/shutdown/ShutdownManager.java:
##########
@@ -0,0 +1,17 @@
+package org.apache.cloudstack.shutdown;
Review Comment:
license
##########
plugins/shutdown/src/main/java/org/apache/cloudstack/shutdown/ShutdownManagerImpl.java:
##########
@@ -0,0 +1,118 @@
+package org.apache.cloudstack.shutdown;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.api.command.CancelShutdownCmd;
+import org.apache.cloudstack.api.command.PrepareForShutdownCmd;
+import org.apache.cloudstack.api.command.ReadyForShutdownCmd;
+import org.apache.cloudstack.api.command.TriggerShutdownCmd;
+import org.apache.cloudstack.api.response.ReadyForShutdownResponse;
+import org.apache.cloudstack.framework.jobs.AsyncJobManager;
+import org.apache.log4j.Logger;
+
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.component.PluggableService;
+import com.cloud.utils.exception.CloudRuntimeException;
+
+public class ShutdownManagerImpl extends ManagerBase implements ShutdownManager, PluggableService{
+
+ private static Logger s_logger = Logger.getLogger(ShutdownManagerImpl.class);
+
+ @Inject
+ private AsyncJobManager _jobMgr;
+
+ private boolean shutdownTriggered = false;
+
+ @Override
+ public boolean isShutdownTriggered() {
+ return shutdownTriggered;
+ }
+
+ protected ShutdownManagerImpl() {
+ super();
+ }
+
+ @Override
+ public long countPendingJobs() {
+ return _jobMgr.countPendingNonPseudoJobs();
+ }
+
+ @Override
+ public ReadyForShutdownResponse readyForShutdown() {
+ long pendingJobCount = countPendingJobs();
+ return new ReadyForShutdownResponse(!_jobMgr.isAllowAsyncJobs(), pendingJobCount == 0, pendingJobCount);
+ }
+
+ @Override
+ public ReadyForShutdownResponse prepareForShutdown() {
+ _jobMgr.disableAllowAsyncJobs();
+ return readyForShutdown();
+ }
+
+ @Override
+ public ReadyForShutdownResponse triggerShutdown(Boolean forced) {
+ this.shutdownTriggered = true;
+ if (forced != null && forced) {
+ System.exit(0);
+ }
+ _jobMgr.disableAllowAsyncJobs();
+ Thread shutdownTask = new ShutdownTask(this);
+ shutdownTask.start();
+ return readyForShutdown();
+ }
+
+ @Override
+ public ReadyForShutdownResponse cancelShutdown() {
+ this.shutdownTriggered = false;
+ if (_jobMgr.isAllowAsyncJobs()) {
+ throw new CloudRuntimeException("A shutdown has not been triggered");
+ }
+
+ _jobMgr.enableAllowAsyncJobs();
+ return readyForShutdown();
+ }
+
+ @Override
+ public List<Class<?>> getCommands() {
+ final List<Class<?>> cmdList = new ArrayList<>();
+ cmdList.add(CancelShutdownCmd.class);
+ cmdList.add(PrepareForShutdownCmd.class);
+ cmdList.add(ReadyForShutdownCmd.class);
+ cmdList.add(TriggerShutdownCmd.class);
+ return cmdList;
+ }
+
+ private final class ShutdownTask extends Thread {
+
+ private ShutdownManager shutdownManager;
+
+ private ShutdownTask(final ShutdownManager shutdownManager) {
+ this.shutdownManager = shutdownManager;
+ }
+
+ @Override
+ public void run() {
+ while(true) {
+ try {
+ String msg = String.format("Checking for triggered shutdown... shutdownTriggered [%b] AllowAsyncJobs [%b] PendingJobCount [%d]",
+ shutdownManager.isShutdownTriggered(), _jobMgr.isAllowAsyncJobs(), shutdownManager.countPendingJobs());
+ s_logger.info(msg);
+ if (!shutdownManager.isShutdownTriggered()) {
+ return;
+ }
+ if (shutdownManager.countPendingJobs() == 0) {
+ s_logger.info("Shutting down now");
+ System.exit(0);
Review Comment:
are other threads allowed to shutdown as well (by maybe setting a flag on `ManagedContextRunnable` and adding a check for it there? (<== genuine question)
##########
plugins/shutdown/pom.xml:
##########
@@ -0,0 +1,25 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
Review Comment:
license?
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1254547078
@acs-robot a Jenkins job has been kicked to build UI QA env. 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] sonarcloud[bot] commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1253620634
SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=6755)
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [![C](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/C-16px.png 'C')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=BUG)
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=VULNERABILITY)
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=6755&resolved=false&types=SECURITY_HOTSPOT)
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=6755&resolved=false&types=CODE_SMELL)
[![0.7%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.7%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list) [0.7% Coverage](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_coverage&view=list)
[![10.8%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20-16px.png '10.8%')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list) [10.8% Duplication](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=6755&metric=new_duplicated_lines_density&view=list)
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1327975479
<b>Trillian test result (tid-5267)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 45572 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6755-t5267-kvm-centos7.zip
Smoke tests completed. 103 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_03_secured_to_nonsecured_vm_migration | `Error` | 156.33 | test_vm_life_cycle.py
test_04_nonsecured_to_secured_vm_migration | `Error` | 148.24 | test_vm_life_cycle.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 531.39 | test_vpc_redundant.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] blueorangutan commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1326449446
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 4640
--
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] davidjumani commented on pull request #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
davidjumani commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1326450145
@blueorangutan ui
--
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 #6755: Feature: Safely shutdown cloudstack
Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #6755:
URL: https://github.com/apache/cloudstack/pull/6755#issuecomment-1305069457
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. LL-JID 206
--
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