You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by sudhansu7 <gi...@git.apache.org> on 2016/12/21 17:45:46 UTC
[GitHub] cloudstack pull request #1849: CLOUDSTACK-9690: Scale CentOS7 VM fails with ...
GitHub user sudhansu7 opened a pull request:
https://github.com/apache/cloudstack/pull/1849
CLOUDSTACK-9690: Scale CentOS7 VM fails with error
Scale CentOS7 VM fails with error "Cannot scale up the vm because of memory constraint violation"
When creating VM from CentOS 7 template on the XenServer with dynamically scaling enabled, instance starts with base specified memory instead of memory * 4 as static limit.
As the result, attempt to scale VM throws error in MS log:
```
java.lang.RuntimeException: Job failed due to exception Unable to scale vm due to Catch exception com.cloud.utils.exception.CloudRuntimeException when scaling VM:i-24-3976-VM due to com.cloud.utils.exception.CloudRuntimeException: Cannot scale up the vm because of memory constraint violation: 0 <= memory-static-min(2147483648) <= memory-dynamic-min(8589934592) <= memory-dynamic-max(8589934592) <= memory-static-max(2147483648)
```
REPO STEPS
=============================
1. Enable dynamic scaling in Global settings
2. Register an CentOS 7 tempplate(with tools) and tick dynamic scaling
3. Deploy VM with this template
4. Start the VM and try to change service offering
EXPECTED RESULT: VM should start with static limit 4x<assigned memory> and scale up when offering is changed
ACTUAL RESULT: VM starts with maximum static limit of <assigned memory> and doesn't scale up with error in ms log :
Cannot scale up the vm because of memory constraint violation:
Root Cause: Xensever guest OS memory values are missing for 'CentOS 7'.
Solution: Add Xensever guest OS memory values for 'CentOS 7'. But this needs patching and restart of management server. In this fix the hardcoded values are moved from Java files to database.
1. Removed XenServerGuestOsMemoryMap from CitrixHelper.java
This java file was holding a static in memory map named XenServerGuestOsMemoryMap. This was the source for xenserver dynamic memory values(max and min). These values were moved to guest_os_details table.
2. DAO layer was modified to access these values.
3. VirtualMachineTo object was modified to populate the dynamic memory values.
4. addGuestOs and UpdateGuestOS api has been modified to update memory values.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sudhansu7/cloudstack CLOUDSTACK-9690
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/1849.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1849
----
commit 60021defea46b8ef8a87660070b4ad6c1c73af79
Author: Sudhansu <su...@accelerite.com>
Date: 2016-12-21T17:41:12Z
CLOUDSTACK-9690: Scale CentOS7 VM fails with error
1. Removed XenServerGuestOsMemoryMap from CitrixHelper.java
This java file was holding a static in memory map named XenServerGuestOsMemoryMap. This was the source for xenserver dynamic memory values(max and min). These values were moved to guest_os_details table.
2. DAO layer was modified to access these values.
3. VirtualMachineTo object was modified to populate the dynamic memory values.
4. addGuestOs and UpdateGuestOS api has been modified to update memory values.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1849: CLOUDSTACK-9690: Scale CentOS7 VM fails with error
Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the issue:
https://github.com/apache/cloudstack/pull/1849
@blueorangutan package
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request #1849: CLOUDSTACK-9690: Scale CentOS7 VM fails with ...
Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1849#discussion_r93571410
--- Diff: api/src/com/cloud/agent/api/to/VirtualMachineTO.java ---
@@ -69,6 +69,7 @@
String configDriveIsoRootFolder = null;
String configDriveIsoFile = null;
+ Map<String, String> guestOsDetails = null;
--- End diff --
To avoid potential NPEs, construct a hashmap with no items, such as
`Map<String, String> guestOsDetails = new Hashmap();`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1849: CLOUDSTACK-9690: Scale CentOS7 VM fails with error
Posted by cloudmonger <gi...@git.apache.org>.
Github user cloudmonger commented on the issue:
https://github.com/apache/cloudstack/pull/1849
### ACS CI BVT Run
**Sumarry:**
Build Number 414
Hypervisor xenserver
NetworkType Advanced
Passed=105
Failed=0
Skipped=7
_Link to logs Folder (search by build_no):_ https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
**Failed tests:**
**Skipped tests:**
test_01_test_vm_volume_snapshot
test_vm_nic_adapter_vmxnet3
test_static_role_account_acls
test_11_ss_nfs_version_on_ssvm
test_nested_virtualization_vmware
test_3d_gpu_support
test_deploy_vgpu_enabled_vm
**Passed test suits:**
test_deploy_vm_with_userdata.py
test_affinity_groups_projects.py
test_portable_publicip.py
test_over_provisioning.py
test_global_settings.py
test_scale_vm.py
test_service_offerings.py
test_routers_iptables_default_policy.py
test_loadbalance.py
test_routers.py
test_reset_vm_on_reboot.py
test_deploy_vms_with_varied_deploymentplanners.py
test_network.py
test_router_dns.py
test_non_contigiousvlan.py
test_login.py
test_deploy_vm_iso.py
test_list_ids_parameter.py
test_public_ip_range.py
test_multipleips_per_nic.py
test_regions.py
test_affinity_groups.py
test_network_acl.py
test_pvlan.py
test_volumes.py
test_nic.py
test_deploy_vm_root_resize.py
test_resource_detail.py
test_secondary_storage.py
test_vm_life_cycle.py
test_routers_network_ops.py
test_disk_offerings.py
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1849: CLOUDSTACK-9690: Scale CentOS7 VM fails with error
Posted by jayakarteek <gi...@git.apache.org>.
Github user jayakarteek commented on the issue:
https://github.com/apache/cloudstack/pull/1849
@sudhansu7
Tested the fix, LGTM.
I am able to change from small computer offering to medium computer offering for centos-7.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1849: CLOUDSTACK-9690: Scale CentOS7 VM fails with error
Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:
https://github.com/apache/cloudstack/pull/1849
Packaging result: \u2714centos6 \u2714centos7 \u2714debian. JID-436
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1849: CLOUDSTACK-9690: Scale CentOS7 VM fails with error
Posted by jayantpatil1234 <gi...@git.apache.org>.
Github user jayantpatil1234 commented on the issue:
https://github.com/apache/cloudstack/pull/1849
@sudhansu7
There is one file "Upgrade4910to4920.java", which does not have any changes, still that get added in PR. If possible could you remove that file?
Otherwise code looks good. LGTM for code
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1849: CLOUDSTACK-9690: Scale CentOS7 VM fails with error
Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the issue:
https://github.com/apache/cloudstack/pull/1849
@blueorangutan test centos7 xenserver-65sp1
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request #1849: CLOUDSTACK-9690: Scale CentOS7 VM fails with ...
Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1849#discussion_r93571450
--- Diff: api/src/org/apache/cloudstack/api/command/admin/guest/AddGuestOsCmd.java ---
@@ -70,6 +78,23 @@ public String getOsName() {
return osName;
}
+ public Map getDetails() {
+ Map<String, String> detailsMap = null;
--- End diff --
don't make getDetails return null, instead return an empty hashmap.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1849: CLOUDSTACK-9690: Scale CentOS7 VM fails with error
Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:
https://github.com/apache/cloudstack/pull/1849
@karuturi a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request #1849: CLOUDSTACK-9690: Scale CentOS7 VM fails with ...
Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1849#discussion_r93571470
--- Diff: api/src/org/apache/cloudstack/api/command/admin/guest/UpdateGuestOsCmd.java ---
@@ -61,6 +70,22 @@ public String getOsDisplayName() {
return osDisplayName;
}
+ public Map getDetails() {
+ Map<String, String> detailsMap = null;
--- End diff --
don't make getDetails return null, instead return an empty hashmap.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1849: CLOUDSTACK-9690: Scale CentOS7 VM fails with error
Posted by sudhansu7 <gi...@git.apache.org>.
Github user sudhansu7 commented on the issue:
https://github.com/apache/cloudstack/pull/1849
@rhtyd Thanks for the Review. I have amended the code as per your suggestion.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---