[PATCH] [Kimchi 0/2] Issue #998 Not all static strings are externalized
by pkulkark@linux.vnet.ibm.com
From: Pooja Kulkarni <pkulkark(a)linux.vnet.ibm.com>
This patch set externalizes all the
static string that should be externalized
to support globalization. Also contains
the updated .pot and .po files
Pooja Kulkarni (2):
Issue #998 Not all static strings are externalized
Issue #998 Updated .pot and .po files
po/POTFILES.in | 1 +
po/de_DE.po | 254 ++++++++++++++++++++++++++--
po/en_US.po | 239 +++++++++++++++++++++++++--
po/es_ES.po | 254 ++++++++++++++++++++++++++--
po/fr_FR.po | 254 ++++++++++++++++++++++++++--
po/it_IT.po | 255 +++++++++++++++++++++++++++--
po/ja_JP.po | 254 ++++++++++++++++++++++++++--
po/kimchi.pot | 239 +++++++++++++++++++++++++--
po/ko_KR.po | 254 ++++++++++++++++++++++++++--
po/pt_BR.po | 254 ++++++++++++++++++++++++++--
po/ru_RU.po | 254 ++++++++++++++++++++++++++--
po/zh_CN.po | 254 ++++++++++++++++++++++++++--
po/zh_TW.po | 254 ++++++++++++++++++++++++++--
ui/js/src/kimchi.guest_storage_add.main.js | 12 +-
ui/js/src/kimchi.storagepool_add_main.js | 12 +-
ui/pages/guest-edit.html.tmpl | 14 +-
ui/pages/i18n.json.tmpl | 18 ++
17 files changed, 2937 insertions(+), 139 deletions(-)
--
2.1.0
8 years, 1 month
[PATCH] [Kimchi] Improve multifunction attach/detach operations
by Lucio Correia
Multifunction PCI device attach/detach operations now
need to be performed on all functions simultaneously.
For older libvirt versions, without that support, the
functions must be attached/detached individually. This
patch tries to attach all functions simultaneously and
fallback to individual attach/detach in case it fails.
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
model/vmhostdevs.py | 64 ++++++++++++++++++++++-------------------------------
1 file changed, 27 insertions(+), 37 deletions(-)
diff --git a/model/vmhostdevs.py b/model/vmhostdevs.py
index 0c89959..e289f03 100644
--- a/model/vmhostdevs.py
+++ b/model/vmhostdevs.py
@@ -232,15 +232,7 @@ class VMHostDevsModel(object):
raise
dom = VMModel.get_vm(vmid, self.conn)
- # Due to libvirt limitation, we don't support live assigne device
- # to vfio driver.
- driver = ('vfio' if DOM_STATE_MAP[dom.info()[0]] == "shutoff" and
- self.caps.kernel_vfio else 'kvm')
-
- # on powerkvm systems it must be vfio driver.
- distro, _, _ = platform.linux_distribution()
- if distro == 'IBM_PowerKVM':
- driver = 'vfio'
+ driver = 'vfio' if self.caps.kernel_vfio else 'kvm'
# Attach all PCI devices in the same IOMMU group
affected_names = self.devs_model.get_list(
@@ -296,34 +288,27 @@ class VMHostDevsModel(object):
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:
+ # multifuction: try to attach all functions together within one
+ # xml file. It requires libvirt support.
+ if is_multifunction:
xmlstr = self._get_pci_devices_xml(pci_infos, slot, driver)
try:
dom.attachDeviceFlags(xmlstr, device_flags)
except libvirt.libvirtError:
- msg = WokMessage('KCHVMHDEV0007E',
- {'device': pci_info['name'],
- 'vm': vmid})
- cb(msg.get_text(), False)
- wok_log.error(
- 'Failed to attach mutifunction device VM %s: \n%s',
- vmid, xmlstr)
- raise
-
- rollback.prependDefer(dom.detachDeviceFlags, xmlstr,
- device_flags)
- rollback.commitAll()
- if DOM_STATE_MAP[dom.info()[0]] == "shutoff":
- cb('OK', True)
- return
-
+ # If operation fails, we try the other way, where each
+ # function is attached individually
+ pass
+ else:
+ rollback.prependDefer(dom.detachDeviceFlags, xmlstr,
+ device_flags)
+ rollback.commitAll()
+ if DOM_STATE_MAP[dom.info()[0]] == "shutoff":
+ cb('OK', True)
+ return
+
+ # attach each function individually (multi or single function)
for pci_info in pci_infos:
pci_info['detach_driver'] = driver
xmlstr = self._get_pci_device_xml(pci_info,
@@ -638,7 +623,14 @@ class VMHostDevModel(object):
raise InvalidOperation('KCHVMHDEV0006E',
{'name': dev_info['name']})
- if self._hotunplug_multifunction_pci(dom, hostdev, dev_name):
+ # check for multifunction and detach all functions together
+ try:
+ multi = self._unplug_multifunction_pci(dom, hostdev, dev_name)
+ except libvirt.libvirtError:
+ multi = False
+
+ # successfully detached all functions: finish operation
+ if multi:
if is_3D_device:
devsmodel = VMHostDevsModel(conn=self.conn)
devsmodel.update_mmio_guest(vmid, False)
@@ -647,6 +639,7 @@ class VMHostDevModel(object):
cb('OK', True)
return
+ # detach each function individually
for e in hostdev:
if DeviceModel.deduce_dev_name(e, self.conn) == dev_name:
xmlstr = etree.tostring(e)
@@ -685,14 +678,11 @@ class VMHostDevModel(object):
return devices
- def _hotunplug_multifunction_pci(self, dom, hostdev, dev_name):
- if DOM_STATE_MAP[dom.info()[0]] == "shutoff":
- return False
-
- domain, bus, slot, _ = dev_name.split('_')[1:]
+ def _unplug_multifunction_pci(self, dom, hostdev, dev_name):
# 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
+ domain, bus, slot, _ = dev_name.split('_')[1:]
devices = self._get_devices_same_addr(hostdev,
int(domain, 16),
int(bus, 16),
--
2.7.4
8 years, 1 month
[PATCH] [Kimchi] Improve Fedora 24 identification
by Lucio Correia
Fedora 24 Server for x86_64 arch was not being identified by
Kimchi. This patch fixes it by adding more specific patterns
for Server and Workstation flavors.
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
isoinfo.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/isoinfo.py b/isoinfo.py
index 5eb68ab..e5725e2 100644
--- a/isoinfo.py
+++ b/isoinfo.py
@@ -117,9 +117,10 @@ iso_dir = [
('rhel', lambda m: m.group(2), 'RHEL(-LE)?[_/-](\d+\.\d+)'),
('debian', lambda m: m.group(1), 'Debian (\d+\.\d+)'),
('ubuntu', lambda m: m.group(2), '[Uu]buntu(-Server)? (\d+\.\d+)'),
+ ('fedora', lambda m: m.group(1), 'Fedora-WS-[\D-]+-(\d+)'),
+ ('fedora', lambda m: m.group(1), 'Fedora-S-[\w-]+-(\d+)'),
('fedora', lambda m: m.group(1), 'Fedora[ -](\d+)'),
('fedora', lambda m: m.group(1), 'Fedora.*-(\d+)-'),
- ('fedora', lambda m: m.group(1), 'Fedora-[\D-]+-(\d+)'),
('gentoo', lambda m: m.group(1), 'Gentoo Linux \w+ (\d+)'),
('powerkvm', 'live_cd', 'POWERKVM_LIVECD'),
('arch', lambda m: m.group(1), 'ARCH_(\d+)'),
--
2.7.4
8 years, 1 month
[PATCH] [Kimchi 0/3] Live migration enhancements
by dhbarboza82@gmail.com
From: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
This patch set makes enhancements to the live migration
backend, covering more scenarios and delivering more
error messages when things goes wrong.
Daniel Henrique Barboza (3):
Github #1007: use provided user for password-less setup
Github #1007: Fixing non-root ssh key generation
Adding libvirt remote connection verification
i18n.py | 2 ++
model/vms.py | 94 ++++++++++++++++++++++++++++++++++++++++++++----------------
2 files changed, 72 insertions(+), 24 deletions(-)
--
2.7.4
8 years, 1 month
[PATCH] [Kimchi] Issue #1053: View console, shutdown socket server for VM who's console is not readable instead writeable.
by archus@linux.vnet.ibm.com
From: Archana Singh <archus(a)linux.vnet.ibm.com>
Socket server gets closed for VM's serial console connection if its not readable instead writeable.
This is due to fact that _is_vm_listening_serial(...) only call _test_output if its readable
and not on writeable. Adding libvirt.VIR_STREAM_EVENT_WRITABLE solve the issue.
Also added libvirt.VIR_STREAM_EVENT_HANGUP event so that in case of hangup also
console gets connected.
Signed-off-by: Archana Singh <archus(a)linux.vnet.ibm.com>
---
serialconsole.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/serialconsole.py b/serialconsole.py
index 13ef331..725f55d 100644
--- a/serialconsole.py
+++ b/serialconsole.py
@@ -101,7 +101,9 @@ class SocketServer(Process):
while not is_listening:
libvirt.virEventRunDefaultImpl()
- console.eventAddCallback(libvirt.VIR_STREAM_EVENT_READABLE,
+ console.eventAddCallback(libvirt.VIR_STREAM_EVENT_READABLE |
+ libvirt.VIR_STREAM_EVENT_WRITABLE |
+ libvirt.VIR_STREAM_EVENT_HANGUP,
_test_output,
None)
libvirt_loop = threading.Thread(target=_event_loop)
@@ -111,6 +113,7 @@ class SocketServer(Process):
libvirt_loop.join(1)
if not libvirt_loop.is_alive():
+ wok_log.error("console libvirt stream is not listening to event")
console.eventRemoveCallback()
return True
--
2.7.4
8 years, 1 month
[PATCH] [Kimchi 0/3] Vitualization UI multiple changes
by rajgupta@linux.vnet.ibm.com
From: Rajat Gupta <rajggupta(a)linux.vnet.ibm.com>
1. Added UI validation for s390x Virtualization Guest Edit Add Storage
module
2. Added UI validation for s390x Virtualization Template Edit Add Storage
module
3. For s390x Virtualization under Edit Template display "Storage"
as header instead of "Storage Pool"
Rajat Gupta (3):
Added UI validation for s390x Virtualization Guest Edit Add Storage
module
Added UI validation for s390x Virtualization Template Edit Add Storage
module
For s390x virtualization edit template display "Storage" as header
ui/css/kimchi.css | 23 ++---
ui/css/src/modules/_templates.scss | 3 +
ui/js/src/kimchi.guest_storage_add.main.js | 130 +++++++++++++++++++----------
ui/js/src/kimchi.template_edit_main.js | 59 +++++++++----
ui/pages/i18n.json.tmpl | 4 +
ui/pages/template-edit.html.tmpl | 1 +
6 files changed, 147 insertions(+), 73 deletions(-)
--
2.1.0
8 years, 1 month
[PATCH] Issue #1052 : incorrect pool initialisation on s390x
by harshalp@linux.vnet.ibm.com
From: Harshal Patil <harshalp(a)linux.vnet.ibm.com>
This patch fixes issue with initialisation of storage pools
on s390x when they are explicitly mentioned in
template_s390x.conf file
Signed-off-by: Harshal Patil <harshalp(a)linux.vnet.ibm.com>
---
model/storagepools.py | 5 ++++-
osinfo.py | 25 +++++++++++++++++--------
2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/model/storagepools.py b/model/storagepools.py
index 5942b31..e918f10 100644
--- a/model/storagepools.py
+++ b/model/storagepools.py
@@ -74,7 +74,10 @@ class StoragePoolsModel(object):
pools = {}
if is_s390x():
- return
+ # Don't create default pool if it's not
+ # explicitly specified in template_s390x.conf
+ if 'pool' not in tmpl_defaults['disks'][0]:
+ return
default_pool = tmpl_defaults['disks'][0]['pool']['name']
default_pool = default_pool.split('/')[-1]
diff --git a/osinfo.py b/osinfo.py
index 1527896..bf649f1 100644
--- a/osinfo.py
+++ b/osinfo.py
@@ -210,16 +210,25 @@ def _get_tmpl_defaults():
data['index'] = int(disk.split('.')[1])
# Right now 'Path' is only supported on s390x
if storage_section[disk].get('path') and is_on_s390x:
- data['path'] = storage_section[disk].pop('path')
- if 'size' not in storage_section[disk]:
- data['size'] = tmpl_defaults['storage']['disk.0']['size']
- else:
- data['size'] = storage_section[disk].pop('size')
+ if storage_section[disk].get('pool'):
+ # If 'pool' is explicitly specified in
+ # template_s390x.conf, drop 'path'
+ storage_section[disk].pop('path', None)
+ data['pool'] = {"name": '/plugins/kimchi/storagepools/' +
+ storage_section[disk].pop('pool')}
- if 'format' not in storage_section[disk]:
- data['format'] = tmpl_defaults['storage']['disk.0']['format']
else:
- data['format'] = storage_section[disk].pop('format')
+ data['path'] = storage_section[disk].pop('path')
+ if 'size' not in storage_section[disk]:
+ data['size'] = tmpl_defaults['storage']['disk.0']['size']
+ else:
+ data['size'] = storage_section[disk].pop('size')
+
+ if 'format' not in storage_section[disk]:
+ data['format'] = tmpl_defaults['storage']['disk.0']['format']
+ else:
+ data['format'] = storage_section[disk].pop('format')
+
else:
data['pool'] = {"name": '/plugins/kimchi/storagepools/' +
storage_section[disk].pop('pool')}
--
2.7.4
8 years, 1 month
[PATCH][Kimchi 2/2] Use tablet_bus for tablet input instead of kbd_bus
by Ramon Medeiros
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
vmtemplate.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vmtemplate.py b/vmtemplate.py
index 0288330..06ee845 100644
--- a/vmtemplate.py
+++ b/vmtemplate.py
@@ -371,7 +371,7 @@ class VMTemplate(object):
"""
tablet = """
- <input type='tablet' bus='%(kbd_bus)s'> </input>
+ <input type='tablet' bus='%(tablet_bus)s'> </input>
"""
video = """
--
2.7.4
8 years, 1 month
[PATCH] [Kimchi] Remove PowerKVM checks from memory alignment code
by Lucio Correia
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
model/templates.py | 3 +--
model/vms.py | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/model/templates.py b/model/templates.py
index e5b111a..c3e24e1 100644
--- a/model/templates.py
+++ b/model/templates.py
@@ -327,8 +327,7 @@ def validate_memory(memory):
'maxmem': str(maxmem)})
# make sure memory and Maxmemory are alingned in 256MiB in PowerPC
- distro, _, _ = platform.linux_distribution()
- if distro == "IBM_PowerKVM":
+ if platform.machine().startswith('ppc'):
if current % PPC_MEM_ALIGN != 0:
raise InvalidParameter('KCHVM0071E',
{'param': "Memory",
diff --git a/model/vms.py b/model/vms.py
index a1b0df7..f4df4a3 100644
--- a/model/vms.py
+++ b/model/vms.py
@@ -1086,8 +1086,7 @@ class VMModel(object):
memory = new_mem - old_mem
flags = libvirt.VIR_DOMAIN_MEM_CONFIG | libvirt.VIR_DOMAIN_MEM_LIVE
- distro, _, _ = platform.linux_distribution()
- if distro == "IBM_PowerKVM":
+ if platform.machine().startswith('ppc'):
# make sure memory is alingned in 256MiB in PowerPC
if (new_mem % PPC_MEM_ALIGN != 0):
raise InvalidParameter('KCHVM0071E',
--
2.7.4
8 years, 1 month
[PATCH] [Wok] Bug fix #146: Do not display Wok tab for non-admin users
by Aline Manera
The Wok tab is restricted to admin users so do not load it for non-admin
users. It implies in changing the way Wok loads the tabs as all the
children tabs may be hidden for non-admin users and consequently the
pattern tab should not be loaded as well.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
src/wok/utils.py | 2 +-
ui/js/src/wok.main.js | 31 +++++++++++--------------------
2 files changed, 12 insertions(+), 21 deletions(-)
diff --git a/src/wok/utils.py b/src/wok/utils.py
index 0b74fd8..52f6cea 100644
--- a/src/wok/utils.py
+++ b/src/wok/utils.py
@@ -97,7 +97,7 @@ def get_enabled_plugins():
def get_all_tabs():
- files = []
+ files = [os.path.join(paths.ui_dir, 'config/tab-ext.xml')]
for plugin, _ in get_enabled_plugins():
files.append(os.path.join(PluginPaths(plugin).ui_dir,
diff --git a/ui/js/src/wok.main.js b/ui/js/src/wok.main.js
index eb7fd28..3872580 100644
--- a/ui/js/src/wok.main.js
+++ b/ui/js/src/wok.main.js
@@ -33,6 +33,7 @@ wok.main = function() {
wok.popable();
var genTabs = function(tabs) {
+ var functionalTabs = [];
var tabsHtml = [];
$(tabs).each(function(i, tab) {
tab_i18n = i18n[tab] ? i18n[tab] : tab;
@@ -52,9 +53,16 @@ wok.main = function() {
'<input name="helpPath" class="sr-only" value="' + helpPath + '" type="hidden"/>',
'</li>'
);
+
+ if (functionalTabs.indexOf(functionality) == -1) {
+ functionalTabs.push(functionality)
+ }
}
});
- return tabsHtml.join('');
+
+ $('#functionalTabPanel ul').append(genFuncTabs(functionalTabs));
+ $('#tabPanel ul').append(tabsHtml.join(''));
+ return;
};
var genFuncTabs = function(tabs){
@@ -73,7 +81,6 @@ wok.main = function() {
var parseTabs = function(xmlData) {
var tabs = [];
- var functionalTabs = {};
var functionality = $(xmlData).find('functionality').text();
$(xmlData).find('tab').each(function() {
var $tab = $(this);
@@ -124,9 +131,7 @@ wok.main = function() {
var pluginI18nUrl = 'plugins/{plugin}/i18n.json';
var DEFAULT_HASH;
var buildTabs = function(callback) {
- var tabs = [];
- var functionalTabs = [];
- var wokTabs = retrieveTabs(wokConfigUrl);
+ var tabs = retrieveTabs(wokConfigUrl);
wok.listPlugins(function(plugins) {
$(plugins).each(function(i, p) {
var url = wok.substitute(pluginConfigUrl, {
@@ -140,23 +145,10 @@ wok.main = function() {
}, i18nUrl, true);
var pluginTabs = retrieveTabs(url);
if(pluginTabs.length > 0){
- var func = pluginTabs[0].functionality
- if (functionalTabs.indexOf(func) == -1) {
- functionalTabs.push(pluginTabs[0].functionality)
- }
tabs.push.apply(tabs, pluginTabs);
}
});
- //ordering of first level tab
- functionalTabs.sort();
- if(wokTabs.length > 0){
- //Adds wok to first index in list
- functionalTabs.unshift(wokTabs[0].functionality);
- //Adds Wok tabs to the list
- tabs.unshift.apply(tabs, wokTabs);
- }
-
//sort second level tab based on their ordering number
var orderedTabs = tabs.slice(0);
orderedTabs.sort(function(a, b) {
@@ -174,8 +166,7 @@ wok.main = function() {
defaultTabPath.substring(0, defaultTabPath.lastIndexOf('.'))
}
- $('#functionalTabPanel ul').append(genFuncTabs(functionalTabs));
- $('#tabPanel ul').append(genTabs(orderedTabs));
+ genTabs(orderedTabs);
wok.getHostname();
wok.logos('ul#plugins',true);
wok.logos('ul#wok-about',false);
--
2.7.4
8 years, 1 month