You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "rohityadavcloud (via GitHub)" <gi...@apache.org> on 2025/08/25 09:11:51 UTC
[PR] scripts: fix external provision to use correct power state [cloudstack]
rohityadavcloud opened a new pull request, #11504:
URL: https://github.com/apache/cloudstack/pull/11504
The valid states are poweron and poweroff.
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] 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)
- [ ] build/CI
- [ ] test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
#### How did you try to break this feature and the system with this change?
<!-- see how your change affects other areas of the code, etc. -->
<!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] scripts: fix external provision to use correct power state [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on PR #11504:
URL: https://github.com/apache/cloudstack/pull/11504#issuecomment-3219634151
I could also manage to fix the hyperv powerstate not syncing. cc @abh1sar @shwstppr @harikrishna-patnala
Manually tested in a HyperV WS 2019, Proxmox VE9 and sample/test extension.
--
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
Re: [PR] scripts: fix external provision to use correct power state [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #11504:
URL: https://github.com/apache/cloudstack/pull/11504#issuecomment-3219487772
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/11504?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 3.63%. Comparing base ([`1272b13`](https://app.codecov.io/gh/apache/cloudstack/commit/1272b130878d0d8eb73caad2963343082d4be3fc?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`db57147`](https://app.codecov.io/gh/apache/cloudstack/commit/db571479b088838bde3e8eb13034296dd309722b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
> :exclamation: There is a different number of reports uploaded between BASE (1272b13) and HEAD (db57147). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (1272b13) | HEAD (db57147) |
>|------|------|------|
>|unittests|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #11504 +/- ##
=============================================
- Coverage 17.36% 3.63% -13.73%
=============================================
Files 5886 441 -5445
Lines 525680 37016 -488664
Branches 64159 6785 -57374
=============================================
- Hits 91261 1345 -89916
+ Misses 424120 35510 -388610
+ Partials 10299 161 -10138
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/11504/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/11504/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `3.63% <ø> (ø)` | |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/11504/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/11504?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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
Re: [PR] scripts: fix external provision to use correct power state [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on code in PR #11504:
URL: https://github.com/apache/cloudstack/pull/11504#discussion_r2297690837
##########
extensions/HyperV/hyperv.py:
##########
@@ -16,6 +16,9 @@
# specific language governing permissions and limitations
# under the License.
+import warnings
+warnings.filterwarnings('ignore')
Review Comment:
Running the status() in hyperv extension was causing this:
```
[root@qa1-421-xaas-demo-1ea23f9f-kvm-mgmt1 logs]# python3 /usr/share/cloudstack-management/extensions/HyperV/hyperv.py status /var/lib/cloudstack/management/extensions/HyperV/27b09915-2b95-4c87-bf17-9c37bca5cae1.json
/usr/local/lib/python3.6/site-packages/requests_ntlm/requests_ntlm.py:5: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography will remove support for Python 3.6.
from cryptography import x509
{"status": "success", "power_state": "poweroff"}
```
--
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
Re: [PR] scripts: fix external provision to use correct power state [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on code in PR #11504:
URL: https://github.com/apache/cloudstack/pull/11504#discussion_r2297689555
##########
extensions/HyperV/hyperv.py:
##########
@@ -200,12 +203,11 @@ def reboot(self):
def status(self):
command = f'(Get-VM -Name "{self.data["vmname"]}").State'
state = self.run_ps(command)
- if state.lower() == "running":
+ power_state = "unknown"
+ if state.strip().lower() == "running":
Review Comment:
jfyi, the `state` had a newline so string matching wasn't working.
--
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
Re: [PR] scripts: fix external provision to use correct power state [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on code in PR #11504:
URL: https://github.com/apache/cloudstack/pull/11504#discussion_r2297692001
##########
extensions/HyperV/hyperv.py:
##########
@@ -16,6 +16,9 @@
# specific language governing permissions and limitations
# under the License.
+import warnings
+warnings.filterwarnings('ignore')
Review Comment:
The filter warning removes unnecessary string in stderr which is upsurped by mgmt server as extension output.
--
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
Re: [PR] scripts: fix external provision to use correct power state & hyperv powersync [cloudstack]
Posted by "harikrishna-patnala (via GitHub)" <gi...@apache.org>.
harikrishna-patnala merged PR #11504:
URL: https://github.com/apache/cloudstack/pull/11504
--
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