[PATCH v2] [Kimchi 2/2] Implement multi-function pci hotplug support
by Jose Ricardo Ziviani
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
model/vmhostdevs.py | 100 +++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 91 insertions(+), 9 deletions(-)
diff --git a/model/vmhostdevs.py b/model/vmhostdevs.py
index 7051324..2130ac4 100644
--- a/model/vmhostdevs.py
+++ b/model/vmhostdevs.py
@@ -97,6 +97,22 @@ class VMHostDevsModel(object):
return self.task.lookup(taskid)
+ def _get_pci_devices_xml(self, pci_infos, slot, driver):
+ hostdevs = ''
+ # all devices included in the xml will be sorted in reverse (the
+ # function 0 will be the last one) and will include the guest
+ # address details
+ for dev_info in sorted(pci_infos,
+ key=itemgetter('function'),
+ reverse=True):
+
+ dev_info['detach_driver'] = driver
+ hostdevs += self._get_pci_device_xml(dev_info,
+ slot,
+ True)
+
+ return '<devices>%s</devices>' % hostdevs
+
def _get_pci_device_xml(self, dev_info, slot, is_multifunction):
if 'detach_driver' not in dev_info:
dev_info['detach_driver'] = 'kvm'
@@ -108,12 +124,6 @@ class VMHostDevsModel(object):
driver = E.driver(name=dev_info['detach_driver'])
if is_multifunction:
- multi = E.address(type='pci',
- domain='0',
- bus='0',
- slot=str(slot),
- function=str(dev_info['function']))
-
if dev_info['function'] == 0:
multi = E.address(type='pci',
domain='0',
@@ -122,6 +132,13 @@ class VMHostDevsModel(object):
function=str(dev_info['function']),
multifunction='on')
+ else:
+ multi = E.address(type='pci',
+ domain='0',
+ bus='0',
+ slot=str(slot),
+ function=str(dev_info['function']))
+
host_dev = E.hostdev(source, driver, multi,
mode='subsystem', type='pci', managed='yes')
@@ -168,7 +185,7 @@ class VMHostDevsModel(object):
if free < slot:
return free
- return free+1
+ return free + 1
def _attach_pci_device(self, cb, params):
cb('Attaching PCI device')
@@ -198,8 +215,7 @@ class VMHostDevsModel(object):
pci_infos = [dev_model.lookup(dev_name) for dev_name in group_names]
pci_infos.append(dev_info)
- is_multifunction = len(pci_infos) > 1 and \
- DOM_STATE_MAP[dom.info()[0]] == "shutoff"
+ is_multifunction = len(pci_infos) > 1
pci_infos = sorted(pci_infos, key=itemgetter('name'))
# does not allow hot-plug of 3D graphic cards
@@ -234,8 +250,32 @@ class VMHostDevsModel(object):
slot = 0
if is_multifunction:
+ # search for the first available slot in guest xml
slot = self._available_slot(dom)
+
with RollbackContext() as rollback:
+ # multifunction hotplug is a special case where all functions
+ # must be attached together within one xml file, the same does
+ # not happen to multifunction coldplug - where each function is
+ # attached individually
+ if DOM_STATE_MAP[dom.info()[0]] != 'shutoff' and is_multifunction:
+ xmlstr = self._get_pci_devices_xml(pci_infos, slot, driver)
+
+ try:
+ dom.attachDeviceFlags(xmlstr, device_flags)
+
+ except libvirt.libvirtError:
+ wok_log.error(
+ 'Failed to attach mutifunction device VM %s: \n%s',
+ vmid, xmlstr)
+ raise
+
+ rollback.prependDefer(dom.detachDeviceFlags, xmlstr,
+ device_flags)
+ rollback.commitAll()
+ cb('OK', True)
+ return
+
for pci_info in pci_infos:
pci_info['detach_driver'] = driver
cb('Reading source device XML')
@@ -486,6 +526,14 @@ class VMHostDevModel(object):
raise InvalidOperation('KCHVMHDEV0006E',
{'name': dev_info['name']})
+ if self._hotunplug_multifunction_pci(dom, hostdev, dev_name):
+ if is_3D_device:
+ cb('Updating MMIO from VM...')
+ devsmodel = VMHostDevsModel(conn=self.conn)
+ devsmodel.update_mmio_guest(vmid, False)
+ cb('OK', True)
+ return
+
for e in hostdev:
if DeviceModel.deduce_dev_name(e, self.conn) == dev_name:
xmlstr = etree.tostring(e)
@@ -506,6 +554,40 @@ class VMHostDevModel(object):
cb('OK', True)
+ def _get_devices_same_addr(self, hostdev, domain, bus, slot):
+ devices = []
+ for device in hostdev:
+ if device.attrib['type'] != 'pci':
+ continue
+
+ address = device.source.address
+ if int(address.attrib['domain'], 16) != domain or \
+ int(address.attrib['bus'], 16) != bus or \
+ int(address.attrib['slot'], 16) != slot:
+ continue
+
+ devices.append(etree.tostring(device))
+
+ return devices
+
+ def _hotunplug_multifunction_pci(self, dom, hostdev, dev_name):
+ domain, bus, slot, _ = dev_name.split('_')[1:]
+ # get all devices attached to the guest in the same domain+bus+slot
+ # that the one we are going to detach because they must be detached
+ # together
+ devices = self._get_devices_same_addr(hostdev,
+ int(domain, 16),
+ int(bus, 16),
+ int(slot, 16))
+ if len(devices) <= 1:
+ return False
+
+ devices_xml = '<devices>%s</devices>' % ''.join(devices)
+ dom.detachDeviceFlags(devices_xml,
+ get_vm_config_flag(dom, mode='all'))
+
+ return True
+
def _delete_affected_pci_devices(self, dom, dev_name, pci_devs):
dev_model = DeviceModel(conn=self.conn)
try:
--
2.7.4
8 years, 7 months
[PATCH v2] [Kimchi 1/2] Enable hot-plug multi-function pci on front-end
by Jose Ricardo Ziviani
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_edit_main.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index 66edbcb..4cee8fe 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -486,7 +486,7 @@ kimchi.guest_edit_main = function() {
$('.body', '#form-guest-edit-pci').append(itemNode);
pciEnabled || $('button', itemNode).remove();
$('button i', itemNode).addClass(iconClass);
- if (kimchi.thisVMState === "running" && (arrPCIDevices[i].multifunction || arrPCIDevices[i].vga3d)) {
+ if (kimchi.thisVMState === "running" && arrPCIDevices[i].vga3d) {
$('button', itemNode).prop("disabled", true);
}
$('button', itemNode).on('click', function(event) {
--
2.7.4
8 years, 7 months
[PATCH] [Kimchi 0/2] Implement multi-function pci hotplug
by Jose Ricardo Ziviani
This patchset implements multi-function pci hotplug for Kimchi. The
special point in it is the need to attach all functions at once (one xml
containing all devices) sorted (in reverse, the function 0 is the last
one). This logic also applies to hot unplug.
How to test the backend:
- hotplug
curl -u username -H "Content-Type: application/json" -H "Accept: application/json" https://host:8001/plugins/kimchi/vms/0fed23/hostdevs -X POST -d '{"name": "pci_0001_05_00_1"}'
- hotunplug
curl -u username -H "Content-Type: application/json" -H "Accept: application/json" https://host:8001/plugins/kimchi/vms/0fed23/hostdevs/pci_0001_05_00_0 -X DELETE
Note: it doesn't matter the function is chosen (pci_0001_05_00_0 or
pci_0001_05_00_1 in this case), both functions will be attached/detached accordingly.
Note2: attach/detach are async methods but UI is not reflecting it, it's
necessary to close/reopen the Edit window to see the PCI list updated.
Jose Ricardo Ziviani (2):
Enable hot-plug multi-function pci on front-end
Implement multi-function pci hotplug support
model/vmhostdevs.py | 96 +++++++++++++++++++++++++++++++++++--
ui/js/src/kimchi.guest_edit_main.js | 2 +-
2 files changed, 94 insertions(+), 4 deletions(-)
--
2.7.4
8 years, 7 months
[PATCH V4] [Kimchi] Handle Libvirt host ENOSPC event
by Lucio Correia
When storage pool is out of space and guest requires more,
guest is paused and nothing is told to the user. This patch
uses Libvirt Event handling and Asynchronous Notifications
mechanism to tell web users about what happened.
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
i18n.py | 1 +
model/libvirtevents.py | 28 ++++++++++++++++++++++++++++
model/model.py | 3 +++
3 files changed, 32 insertions(+)
V4: try/except added for libvirt event callback registration
diff --git a/i18n.py b/i18n.py
index 3a5a9d1..2d8390f 100644
--- a/i18n.py
+++ b/i18n.py
@@ -335,6 +335,7 @@ messages = {
"KCHEVENT0001E": _("Failed to register the default event implementation."),
"KCHEVENT0002E": _("Failed to register timeout event."),
"KCHEVENT0003E": _("Failed to Run the default event implementation."),
+ "KCHEVENT0004W": _("I/O error on guest '%(vm)s': storage pool out of space for %(devAlias)s (%(srcPath)s)."),
# These messages (ending with L) are for user log purposes
"KCHNET0001L": _("Created %(connection)s virtual network '%(name)s'"),
diff --git a/model/libvirtevents.py b/model/libvirtevents.py
index ab5c17d..6425f9b 100644
--- a/model/libvirtevents.py
+++ b/model/libvirtevents.py
@@ -22,6 +22,9 @@ import libvirt
import time
from wok.exception import OperationFailed
+from wok.message import WokMessage
+from wok.model.notifications import add_notification
+from wok.utils import wok_log
class LibvirtEvents(object):
@@ -57,3 +60,28 @@ class LibvirtEvents(object):
# Event loop handler used to limit length of waiting for any other event.
def _kimchi_EventTimeout(self, timer, opaque):
time.sleep(1)
+
+ def event_enospc_cb(self, conn, dom, path, dev, action, reason, args):
+ if reason == "enospc":
+ info = {
+ "vm": dom.name(),
+ "srcPath": path,
+ "devAlias": dev,
+ }
+ add_notification("KCHEVENT0004W", info, '/plugins/kimchi')
+ msg = WokMessage("KCHEVENT0004W", info, '/plugins/kimchi')
+ wok_log.warning(msg.get_text())
+
+ def handleEnospc(self, conn):
+ """
+ Register Libvirt IO_ERROR_REASON event to handle host ENOSPC
+ """
+ try:
+ conn.get().domainEventRegisterAny(
+ None,
+ libvirt.VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON,
+ self.event_enospc_cb,
+ libvirt.VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
+ )
+ except libvirt.libvirtError as e:
+ wok_log.error("Register of ENOSPC event failed: %s" % e.message)
diff --git a/model/model.py b/model/model.py
index ed474d2..327d5a7 100644
--- a/model/model.py
+++ b/model/model.py
@@ -50,6 +50,9 @@ class Model(BaseModel):
'eventsloop': self.events}
models = []
+ # Register for Libvirt's host ENOSPC event and notify UI if it happens
+ self.events.handleEnospc(self.conn)
+
# Import task model from Wok
instances = get_instances('wok.model.tasks')
for instance in instances:
--
1.9.1
8 years, 7 months
[PATCH] [Kimchi 2/2] Implement multi-function pci hotplug support
by Jose Ricardo Ziviani
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
model/vmhostdevs.py | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 93 insertions(+), 3 deletions(-)
diff --git a/model/vmhostdevs.py b/model/vmhostdevs.py
index 7051324..f643b6e 100644
--- a/model/vmhostdevs.py
+++ b/model/vmhostdevs.py
@@ -97,6 +97,24 @@ class VMHostDevsModel(object):
return self.task.lookup(taskid)
+ def _get_pci_devices_xml(self, pci_infos, slot, driver):
+ hostdevs = ''
+ # all devices included in the xml will be sorted in reverse (the
+ # function 0 will be the last one) and will include the guest
+ # address details
+ for dev_info in sorted(pci_infos,
+ key=itemgetter('function'),
+ reverse=True):
+
+ has_multif_flag = True if dev_info['function'] == 0 else False
+
+ dev_info['detach_driver'] = driver
+ hostdevs += self._get_pci_device_xml(dev_info,
+ slot,
+ has_multif_flag)
+
+ return '<devices>%s</devices>' % hostdevs
+
def _get_pci_device_xml(self, dev_info, slot, is_multifunction):
if 'detach_driver' not in dev_info:
dev_info['detach_driver'] = 'kvm'
@@ -122,6 +140,13 @@ class VMHostDevsModel(object):
function=str(dev_info['function']),
multifunction='on')
+ else:
+ multi = E.address(type='pci',
+ domain='0',
+ bus='0',
+ slot=str(slot),
+ function=str(dev_info['function']))
+
host_dev = E.hostdev(source, driver, multi,
mode='subsystem', type='pci', managed='yes')
@@ -168,7 +193,7 @@ class VMHostDevsModel(object):
if free < slot:
return free
- return free+1
+ return free + 1
def _attach_pci_device(self, cb, params):
cb('Attaching PCI device')
@@ -198,8 +223,7 @@ class VMHostDevsModel(object):
pci_infos = [dev_model.lookup(dev_name) for dev_name in group_names]
pci_infos.append(dev_info)
- is_multifunction = len(pci_infos) > 1 and \
- DOM_STATE_MAP[dom.info()[0]] == "shutoff"
+ is_multifunction = len(pci_infos) > 1
pci_infos = sorted(pci_infos, key=itemgetter('name'))
# does not allow hot-plug of 3D graphic cards
@@ -234,8 +258,32 @@ class VMHostDevsModel(object):
slot = 0
if is_multifunction:
+ # search for the first available slot in guest xml
slot = self._available_slot(dom)
+
with RollbackContext() as rollback:
+ # multifunction hotplug is a special case where all functions
+ # must be attached together within one xml file, the same does
+ # not happen to multifunction coldplug - where each function is
+ # attached individually
+ if DOM_STATE_MAP[dom.info()[0]] != 'shutoff' and is_multifunction:
+ xmlstr = self._get_pci_devices_xml(pci_infos, slot, driver)
+
+ try:
+ dom.attachDeviceFlags(xmlstr, device_flags)
+
+ except libvirt.libvirtError:
+ wok_log.error(
+ 'Failed to attach mutifunction device VM %s: \n%s',
+ vmid, xmlstr)
+ raise
+
+ rollback.prependDefer(dom.detachDeviceFlags, xmlstr,
+ device_flags)
+ rollback.commitAll()
+ cb('OK', True)
+ return
+
for pci_info in pci_infos:
pci_info['detach_driver'] = driver
cb('Reading source device XML')
@@ -486,6 +534,14 @@ class VMHostDevModel(object):
raise InvalidOperation('KCHVMHDEV0006E',
{'name': dev_info['name']})
+ if self._hotunplug_multifunction_pci(dom, hostdev, dev_name):
+ if is_3D_device:
+ cb('Updating MMIO from VM...')
+ devsmodel = VMHostDevsModel(conn=self.conn)
+ devsmodel.update_mmio_guest(vmid, False)
+ cb('OK', True)
+ return
+
for e in hostdev:
if DeviceModel.deduce_dev_name(e, self.conn) == dev_name:
xmlstr = etree.tostring(e)
@@ -506,6 +562,40 @@ class VMHostDevModel(object):
cb('OK', True)
+ def _get_devices_same_addr(self, hostdev, domain, bus, slot):
+ devices = []
+ for device in hostdev:
+ if device.attrib['type'] != 'pci':
+ continue
+
+ address = device.source.address
+ if int(address.attrib['domain'], 16) != domain or \
+ int(address.attrib['bus'], 16) != bus or \
+ int(address.attrib['slot'], 16) != slot:
+ continue
+
+ devices.append(etree.tostring(device))
+
+ return devices
+
+ def _hotunplug_multifunction_pci(self, dom, hostdev, dev_name):
+ domain, bus, slot, _ = dev_name.split('_')[1:]
+ # get all devices attached to the guest in the same domain+bus+slot
+ # that the one we are going to detach because they must be detached
+ # together
+ devices = self._get_devices_same_addr(hostdev,
+ int(domain, 16),
+ int(bus, 16),
+ int(slot, 16))
+ if len(devices) <= 1:
+ return False
+
+ devices_xml = '<devices>%s</devices>' % ''.join(devices)
+ dom.detachDeviceFlags(devices_xml,
+ get_vm_config_flag(dom, mode='all'))
+
+ return True
+
def _delete_affected_pci_devices(self, dom, dev_name, pci_devs):
dev_model = DeviceModel(conn=self.conn)
try:
--
2.7.4
8 years, 7 months
[PATCH] [Kimchi 1/2] Enable hot-plug multi-function pci on front-end
by Jose Ricardo Ziviani
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_edit_main.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index 66edbcb..4cee8fe 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -486,7 +486,7 @@ kimchi.guest_edit_main = function() {
$('.body', '#form-guest-edit-pci').append(itemNode);
pciEnabled || $('button', itemNode).remove();
$('button i', itemNode).addClass(iconClass);
- if (kimchi.thisVMState === "running" && (arrPCIDevices[i].multifunction || arrPCIDevices[i].vga3d)) {
+ if (kimchi.thisVMState === "running" && arrPCIDevices[i].vga3d) {
$('button', itemNode).prop("disabled", true);
}
$('button', itemNode).on('click', function(event) {
--
2.7.4
8 years, 7 months
[PATCH] [Wok] Added extended locale list arranged it in alphabetic order.
by archus@linux.vnet.ibm.com
From: Archana Singh <archus(a)linux.vnet.ibm.com>
Signed-off-by: Archana Singh <archus(a)linux.vnet.ibm.com>
---
ui/pages/login.html.tmpl | 194 +++++++++++++++++++++++++++++++++++++++++------
1 file changed, 172 insertions(+), 22 deletions(-)
diff --git a/ui/pages/login.html.tmpl b/ui/pages/login.html.tmpl
index 52b81fd..81b4e7a 100644
--- a/ui/pages/login.html.tmpl
+++ b/ui/pages/login.html.tmpl
@@ -138,28 +138,178 @@
<div class="form-group">
<label for="userLocale">$_("Locale")</label>
<select id="userLocale" class="selectpicker col-md-12 col-lg-12">
- <option value="af-NA">Afrikaans (Namibia)</option>
- <option value="ar-DZ">Arabic (Algeria)</option>
- <option value="az-AZ">Azerbaijani (Azerbaijan)</option>
- <option value="en-US">English (US)</option>
- <option value="hy-AM">Armenian (Armenia)</option>
- <option value="hi-IN">Hindi (India)</option>
- <option value="nl-BE">Dutch (Belgium)</option>
- <option value="ms-MY">Malay (Malaysia)</option>
- <option value="no-NO">Norwegian (Norway)</option>
- <option value="sq-AL">Albanian (Albania)</option>
- <option value="sv-SE">Swedish (Sweden)</option>
- <option value="uz-UZ">Uzbek (Uzbekistan)</option>
- <option value="zh-CN">中文(简体)</option>
- <option value="pt-BR">Português (Brasil)</option>
- <option value="de-DE">Deutsch (Deutschland)</option>
- <option value="es-ES">Español (España)</option>
- <option value="fr-FR">Français (France)</option>
- <option value="it-IT">Italiano (Italia)</option>
- <option value="ja-JP">日本語 (日本)</option>
- <option value="ko-KR">한국어 (대한민국)</option>
- <option value="ru-RU">Русский (Россия)</option>
- <option value="zh-TW">中文(繁體)</option>
+ <option value="af-ZA">Afrikaans (South Africa)</option>
+ <option value="sq-AL">Albanian (Albania)</option>
+ <option value="am-ET">Amharic (Ethiopia)</option>
+ <option value="ar-DZ">Arabic (Algeria)</option>
+ <option value="ar-BH">Arabic (Bahrain)</option>
+ <option value="ar-EG">Arabic (Egypt)</option>
+ <option value="ar-IQ">Arabic (Iraq)</option>
+ <option value="ar-JO">Arabic (Jordan)</option>
+ <option value="ar-KW">Arabic (Kuwait)</option>
+ <option value="ar-LB">Arabic (Lebanon)</option>
+ <option value="ar-LY">Arabic (Libya)</option>
+ <option value="ar-MR">Arabic (Mauritania)</option>
+ <option value="ar-MA">Arabic (Morocco)</option>
+ <option value="ar-OM">Arabic (Oman)</option>
+ <option value="ar-QA">Arabic (Qatar)</option>
+ <option value="ar-SA">Arabic (Saudi Arabia)</option>
+ <option value="ar-SY">Arabic (Syria)</option>
+ <option value="ar-TN">Arabic (Tunisia)</option>
+ <option value="ar-AE">Arabic (United Arab Emirates)</option>
+ <option value="ar-YE">Arabic (Yemen)</option>
+ <option value="hy-AM">Armenian (Armenia)</option>
+ <option value="as-IN">Assamese (India)</option>
+ <option value="az-AZ">Azerbaijani (Azerbaijan)</option>
+ <option value="eu-ES">Basque (Spain)</option>
+ <option value="be-BY">Belarusian (Belarus)</option>
+ <option value="bn-BD">Bengali (Bangladesh)</option>
+ <option value="bn-IN">Bengali (India)</option>
+ <option value="bs-BA">Bosnian (Bosnia)</option>
+ <option value="bg-BG">Bulgarian (Bulgaria)</option>
+ <option value="my-MM">Burmese (Myanmar)</option>
+ <option value="ca-ES">Catalan (Spain)</option>
+ <option value="zh-CN">Chinese-simplified (China)</option>
+ <option value="zh-SG">Chinese-simplified (Singapore)</option>
+ <option value="zh-HK">Chinese-traditional (Hong Kong S.A.R. of China)</option>
+ <option value="zh-MO">Chinese-traditional (Macao)</option>
+ <option value="zh-TW">Chinese-traditional (Taiwan)</option>
+ <option value="hr-HR">Croatian (Croatia)</option>
+ <option value="cs-CZ">Czech (Czech Republic)</option>
+ <option value="da-DK">Danish (Denmark)</option>
+ <option value="nl-BE">Dutch (Belgium)</option>
+ <option value="nl-NL">Dutch (The Netherlands)</option>
+ <option value="en-AU">English (Australia)</option>
+ <option value="en-BE">English (Belgium)</option>
+ <option value="en-CM">English (Cameroon)</option>
+ <option value="en-CA">English (Canada)</option>
+ <option value="en-GH">English (Ghana)</option>
+ <option value="en-HK">English (Hong Kong S.A.R. of China)</option>
+ <option value="en-IN">English (India)</option>
+ <option value="en-IE">English (Ireland)</option>
+ <option value="en-KE">English (Kenya)</option>
+ <option value="en-MU">English (Mauritius)</option>
+ <option value="en-NZ">English (New Zealand)</option>
+ <option value="en-NG">English (Nigeria)</option>
+ <option value="en-PH">English (Philippines)</option>
+ <option value="en-SG">English (Singapore)</option>
+ <option value="en-ZA">English (South Africa)</option>
+ <option value="en-TZ">English (Tanzania)</option>
+ <option value="en-GB">English (United Kingdom)</option>
+ <option value="en-US">English (United States)</option>
+ <option value="en-ZM">English (Zambia)</option>
+ <option value="et-EE">Estonian (Estonia)</option>
+ <option value="tl-PH">Filipino (Philippines)</option>
+ <option value="fi-FI">Finnish (Finland)</option>
+ <option value="fr-DZ">French (Algeria)</option>
+ <option value="fr-CM">French (Cameroon)</option>
+ <option value="fr-CD">French (Democratic Republic of the Congo)</option>
+ <option value="fr-BE">French (Belgium)</option>
+ <option value="fr-CA">French (Canada)</option>
+ <option value="fr-FR">French (France)</option>
+ <option value="fr-CI">French (Ivory Coast [Côte d’Ivoire])</option>
+ <option value="fr-LU">French (Luxembourg)</option>
+ <option value="fr-MR">French (Mauritania)</option>
+ <option value="fr-MU">French (Mauritius)</option>
+ <option value="fr-MA">French (Morocco)</option>
+ <option value="fr-SN">French (Senegal)</option>
+ <option value="fr-CH">French (Switzerland)</option>
+ <option value="fr-TN">French (Tunisia)</option>
+ <option value="gl-ES">Galician (Spain)</option>
+ <option value="lg-UG">Ganda (Uganda)</option>
+ <option value="ka-GE">Georgian (Georgia)</option>
+ <option value="de-AT">German (Austria)</option>
+ <option value="de-DE">German (Germany)</option>
+ <option value="de-LU">German (Luxembourg)</option>
+ <option value="de-CH">German (Switzerland)</option>
+ <option value="el-GR">Greek (Greece)</option>
+ <option value="gu-IN">Gujarati (India)</option>
+ <option value="ha-NG">Hausa (Nigeria)</option>
+ <option value="he-IL">Hebrew (Israel)</option>
+ <option value="hi-IN">Hindi (India)</option>
+ <option value="hu-HU">Hungarian (Hungary)</option>
+ <option value="is-IS">Icelandic (Iceland)</option>
+ <option value="ig-NG">Igbo (Nigeria)</option>
+ <option value="id-ID">Indonesian (Indonesia)</option>
+ <option value="it-IT">Italian (Italy)</option>
+ <option value="it-CH">Italian (Switzerland)</option>
+ <option value="ja-JP">Japanese (Japan)</option>
+ <option value="kn-IN">Kannada (India)</option>
+ <option value="kk-KZ">Kazakh (Kazakhstan)</option>
+ <option value="km-KH">Khmer (Cambodia)</option>
+ <option value="rw-RW">Kinyarwanda (Rwanda)</option>
+ <option value="kok-IN">Konkani (India)</option>
+ <option value="ko-KR">Korean (India)</option>
+ <option value="lo-LA">Lao (Korea, South)</option>
+ <option value="lv-LV">Latvian (Latvia)</option>
+ <option value="lt-LT">Lithuanian (Lithuania)</option>
+ <option value="mk-MK">Macedonian (Macedonia)</option>
+ <option value="ms-MY">Malay-Latin (Malaysia)</option>
+ <option value="ml-IN">Malayalam (India)</option>
+ <option value="mt-MT">Maltese (Malta)</option>
+ <option value="mr-IN">Marathi (India)</option>
+ <option value="mn-Cyrl-MN">Mongolian-Cyrillic (Mongolia)</option>
+ <option value="ne-IN">Nepali (India)</option>
+ <option value="ne-NP">Nepali (Nepal)</option>
+ <option value="nb-NO">Norwegian Bokmål (Norway)</option>
+ <option value="nn-NO">Norwegian Nynorsk (Norway)</option>
+ <option value="or-IN">Oriya [aka, Odia] (India)</option>
+ <option value="om-ET">Oromo (Ethiopia)</option>
+ <option value="pl-PL">Polish (Poland)</option>
+ <option value="pt-AO">Portuguese Bokmål (Angola)</option>
+ <option value="pt-BR">Portuguese Nynorsk (Brazil)</option>
+ <option value="pt-MO">Portuguese (Macao)</option>
+ <option value="pt-MZ">Portuguese (Mozambique)</option>
+ <option value="pt-PT">Portuguese (Portugal)</option>
+ <option value="pa-IN">Punjabi (India)</option>
+ <option value="ro-RO">Romanian (Romania)</option>
+ <option value="ru-RU">Russian (Russia)</option>
+ <option value="sr-RS">Serbian-Cyrillic (Serbia)</option>
+ <option value="sr-ME">Serbian-Latin (Montenegro)</option>
+ <option value="sr-Latn-RS">Serbian-Latin (Serbia)</option>
+ <option value="si-LK">Sinhala (Sri Lanka)</option>
+ <option value="sk-SK">Slovak (Slovakia)</option>
+ <option value="sl-SI">Slovenian (Slovenia)</option>
+ <option value="es-AR">Spanish (Argentina)</option>
+ <option value="es-BO">Spanish (Bolivia)</option>
+ <option value="es-CL">Spanish (Chile)</option>
+ <option value="es-CO">Spanish (Colombia)</option>
+ <option value="en-CR">Spanish (Costa Rica)</option>
+ <option value="es-DO">Spanish (Dominican Republic)</option>
+ <option value="es-EC">Spanish (Ecuador)</option>
+ <option value="es-SV">Spanish (El Salvador)</option>
+ <option value="es-GT">Spanish (Guatemala)</option>
+ <option value="en-HN">Spanish (Honduras)</option>
+ <option value="es-MX">Spanish (Mexico)</option>
+ <option value="es-NI">Spanish (Nicaragua)</option>
+ <option value="es-PA">Spanish (Panama)</option>
+ <option value="es-PY">Spanish (Paraguay)</option>
+ <option value="en-PE">Spanish (Peru)</option>
+ <option value="es-PR">Spanish (Puerto Rico)</option>
+ <option value="es-ES">Spanish (Spain)</option>
+ <option value="es-US">Spanish (United States)</option>
+ <option value="es-UY">Spanish (Uruguay)</option>
+ <option value="es-VE">Spanish (Venezuela)</option>
+ <option value="sw-KE">Swahili (Kenya)</option>
+ <option value="sw-TZ">Swahili (Tanzania)</option>
+ <option value="sv-SE">Swedish (Sweden)</option>
+ <option value="ta-IN">Tamil (India)</option>
+ <option value="te-IN">Telugu (Venezuela)</option>
+ <option value="th-TH">Thai (Thailand)</option>
+ <option value="tr-TR">Turkish (Turkey)</option>
+ <option value="uk-UA">Ukrainian (Ukraine)</option>
+ <option value="ur-IN">Urdu (India)</option>
+ <option value="ur-PK">Urdu (Pakistan)</option>
+ <option value="uz-Cyrl-UZ">Uzbek-Cyrillic (Uzbekistan)</option>
+ <option value="uz-Latn-UZ">Uzbek-Latin (Uzbekistan)</option>
+ <option value="vi-VN">Vietnamese (Vietnam)</option>
+ <option value="cy-GB">Welsh (United Kingdom)</option>
+ <option value="yo-NG">Yoruba (Nigeria)</option>
+ <option value="ZU-ZA">Zulu (South Africa)</option>
+ <option value="az-AZ">Azerbaijani-Latin (Azerbaijan)</option>
+ <option value="sr-CS">Serbian-Cyrillic ()</option>
+ <option value="sr-Cyrl-CS">Serbian-Cyrillic (Serbia and Montenegro)</option>
+ <option value="sr-Latn-CS">Serbian-Latin (Serbia and Montenegro)</option>
</select>
</div>
</form>
--
1.8.3.1
8 years, 7 months
[PATCH v2] [Kimchi] Decrease the sleep time for libvirt event timout
by Jose Ricardo Ziviani
- The current 1 second of sleeping time for libvirt event timeout
causes impact in the webserial console because the event is
blocked here for 1sec before arriving there. This commit
decreases this value to a smaller arbitrary value.
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
model/libvirtevents.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/model/libvirtevents.py b/model/libvirtevents.py
index ab5c17d..813d727 100644
--- a/model/libvirtevents.py
+++ b/model/libvirtevents.py
@@ -56,4 +56,4 @@ class LibvirtEvents(object):
# Event loop handler used to limit length of waiting for any other event.
def _kimchi_EventTimeout(self, timer, opaque):
- time.sleep(1)
+ time.sleep(0.01)
--
2.7.4
8 years, 7 months