Change in vdsm[master]: Add support for specifying vm maximum memory

2015-05-26 Thread ofrenkel
Omer Frenkel has posted comments on this change.

Change subject: Add support for specifying vm maximum memory
..


Patch Set 2:

(3 comments)

https://gerrit.ovirt.org/#/c/40547/2//COMMIT_MSG
Commit Message:

Line 3: AuthorDate: 2015-05-04 14:07:41 +0300
Line 4: Commit: Omer Frenkel 
Line 5: CommitDate: 2015-05-06 13:25:09 +0300
Line 6: 
Line 7: Add support for specifying vm maximum memory
> please reformat to:
Done
Line 8: 
Line 9: Added new parameter 'maxMemSize' to VM
Line 10: this parameter is sent from engine backend and passed to libvirt xml
Line 11: with the mandatory 'slots' attribute.


https://gerrit.ovirt.org/#/c/40547/2/vdsm/rpc/vdsmapi-schema.json
File vdsm/rpc/vdsmapi-schema.json:

Line 3586: # @maxMemSize:#optional The maximum amount of memory 
that can be
Line 3587: # assigned to the VM in MB
Line 3588: #
Line 3589: # @maxMemSlots:   #optional Maximum number of memory slots 
available
Line 3590: # This is the upper boundry for hot plug 
memory action
> s/boundry/boundary/
Done
Line 3591: #
Line 3592: # Since: 4.10.0
Line 3593: ##
Line 3594: {'type': 'VmDefinition',


https://gerrit.ovirt.org/#/c/40547/2/vdsm/virt/vmxml.py
File vdsm/virt/vmxml.py:

Line 168: self.dom.appendChildWithArgs('memory', text=memSizeKB)
Line 169: self.dom.appendChildWithArgs('currentMemory', text=memSizeKB)
Line 170: if 'maxMemSize' in self.conf:
Line 171: maxMemSizeKB = str(int(self.conf['maxMemSize']) * 1024)
Line 172: maxMemSlots = str(self.conf.get('maxMemSlots', '16'))
> document "16" at least in the schema...or here...either way it does deserve
Done
Line 173: self.dom.appendChildWithArgs('maxMemory', 
text=maxMemSizeKB,
Line 174:  slots=maxMemSlots)
Line 175: vcpu = self.dom.appendChildWithArgs('vcpu', 
text=self._getMaxVCpus())
Line 176: vcpu.setAttrs(**{'current': self._getSmp()})


-- 
To view, visit https://gerrit.ovirt.org/40547
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54a698fbd45d6605f24b3641c541ff10a332d9f8
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Omer Frenkel 
Gerrit-Reviewer: Vitor de Lima 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Add support for specifying vm maximum memory

2015-05-20 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: Add support for specifying vm maximum memory
..


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/40547/2//COMMIT_MSG
Commit Message:

Line 3: AuthorDate: 2015-05-04 14:07:41 +0300
Line 4: Commit: Omer Frenkel 
Line 5: CommitDate: 2015-05-06 13:25:09 +0300
Line 6: 
Line 7: Add support for specifying vm maximum memory
please reformat to:

  virt: add support for...
Line 8: 
Line 9: Added new parameter 'maxMemSize' to VM
Line 10: this parameter is sent from engine backend and passed to libvirt xml
Line 11: with the mandatory 'slots' attribute.


-- 
To view, visit https://gerrit.ovirt.org/40547
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54a698fbd45d6605f24b3641c541ff10a332d9f8
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Omer Frenkel 
Gerrit-Reviewer: Vitor de Lima 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Add support for specifying vm maximum memory

2015-05-20 Thread mskrivan
Michal Skrivanek has posted comments on this change.

Change subject: Add support for specifying vm maximum memory
..


Patch Set 2: Code-Review+1

(2 comments)

https://gerrit.ovirt.org/#/c/40547/2/vdsm/rpc/vdsmapi-schema.json
File vdsm/rpc/vdsmapi-schema.json:

Line 3586: # @maxMemSize:#optional The maximum amount of memory 
that can be
Line 3587: # assigned to the VM in MB
Line 3588: #
Line 3589: # @maxMemSlots:   #optional Maximum number of memory slots 
available
Line 3590: # This is the upper boundry for hot plug 
memory action
s/boundry/boundary/
Line 3591: #
Line 3592: # Since: 4.10.0
Line 3593: ##
Line 3594: {'type': 'VmDefinition',


https://gerrit.ovirt.org/#/c/40547/2/vdsm/virt/vmxml.py
File vdsm/virt/vmxml.py:

Line 168: self.dom.appendChildWithArgs('memory', text=memSizeKB)
Line 169: self.dom.appendChildWithArgs('currentMemory', text=memSizeKB)
Line 170: if 'maxMemSize' in self.conf:
Line 171: maxMemSizeKB = str(int(self.conf['maxMemSize']) * 1024)
Line 172: maxMemSlots = str(self.conf.get('maxMemSlots', '16'))
document "16" at least in the schema...or here...either way it does deserve one 
line of comment somewhere:)
Line 173: self.dom.appendChildWithArgs('maxMemory', 
text=maxMemSizeKB,
Line 174:  slots=maxMemSlots)
Line 175: vcpu = self.dom.appendChildWithArgs('vcpu', 
text=self._getMaxVCpus())
Line 176: vcpu.setAttrs(**{'current': self._getSmp()})


-- 
To view, visit https://gerrit.ovirt.org/40547
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54a698fbd45d6605f24b3641c541ff10a332d9f8
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Omer Frenkel 
Gerrit-Reviewer: Vitor de Lima 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Add support for specifying vm maximum memory

2015-05-20 Thread ofrenkel
Omer Frenkel has posted comments on this change.

Change subject: Add support for specifying vm maximum memory
..


Patch Set 2: Verified+1

verified: 
* using engine that doesnt support this value:
attribute wasn't sent to libvirt - vm works as expected
* using supporting engine - values from engine added in libvirt xml, as expected

-- 
To view, visit https://gerrit.ovirt.org/40547
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54a698fbd45d6605f24b3641c541ff10a332d9f8
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek 
Gerrit-Reviewer: Omer Frenkel 
Gerrit-Reviewer: Vitor de Lima 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Add support for specifying vm maximum memory

2015-05-06 Thread automation
automat...@ovirt.org has posted comments on this change.

Change subject: Add support for specifying vm maximum memory
..


Patch Set 2:

* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 
'ovirt-3.4', 'ovirt-3.3'])

-- 
To view, visit https://gerrit.ovirt.org/40547
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54a698fbd45d6605f24b3641c541ff10a332d9f8
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Omer Frenkel 
Gerrit-Reviewer: Vitor de Lima 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Add support for specifying vm maximum memory

2015-05-06 Thread ofrenkel
Omer Frenkel has posted comments on this change.

Change subject: Add support for specifying vm maximum memory
..


Patch Set 1:

(3 comments)

https://gerrit.ovirt.org/#/c/40547/1/vdsm/rpc/vdsmapi-schema.json
File vdsm/rpc/vdsmapi-schema.json:

Line 3582: # @serial:#optional Serial number for the VM.
Line 3583: #
Line 3584: # @numOfIoThreads:#optional The num of iothreads qemu 
allocates
Line 3585: #
Line 3586: # @maxMemSize:The maximum amount of memory that can be 
assigned
> isn't this optional? If this is mandatory, new VDSMs will not work with old
Done
Line 3587: # to the VM in MB
Line 3588: #
Line 3589: # Since: 4.10.0
Line 3590: ##


Line 3601:   '*smpCoresPerSocket': 'uint', '*smpThreadsPerCore': 'uint',
Line 3602:   'status': 'VmStatus', 'timeOffset': 'uint',
Line 3603:   'transparentHugePages': 'bool', 'vmId': 'UUID', 'vmName': 
'str',
Line 3604:   'vmType': 'VmType', '*exitCode': 'int', '*exitMessage': 
'str',
Line 3605:   '*serial': 'str', '*numOfIoThreads': 'uint', 'maxMemSize': 
'uint'}}
> if this is indeed optional, don't forget to update here as well.
Done
Line 3606: 
Line 3607: ##
Line 3608: # @VmParameters:
Line 3609: #


https://gerrit.ovirt.org/#/c/40547/1/vdsm/virt/vmxml.py
File vdsm/virt/vmxml.py:

Line 169: self.dom.appendChildWithArgs('currentMemory', text=memSizeKB)
Line 170: if 'maxMemSize' in self.conf:
Line 171: maxMemSizeKB = str(int(self.conf['maxMemSize']) * 1024)
Line 172: self.dom.appendChildWithArgs('maxMemory', 
text=maxMemSizeKB,
Line 173:  slots=self._getMaxVCpus())
> is the usage of _getMaxVCpus() intentional?
you are right this is wrong, i will change it to be sent from the engine as well
Line 174: vcpu = self.dom.appendChildWithArgs('vcpu', 
text=self._getMaxVCpus())
Line 175: vcpu.setAttrs(**{'current': self._getSmp()})
Line 176: 
Line 177: self._devices = Element('devices')


-- 
To view, visit https://gerrit.ovirt.org/40547
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54a698fbd45d6605f24b3641c541ff10a332d9f8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Omer Frenkel 
Gerrit-Reviewer: Vitor de Lima 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Add support for specifying vm maximum memory

2015-05-05 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: Add support for specifying vm maximum memory
..


Patch Set 1:

(3 comments)

A couple of questions inside.

https://gerrit.ovirt.org/#/c/40547/1/vdsm/rpc/vdsmapi-schema.json
File vdsm/rpc/vdsmapi-schema.json:

Line 3582: # @serial:#optional Serial number for the VM.
Line 3583: #
Line 3584: # @numOfIoThreads:#optional The num of iothreads qemu 
allocates
Line 3585: #
Line 3586: # @maxMemSize:The maximum amount of memory that can be 
assigned
isn't this optional? If this is mandatory, new VDSMs will not work with older 
Engines.
Line 3587: # to the VM in MB
Line 3588: #
Line 3589: # Since: 4.10.0
Line 3590: ##


Line 3601:   '*smpCoresPerSocket': 'uint', '*smpThreadsPerCore': 'uint',
Line 3602:   'status': 'VmStatus', 'timeOffset': 'uint',
Line 3603:   'transparentHugePages': 'bool', 'vmId': 'UUID', 'vmName': 
'str',
Line 3604:   'vmType': 'VmType', '*exitCode': 'int', '*exitMessage': 
'str',
Line 3605:   '*serial': 'str', '*numOfIoThreads': 'uint', 'maxMemSize': 
'uint'}}
if this is indeed optional, don't forget to update here as well.
Line 3606: 
Line 3607: ##
Line 3608: # @VmParameters:
Line 3609: #


https://gerrit.ovirt.org/#/c/40547/1/vdsm/virt/vmxml.py
File vdsm/virt/vmxml.py:

Line 169: self.dom.appendChildWithArgs('currentMemory', text=memSizeKB)
Line 170: if 'maxMemSize' in self.conf:
Line 171: maxMemSizeKB = str(int(self.conf['maxMemSize']) * 1024)
Line 172: self.dom.appendChildWithArgs('maxMemory', 
text=maxMemSizeKB,
Line 173:  slots=self._getMaxVCpus())
is the usage of _getMaxVCpus() intentional?
If so, can you please explain why do we want/need to have the same max number 
of memory slots and VCpus (I can't find an obvious explanation)?
Line 174: vcpu = self.dom.appendChildWithArgs('vcpu', 
text=self._getMaxVCpus())
Line 175: vcpu.setAttrs(**{'current': self._getSmp()})
Line 176: 
Line 177: self._devices = Element('devices')


-- 
To view, visit https://gerrit.ovirt.org/40547
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54a698fbd45d6605f24b3641c541ff10a332d9f8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Vitor de Lima 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Add support for specifying vm maximum memory

2015-05-05 Thread automation
automat...@ovirt.org has posted comments on this change.

Change subject: Add support for specifying vm maximum memory
..


Patch Set 1:

* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 
'ovirt-3.4', 'ovirt-3.3'])

-- 
To view, visit https://gerrit.ovirt.org/40547
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54a698fbd45d6605f24b3641c541ff10a332d9f8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel 
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Add support for specifying vm maximum memory

2015-05-05 Thread ofrenkel
Omer Frenkel has uploaded a new change for review.

Change subject: Add support for specifying vm maximum memory
..

Add support for specifying vm maximum memory

Added new parameter 'maxMemSize' to VM
this parameter is sent from engine backend and passed to libvirt xml
with the mandatory 'slots' attribute.

this parameter is mandatory for memory hotplug.
if this parameter is not passed, then it is not set in the libvirt xml,
and hotplug for this vm will not work.

Change-Id: I54a698fbd45d6605f24b3641c541ff10a332d9f8
Signed-off-by: Omer Frenkel 
---
M vdsm/rpc/vdsmapi-schema.json
M vdsm/virt/vmxml.py
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/47/40547/1

diff --git a/vdsm/rpc/vdsmapi-schema.json b/vdsm/rpc/vdsmapi-schema.json
index 0c73078..fa8f336 100644
--- a/vdsm/rpc/vdsmapi-schema.json
+++ b/vdsm/rpc/vdsmapi-schema.json
@@ -3583,6 +3583,9 @@
 #
 # @numOfIoThreads:#optional The num of iothreads qemu allocates
 #
+# @maxMemSize:The maximum amount of memory that can be assigned
+# to the VM in MB
+#
 # Since: 4.10.0
 ##
 {'type': 'VmDefinition',
@@ -3599,7 +3602,7 @@
   'status': 'VmStatus', 'timeOffset': 'uint',
   'transparentHugePages': 'bool', 'vmId': 'UUID', 'vmName': 'str',
   'vmType': 'VmType', '*exitCode': 'int', '*exitMessage': 'str',
-  '*serial': 'str', '*numOfIoThreads': 'uint'}}
+  '*serial': 'str', '*numOfIoThreads': 'uint', 'maxMemSize': 'uint'}}
 
 ##
 # @VmParameters:
diff --git a/vdsm/virt/vmxml.py b/vdsm/virt/vmxml.py
index 02bbb52..ea5b34e 100644
--- a/vdsm/virt/vmxml.py
+++ b/vdsm/virt/vmxml.py
@@ -167,6 +167,10 @@
 memSizeKB = str(int(self.conf.get('memSize', '256')) * 1024)
 self.dom.appendChildWithArgs('memory', text=memSizeKB)
 self.dom.appendChildWithArgs('currentMemory', text=memSizeKB)
+if 'maxMemSize' in self.conf:
+maxMemSizeKB = str(int(self.conf['maxMemSize']) * 1024)
+self.dom.appendChildWithArgs('maxMemory', text=maxMemSizeKB,
+ slots=self._getMaxVCpus())
 vcpu = self.dom.appendChildWithArgs('vcpu', text=self._getMaxVCpus())
 vcpu.setAttrs(**{'current': self._getSmp()})
 


-- 
To view, visit https://gerrit.ovirt.org/40547
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54a698fbd45d6605f24b3641c541ff10a332d9f8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches