Adam Litke has uploaded a new change for review.
Change subject: rest-api: Model VMs
......................................................................
rest-api: Model VMs
API Implemented:
----------------
/api/vms : Virtual machines
* Manipulate virtual machines
* Manipulate VM sub-collections: disks, cdroms, nics
Actions:
/api/vms/create
- Create a new VM and launch it
/api/vms/<id>/destroy
- Stop a running VM
/api/vms/<id>/pause
- Pause a running VM
/api/vms/<id>/cont
- Continue a paused VM
/api/vms/<id>/ticket
- Assign a connection password for the VM's display
* Not fully implemented.
Due to vdsm API limitations this part of the API is not yet fully-functional.
Consider a RESTful VM creation sequence:
POST /api/vms/define - Define a new VM in the system
POST /api/vms/<id>/disks/add - Add a new disk to the VM
POST /api/vms/<id>/cdroms/add - Add a cdrom
POST /api/vms/<id>/nics/add - Add a NIC
PUT /api/vms/<id> - Change boot sequence
POST /api/vms/<id>/start - Boot the VM
Unfortunately this is not possible today with vdsm because a VM must be
fully-specified at the time of creation and it will be started immediately.
There are two ways forward:
1.) Deviate from a REST model and require a VM resource definition to include
all sub-collections inline.
-- or --
2.) Support storage of vm definitions so that powered off VMs can be manipulated
by the API.
My preference would be #2 because: it makes the API more closely follow RESTful
principles, it maintains parity with the cluster-level VM manipulation API, and
it makes the API easier to use in standalone mode.
Change-Id: Ibed650a0215e7d841f5af0dd5f111a3e4a27ecf1
Signed-off-by: Adam Litke <agl(a)us.ibm.com>
---
M vdsm/rest/Controller.py
M vdsm/rest/templates/Makefile.am
M vdsm/rest/templates/api.xsd
M vdsm/rest/templates/root.json.x
M vdsm/rest/templates/root.xml.x
M vdsm/rest/templates/rsdl.xml
A vdsm/rest/templates/vm.json.x
A vdsm/rest/templates/vm.xml.x
A vdsm/rest/templates/vmcdrom.json.x
A vdsm/rest/templates/vmcdrom.xml.x
A vdsm/rest/templates/vmcdroms.json.x
A vdsm/rest/templates/vmcdroms.xml.x
A vdsm/rest/templates/vmdisk.json.x
A vdsm/rest/templates/vmdisk.xml.x
A vdsm/rest/templates/vmdisks.json.x
A vdsm/rest/templates/vmdisks.xml.x
A vdsm/rest/templates/vmnic.json.x
A vdsm/rest/templates/vmnic.xml.x
A vdsm/rest/templates/vmnics.json.x
A vdsm/rest/templates/vmnics.xml.x
A vdsm/rest/templates/vms.json.x
A vdsm/rest/templates/vms.xml.x
22 files changed, 990 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/56/3756/1
--
To view, visit http://gerrit.ovirt.org/3756
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibed650a0215e7d841f5af0dd5f111a3e4a27ecf1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <agl(a)us.ibm.com>
Hello Roy Golan, Omer Frenkel,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/7145
to review the following change.
Change subject: BZ#847744 fenceNode API is missing the options argument
......................................................................
BZ#847744 fenceNode API is missing the options argument
Yes, ovirt-3.1 is happily released by now, but I find this bug so
devastating, that I would like us to consider a follow-up build of vdsm.
Change-Id: Ib2ce9b0f71040f9198413fa06c5d8768994842ec
Signed-off-by: Roy Golan <rgolan(a)redhat.com>
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/7058
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
Reviewed-by: Omer Frenkel <ofrenkel(a)redhat.com>
Tested-by: Omer Frenkel <ofrenkel(a)redhat.com>
---
M vdsm/BindingXMLRPC.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/7145/1
diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py
index 7c65e6a..e1a61f1 100644
--- a/vdsm/BindingXMLRPC.py
+++ b/vdsm/BindingXMLRPC.py
@@ -352,7 +352,7 @@
secure=False, options=''):
api = API.Global(self.cif)
return api.fenceNode(addr, port, agent, username, password,
- action, secure)
+ action, secure, options)
def setLogLevel(self, level):
api = API.Global(self.cif)
--
To view, visit http://gerrit.ovirt.org/7145
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2ce9b0f71040f9198413fa06c5d8768994842ec
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.1
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gal Hammer has uploaded a new change for review.
Change subject: Change waitForMigrationDestinationPrepare function waiting.
......................................................................
Change waitForMigrationDestinationPrepare function waiting.
The change is to avoid timeouts during migration of several
VMs at once. The new implementation doesn't start the timer
until the VM starts it creation (e.g. acquired the
_ongoingCreations lock).
Change-Id: I017980ee6da676af654b0dd225928830818ebbd3
Signed-off-by: Gal Hammer <ghammer(a)redhat.com>
---
M vdsm/libvirtvm.py
M vdsm/vm.py
2 files changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/96/6396/1
--
To view, visit http://gerrit.ovirt.org/6396
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I017980ee6da676af654b0dd225928830818ebbd3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Gal Hammer <ghammer(a)redhat.com>
Igor Lvovsky has uploaded a new change for review.
Change subject: BZ#846312 - Keep max MTU when adding non-VLANed bridgeless network
......................................................................
BZ#846312 - Keep max MTU when adding non-VLANed bridgeless network
Change-Id: Ie9c05b9ebcba298d1ab897e2ac5b979c3c9ea29b
Signed-off-by: Igor Lvovsky <ilvovsky(a)redhat.com>
---
M vdsm/configNetwork.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/77/7477/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index 8f01657..af7bcac 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -831,7 +831,7 @@
configWriter = ConfigWriter()
prevmtu = None
- if mtu and vlan:
+ if mtu:
prevmtu = configWriter.getMaxMtu(nics, mtu)
nic = nics[0] if nics else None
--
To view, visit http://gerrit.ovirt.org/7477
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9c05b9ebcba298d1ab897e2ac5b979c3c9ea29b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Igor Lvovsky <ilvovsky(a)redhat.com>
Igor Lvovsky has uploaded a new change for review.
Change subject: BZ#846312 - Keep MTU on ehtX after bond editing, when ethX part of this bond
......................................................................
BZ#846312 - Keep MTU on ehtX after bond editing, when ethX part of this bond
Change-Id: Iffba66b245f924e88e1c89caa71c5d3cb15b77be
Signed-off-by: Igor Lvovsky <ilvovsky(a)redhat.com>
---
M vdsm/configNetwork.py
1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/64/7464/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index 0dc5f34..1c69294 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -1117,6 +1117,12 @@
bridge = brNets[0] if brNets else None
if bond in _netinfo.bondings:
+ # Save MTU for future set on NICs
+ confParams = netinfo.getIfaceCfg(bond)
+ mtu = confParams.get('MTU', None)
+ if mtu:
+ mtu = int(mtu)
+
ifdown(bond)
# Take down all bond's NICs.
for nic in _netinfo.getNicsForBonding(bond):
@@ -1130,11 +1136,11 @@
# Anyway, we will not be able to take it down with connected VMs
# First we need to prepare all conf files
- configWriter.addBonding(bond, bridge=bridge,
+ configWriter.addBonding(bond, bridge=bridge, mtu=mtu,
bondingOptions=bondAttrs.get('options', None))
for nic in bondAttrs['nics']:
- configWriter.addNic(nic, bonding=bond)
+ configWriter.addNic(nic, bonding=bond, mtu=mtu)
# Now we can run ifup for all interfaces
ifup(bond)
--
To view, visit http://gerrit.ovirt.org/7464
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffba66b245f924e88e1c89caa71c5d3cb15b77be
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Igor Lvovsky <ilvovsky(a)redhat.com>