apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
1.83k stars 1.07k forks source link

Fix error message if specific host does not have capacity #9218

Closed harikrishna-patnala closed 2 weeks ago

harikrishna-patnala commented 3 weeks ago

Description

This PR fixes the issue #8077 with some related error message

Trying to publish the exact error message is bit complicated in this scenario. Operator has anyway need to check the logs, but here tried to keep the appropriate error message to check further.

Case 1:

If the service offering has more CPU number or speed than the whole host's CPU and speed.

image

Case 2:

If the host does not have free CPU/RAM as requested from the compute offering. The proper error message depends on the over commit ratios and whether or not to consider the reserved capacity of the host, so checking of the logs is needed.

image

Types of changes

Bug Severity

How Has This Been Tested?

case 1:

  1. Create a service offering with more than the CPU than the host
  2. Create an instance with that offering by selecting the host

case 2:

  1. Create a service offering so that the host cannot allocate the resources within its limits
  2. Create an instance with that offering by selecting the host
harikrishna-patnala commented 3 weeks ago

@blueorangutan package

blueorangutan commented 3 weeks ago

@harikrishna-patnala a [SL] 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.

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 15.01%. Comparing base (3f2761e) to head (72bef48). Report is 19 commits behind head on 4.19.

Files Patch % Lines
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java 0.00% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## 4.19 #9218 +/- ## ============================================ + Coverage 14.96% 15.01% +0.05% - Complexity 10993 11155 +162 ============================================ Files 5373 5377 +4 Lines 469248 474129 +4881 Branches 58782 59719 +937 ============================================ + Hits 70210 71181 +971 - Misses 391266 395063 +3797 - Partials 7772 7885 +113 ``` | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/9218/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/9218/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.27% <ø> (-0.04%)` | :arrow_down: | | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/9218/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `15.72% <0.00%> (+0.05%)` | :arrow_up: | 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.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

blueorangutan commented 3 weeks ago

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9862

rohityadavcloud commented 2 weeks ago

Marvin/simulator smoketests are enough, as it's largely error/presentation change.