[PATCH] [Kimchi] Bug fix: Display full Volume dropdown menu content even when pool has few volumes
by Aline Manera
When the storage pool has one or two storage volumes, the dropdown menu
would not display all the options as the height set to it was not
enough.
To avoid that, increase the min-height configuration.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
ui/css/kimchi.css | 6 +++++-
ui/css/src/modules/_storage.scss | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/ui/css/kimchi.css b/ui/css/kimchi.css
index 0af9293..2d44919 100644
--- a/ui/css/kimchi.css
+++ b/ui/css/kimchi.css
@@ -2514,11 +2514,15 @@ ul {
#storage-root-container .volumes .volumeslist {
padding: 22px;
- min-height: 136px;
+ min-height: 188px;
max-height: 505px;
overflow: hidden;
}
+#storage-root-container .volumes .volumeslist .wok-list {
+ min-height: inherit;
+}
+
#storage-root-container .volumes .volumeslist .row {
font-size: 0;
margin-bottom: 22px;
diff --git a/ui/css/src/modules/_storage.scss b/ui/css/src/modules/_storage.scss
index 70cb3fa..c8b84a9 100644
--- a/ui/css/src/modules/_storage.scss
+++ b/ui/css/src/modules/_storage.scss
@@ -82,11 +82,15 @@
.volumeslist {
padding: 22px;
- min-height: 136px;
+ min-height: 188px;
max-height: 505px;
overflow: hidden;
}
+ .volumeslist .wok-list {
+ min-height: inherit;
+ }
+
.volumeslist .row {
font-size: 0;
margin-bottom: 22px;
--
2.9.3
7 years, 9 months
[PATCH] [Kimchi] Bug fix: Proper display storage volume content on gallery view
by Aline Manera
On Storage volume gallery view, the volume box content was a mess. Fix it.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
ui/css/kimchi.css | 10 +++++-----
ui/css/src/modules/_storage.scss | 10 +++++-----
ui/pages/tabs/storage.html.tmpl | 6 +++---
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/ui/css/kimchi.css b/ui/css/kimchi.css
index 2d44919..948b888 100644
--- a/ui/css/kimchi.css
+++ b/ui/css/kimchi.css
@@ -2683,7 +2683,7 @@ ul {
#storage-root-container .volumes .wok-gallery .volume-box-inner {
padding: 0 16px;
width: 409px;
- height: 150px;
+ height: auto;
display: flex;
flex-flow: row wrap;
justify-content: space-around;
@@ -2745,8 +2745,8 @@ ul {
#storage-root-container .volumes .wok-gallery span.column-format,
#storage-root-container .volumes .wok-gallery span.column-type {
order: 3;
- width: 142px;
- margin-top: -5px;
+ width: auto;
+ margin: 5px 0px;
}
#storage-root-container .volumes .wok-gallery span.gallery-header {
@@ -2937,14 +2937,14 @@ ul {
@media (min-width: 992px) {
#storage-root-container .volumes .wok-list.wok-datagrid > .wok-datagrid-header > span.column-name,
#storage-root-container .volumes .wok-list.wok-datagrid > .wok-datagrid-body > .wok-datagrid-row > div > div > div > span.column-name {
- width: 250px;
+ width: 450px;
}
}
@media (min-width: 1200px) {
#storage-root-container .volumes .wok-list.wok-datagrid > .wok-datagrid-header > span.column-name,
#storage-root-container .volumes .wok-list.wok-datagrid > .wok-datagrid-body > .wok-datagrid-row > div > div > div > span.column-name {
- width: 300px;
+ width: 500px;
}
}
diff --git a/ui/css/src/modules/_storage.scss b/ui/css/src/modules/_storage.scss
index 0123009..cf81d1b 100644
--- a/ui/css/src/modules/_storage.scss
+++ b/ui/css/src/modules/_storage.scss
@@ -240,7 +240,7 @@
.volume-box-inner {
padding: 0 16px;
width: 409px;
- height: 150px;
+ height: auto;
display: flex;
flex-flow: row wrap;
justify-content: space-around;
@@ -303,8 +303,8 @@
span.column-format,
span.column-type {
order: 3;
- width: 142px;
- margin-top: -5px;
+ width: auto;
+ margin: 5px 0px;
}
span.gallery-header {
@@ -457,10 +457,10 @@
> span.column-name {
width: 202px;
@media (min-width: $screen-md) {
- width: 250px;
+ width: 450px;
}
@media (min-width: $screen-lg) {
- width: 300px;
+ width: 500px;
}
label {
diff --git a/ui/pages/tabs/storage.html.tmpl b/ui/pages/tabs/storage.html.tmpl
index 9675579..ad88b65 100644
--- a/ui/pages/tabs/storage.html.tmpl
+++ b/ui/pages/tabs/storage.html.tmpl
@@ -1,7 +1,7 @@
#*
* Project Kimchi
*
- * Copyright IBM Corp, 2013-2016
+ * Copyright IBM Corp, 2013-2017
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -172,10 +172,10 @@
<input type="checkbox" class="wok-checkbox" name="selected-volume[]" id="{checkbox}" value="{name}">
<label class="volume-name volume-name-filter" for="{checkbox}"><span class="volume-inline-progress hidden"><span class="wok-loading-icon"></span></span> {name}</label><!--
--></span><!--
+ --><span class="column-used"><span role="presentation" class="volume-icon {capacityIcon}"></span> {capacityLevel}%</span><!--
+ --><span class="column-used-by volume-used-by-filter"><i class="fa fa-exclamation-circle" data-toggle="tooltip" title="$_('Used by the following VMs:') {used_by_formatted}" data-placement="bottom" data-original-title="$_('Used by the following VMs:') {used_by_formatted}"></i><span class="format-text" data-toggle="tooltip" title="$_('Used by the following VMs:') {used_by_formatted}" data-placement="bottom" data-original-title="$_('Used by the following VMs:') {used_by_formatted}">{used_by_text}</span></span><!--
--><span class="column-format volume-format-filter"><span class="gallery-header" title="$_('Format')">$_('Format')</span><span class="format-text">{format}</span></span><!--
--><span class="column-type volume-type-filter"><span class="gallery-header" title="$_('Type')">$_('Type')</span>{type}</span><!--
- --><span class="column-used-by volume-used-by-filter"><i class="fa fa-exclamation-circle" data-toggle="tooltip" title="$_('Used by the following VMs:') {used_by_formatted}" data-placement="bottom" data-original-title="$_('Used by the following VMs:') {used_by_formatted}"></i><span class="format-text" data-toggle="tooltip" title="$_('Used by the following VMs:') {used_by_formatted}" data-placement="bottom" data-original-title="$_('Used by the following VMs:') {used_by_formatted}">{used_by_text}</span></span><!--
- --><span class="column-used"><span role="presentation" class="volume-icon {capacityIcon}"></span> {capacityLevel}%</span><!--
--><span class="column-allocated"><span class="gallery-header" title="$_('Allocation')">$_('Allocation')</span>{allocation}</span><!--
--><span class="column-capacity"><span class="gallery-header" title="$_('Capacity')">$_('Capacity')</span>{capacity}</span><!--
--><span class="column-progress hidden"><span class="progress-status"></span> <span class="progress-transferred"></span>
--
2.9.3
7 years, 9 months
[PATCH] [Kimchi] Bug fix #1123: Do not rely on Wok configuration to get host information
by Aline Manera
The host information is only part of nginx configuration. So get the
information of the running system to configure federation feature over
openSLP
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
model/peers.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/model/peers.py b/model/peers.py
index 1be606b..c0dccce 100644
--- a/model/peers.py
+++ b/model/peers.py
@@ -34,7 +34,7 @@ class PeersModel(object):
return
# register server on openslp
- hostname = socket.getfqdn(wok_config.get("server", "host"))
+ hostname = socket.getfqdn()
port = wok_config.get("server", "proxy_port")
self.url = hostname + ":" + port
--
2.9.3
7 years, 9 months
[PATCH] [Kimchi] Bug fix: Preserve "View Gallery" button location when opening Storage Volume actions menu
by Aline Manera
The "View Gallery" button was being moved to left when opening the
Storage Volume actions drop down menu.
Fix it.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.storage_main.js | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/ui/js/src/kimchi.storage_main.js b/ui/js/src/kimchi.storage_main.js
index bfde50c..0429456 100644
--- a/ui/js/src/kimchi.storage_main.js
+++ b/ui/js/src/kimchi.storage_main.js
@@ -1,7 +1,7 @@
/*
* Project Kimchi
*
- * Copyright IBM Corp, 2013-2016
+ * Copyright IBM Corp, 2013-2017
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
@@ -640,11 +640,6 @@ kimchi.doListVolumes = function(poolObj) {
$('.pool-action', volumeDiv).on('show.bs.dropdown', function () {
$(volumeDiv).scrollTop(0);
- $(this).css('position','absolute');
- $('.toggle-gallery',volumeDiv).css({
- 'position':'absolute',
- 'margin-top': '1px'
- });
$(volumeDiv).bind('mousewheel DOMMouseScroll', function(e) {
e.preventDefault();
});
--
2.9.3
7 years, 9 months
[PATCH v5] [Kimchi 0/4] Bug fix #1091: Allow to set disk performance options per guest and template
by Ramon Medeiros
Changes:
v5:
Increase commit message verbosity
Always return cache and io
Improve documentation at API.md
v4:
Add support for templates (creation and update)
v3:
Add docs
v2:
Use REST API for tests
General fixes
Ramon Medeiros (4):
Read io and cache option from disks
Allow disks to update cache and io flags
Bug fix #1091: Allow to set disk performance options per guest and
template
Add tests to verify if cache and io of a disk can be changed
API.json | 26 ++++++++++++++++++-
docs/API.md | 12 +++++++++
i18n.py | 1 -
model/vmstorages.py | 55 ++++++++++++++++++++++++++--------------
tests/test_rest.py | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
vmtemplate.py | 19 +++++++++++++-
xmlutils/disk.py | 14 ++++++++++-
7 files changed, 175 insertions(+), 24 deletions(-)
--
2.9.3
7 years, 9 months
[PATCH v4 0/4] Bug fix #1091: Allow to set disk performance options per guest and template
by Ramon Medeiros
Changes:
v4:
Add support for templates (creation and update)
v3:
Add docs
v2:
Use REST API for tests
General fixes
Ramon Medeiros (4):
Read io and cache option from disks
Allow disks to update cache and io flags
Bug fix #1091: Allow to set disk performance options per guest and
template
Add tests to verify if cache and io of a disk can be changed
API.json | 26 ++++++++++++++++++++++++-
docs/API.md | 4 ++++
i18n.py | 1 -
model/vmstorages.py | 55 ++++++++++++++++++++++++++++++++++------------------
tests/test_rest.py | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
vmtemplate.py | 19 +++++++++++++++++-
xmlutils/disk.py | 23 ++++++++++++++++++++--
7 files changed, 159 insertions(+), 25 deletions(-)
--
2.9.3
7 years, 9 months
Cleaning up Datastore errors?
by wk
Heh, originally sent to -users but evidently noone looks at that.
--------------
Our kimchi hosts have people constantly working on from the command line
including changing qcow2 image names (our practice is to name them
similar to the instance name so its easy to see whats up in
/var/lib/libvirt/images)
So after a while the wok error log is full of these messages.
and we often get reoccuring pink error messages in the WebUI.
Is there a way to cleanout/fix/ignore the datastore for those of use who
also work directly with libvirt.
-bill
WOKOBJST0001E: Unable to find 5f48fb31-0d73-4df7-948c-02beefee83d1 in
datastore
WOKOBJST0001E: Unable to find c7d94dcb-185f-4917-9b2e-d304f5ce807b in
datastore
WOKOBJST0001E: Unable to find d7f82fc8-44dd-484f-aaf9-f4ed0de3efe3 in
datastore
WOKOBJST0001E: Unable to find f88269b8-8ca9-4689-b8aa-c7e720e3c396 in
datastore
WOKOBJST0001E: Unable to find b46491f9-4351-4b82-ad57-87568dd55f3e in
datastore
WOKOBJST0001E: Unable to find 7c34a9fd-b3b6-4894-a6f1-baf6b7099403 in
datastore
WOKOBJST0001E: Unable to find 0eb316fe-803c-4b25-9dae-522c02748e5c in
datastore
WOKOBJST0001E: Unable to find 4e5663b8-300d-4ad0-8959-ecdc489e8c71 in
datastore
WOKOBJST0001E: Unable to find 5f48fb31-0d73-4df7-948c-02beefee83d1 in
datastore
WOKOBJST0001E: Unable to find c7d94dcb-185f-4917-9b2e-d304f5ce807b in
datastore
7 years, 9 months
[PATCH] python-mock not listed as dependency
by Ramon Medeiros
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
docs/fedora-deps.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/fedora-deps.md b/docs/fedora-deps.md
index 29b477f..484f409 100644
--- a/docs/fedora-deps.md
+++ b/docs/fedora-deps.md
@@ -42,7 +42,7 @@ Packages required for UI development
Packages required for tests
---------------------------
- $ sudo yum install pyflakes python-pep8 python-requests rpmlint
+ $ sudo yum install pyflakes python-pep8 python-requests rpmlint python-mock
# For RHEL systems, install the additional packages:
$ sudo yum install python-unittest2
--
2.9.3
7 years, 9 months
[PATCH] [Wok] Bug fix #207: Fix LDAPUser class initialization
by Aline Manera
It was wrongly calling PAMUser instance on LDAPUser class
initialization.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
src/wok/auth.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/wok/auth.py b/src/wok/auth.py
index 976d729..0ad1893 100644
--- a/src/wok/auth.py
+++ b/src/wok/auth.py
@@ -192,7 +192,7 @@ class LDAPUser(User):
auth_type = "ldap"
def __init__(self, username):
- super(PAMUser, self).__init__(username)
+ super(LDAPUser, self).__init__(username)
@staticmethod
def authenticate(username, password):
--
2.9.3
7 years, 9 months
[PATCH] [Kimchi] Bug fix #1107: Only set cache=none to disks that support direct IO
by Aline Manera
ZFS volumes and GlusterFS does not support direct IO and setting
cache=none will not allow the guest to start. So only set cache=none
when direct IO is supported to avoid problems.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
xmlutils/disk.py | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/xmlutils/disk.py b/xmlutils/disk.py
index 02d6811..97298c5 100644
--- a/xmlutils/disk.py
+++ b/xmlutils/disk.py
@@ -1,7 +1,7 @@
#
# Project Kimchi
#
-# Copyright IBM Corp, 2015-2016
+# Copyright IBM Corp, 2015-2017
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -17,6 +17,7 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+import errno
import lxml.etree as ET
import os
import socket
@@ -28,7 +29,7 @@ from lxml.builder import E
from wok.exception import InvalidParameter, NotFoundError
from wok.plugins.kimchi.utils import check_url_path
-
+from wok.utils import wok_log
BUS_TO_DEV_MAP = {'ide': 'hd', 'virtio': 'vd', 'scsi': 'sd'}
DEV_TYPE_SRC_ATTR_MAP = {'file': 'file', 'block': 'dev'}
@@ -51,11 +52,22 @@ def get_disk_xml(params):
disk_type = _get_disk_type(path) if len(path) > 0 else 'file'
disk = E.disk(type=disk_type, device=params['type'])
driver = E.driver(name='qemu', type=params['format'])
- if params['type'] != 'cdrom':
- driver.set('cache', 'none')
+ try:
+ fd = os.open(path, os.O_RDONLY | os.O_DIRECT)
+ os.close(fd)
+ wok_log.debug("Disk '%s' supports direct I/O. Setting cache=none"
+ "to enable live migration" % path)
+ except OSError, e:
+ if e.errno == errno.EINVAL:
+ wok_log.debug("Disk '%s' does not support direct I/O: "
+ "'%s'. Let libvirt sets the default cache mode." %
+ (path, e.message))
+ else:
+ if params['type'] != 'cdrom':
+ driver.set('cache', 'none')
- if params.get('pool_type') == "netfs":
- driver.set("io", "native")
+ if params.get('pool_type') == "netfs":
+ driver.set("io", "native")
disk.append(driver)
--
2.9.3
7 years, 9 months