-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CLOUDSTACK-9690: Scale CentOS7 VM fails with error #1849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
60021de to
327f7c2
Compare
| String configDriveIsoRootFolder = null; | ||
| String configDriveIsoFile = null; | ||
|
|
||
| Map<String, String> guestOsDetails = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid potential NPEs, construct a hashmap with no items, such as
Map<String, String> guestOsDetails = new Hashmap();
| } | ||
|
|
||
| public Map getDetails() { | ||
| Map<String, String> detailsMap = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't make getDetails return null, instead return an empty hashmap.
| } | ||
|
|
||
| public Map getDetails() { | ||
| Map<String, String> detailsMap = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't make getDetails return null, instead return an empty hashmap.
327f7c2 to
2f5a6b3
Compare
|
@rhtyd Thanks for the Review. I have amended the code as per your suggestion. |
|
@blueorangutan package |
|
@karuturi a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-436 |
|
@blueorangutan test centos7 xenserver-65sp1 |
2f5a6b3 to
b288b3c
Compare
ACS CI BVT RunSumarry: Link to logs Folder (search by build_no): https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0 Failed tests: Skipped tests: Passed test suits: |
b288b3c to
992fac4
Compare
|
Tested the fix, LGTM. |
|
@sudhansu7 Otherwise code looks good. LGTM for code. |
|
@sudhansu7 can you address @jayantpatil1234's comment? |
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.
|
@jayantpatil1234, I have removed Upgrade4910to4920.java from commit. |
|
tag:mergeready |
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:
REPO STEPS
EXPECTED RESULT: VM should start with static limit 4x and scale up when offering is changed
ACTUAL RESULT: VM starts with maximum static limit of 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.
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.
DAO layer was modified to access these values.
VirtualMachineTo object was modified to populate the dynamic memory values.
addGuestOs and UpdateGuestOS api has been modified to update memory values.