[PATCH V3 0/3] Support ppc64 isos in Templates
by Rodrigo Trujillo
V3:
- Modify test cases
V2:
- Sort UI list of remote distros
- Change names of Fedora distros
- Allow ISOs of similar architectures but with different names to be displayed,
like (amd64 and x86_64)
V1:
If Kimchi server is running in a PPC machine, the guests should be PPC.
Currently, when user tries to create a template, only x86 isos are
showed to user. This patch filters the ISOs, and also, adds ARCH to
UI.
--
1.8.5.3
10 years, 9 months
[PATCH V2 0/2] Support ppc64 isos in Templates
by Rodrigo Trujillo
V2:
- Sort UI list of remote distros
- Change names of Fedora distros
- Allow ISOs of similar architectures but with different names to be displayed,
like (amd64 and x86_64)
V1:
If Kimchi server is running in a PPC machine, the guests should be PPC.
Currently, when user tries to create a template, only x86 isos are
showed to user. This patch filters the ISOs, and also, adds ARCH to
UI.
Rodrigo Trujillo (2):
Support ppc64 isos in Templates: Add arch and urls to distro jsons
Support ppc64 isos in Templates: Filter remote isos and change UI
src/distros.d/debian.json | 1 +
src/distros.d/fedora.json | 30 +++++++++++++++++++++++++++---
src/distros.d/gentoo.json | 1 +
src/distros.d/opensuse.json | 1 +
src/distros.d/ubuntu.json | 2 ++
src/kimchi/distroloader.py | 10 +++++++++-
src/kimchi/model/config.py | 2 +-
ui/pages/template-add.html.tmpl | 8 ++++++--
8 files changed, 48 insertions(+), 7 deletions(-)
--
1.8.5.3
10 years, 9 months
[PATCH V3 0/3] let session expire when request access periodically
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
V2 -> V3
raise 401 http error when expire.
Set the timeout of sessions 10 minutes explicitly.
V1 -> V2
Address ming's comment, raise 403 http error when expire.
Send UI patch.
UI still need to improve as Adam king said.
Hong Liang will improve it.
ShaoHe Feng (3):
add timeout for sessions
auth enhancement: expire the session when the request access
periodically
UI: set kimchi robot header for some request.
src/kimchi/auth.py | 13 +++++++++++++
src/kimchi/config.py.in | 4 ++++
ui/js/src/kimchi.api.js | 2 ++
3 files changed, 19 insertions(+)
--
1.8.4.2
10 years, 9 months
[PATCH V3 0/4] et session expire when request access periodically
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
V3 -> V4
updage test case
V2 -> V3
raise 401 http error when expire.
Set the timeout of sessions 10 minutes explicitly.
V1 -> V2
Address ming's comment, raise 403 http error when expire.
Send UI patch.
UI still need to improve as Adam king said.
Hong Liang will improve it.
ShaoHe Feng (4):
add timeout for sessions
auth enhancement: expire the session when the request access
periodically
UI: set kimchi robot header for some request.
session expire: update test case
src/kimchi/auth.py | 13 +++++++++++++
src/kimchi/config.py.in | 4 ++++
tests/test_config.py.in | 2 ++
ui/js/src/kimchi.api.js | 2 ++
4 files changed, 21 insertions(+)
--
1.8.4.2
10 years, 9 months
[PATCH 0/2] Support ppc64 isos in Templates
by Rodrigo Trujillo
If Kimchi server is running in a PPC machine, the guests should be PPC.
Currently, when user tries to create a template, only x86 isos are
showed to user. This patch filters the ISOs, and also, adds ARCH to
UI.
Rodrigo Trujillo (2):
Support ppc64 isos in Templates: Add arch and urls to distro jsons
Support ppc64 isos in Templates: Filter remote isos and change UI
src/distros.d/debian.json | 1 +
src/distros.d/fedora.json | 24 ++++++++++++++++++++++++
src/distros.d/gentoo.json | 1 +
src/distros.d/opensuse.json | 1 +
src/distros.d/ubuntu.json | 2 ++
src/kimchi/distroloader.py | 3 ++-
ui/pages/template-add.html.tmpl | 3 +++
7 files changed, 34 insertions(+), 1 deletion(-)
--
1.8.5.3
10 years, 9 months
[PATCH] Issue #337: add CentOS support to yum repositories list
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
CentOS use yum to manage repositories
Issue:
https://github.com/kimchi-project/kimchi/issues/337
Signed-off-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
---
src/kimchi/repositories.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/kimchi/repositories.py b/src/kimchi/repositories.py
index 2e70008..bb6ca1a 100644
--- a/src/kimchi/repositories.py
+++ b/src/kimchi/repositories.py
@@ -24,7 +24,7 @@ from kimchi.basemodel import Singleton
from kimchi.exception import InvalidOperation, InvalidParameter
from kimchi.exception import OperationFailed, NotFoundError, MissingParameter
-YUM_DISTROS = ['fedora', 'opensuse ', 'suse linux enterprise server ']
+YUM_DISTROS = ['fedora', 'opensuse ', 'suse linux enterprise server ', 'centos']
APT_DISTROS = ['debian', 'ubuntu']
--
1.8.4.2
10 years, 9 months
[PATCH] storage volume: fix xml parsing of logical volume format type
by zhshzhou@linux.vnet.ibm.com
From: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Not all types of libvirt storage volume provide format information.
Particularly, the volume in logical pool doesn't have format information
in the dumped XML description. StorageVolumeModel.lookup assumes there
is a format tag, but for logical pool volumes it does not exist. So an
exception is raised when it lookup a logical volume.
To trigger this problem, firstly create a guest using a logical pool. Then
click the logical pool from the "storage" tab, and it would fail to list
the volumes.
This patch catches the exception when parsing the format tag, and
returns an empty string for the format attribute if there is no available
format information in the XML.
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
src/kimchi/model/storagevolumes.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/kimchi/model/storagevolumes.py b/src/kimchi/model/storagevolumes.py
index 442ff89..6d0e884 100644
--- a/src/kimchi/model/storagevolumes.py
+++ b/src/kimchi/model/storagevolumes.py
@@ -113,7 +113,13 @@ class StorageVolumeModel(object):
path = vol.path()
info = vol.info()
xml = vol.XMLDesc(0)
- fmt = xmlutils.xpath_get_text(xml, "/volume/target/format/@type")[0]
+ try:
+ fmt = xmlutils.xpath_get_text(
+ xml, "/volume/target/format/@type")[0]
+ except IndexError:
+ # Not all types of libvirt storage can provide volume format
+ # infomation.
+ fmt = ''
res = dict(type=VOLUME_TYPE_MAP[info[0]],
capacity=info[1],
allocation=info[2],
--
1.8.5.3
10 years, 9 months
[PATCHv5 0/6] Add volume reference count
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Tested:
1. sudo make check
2. from UI: list storage volumes and unrefered volume ref_cnt is 0,
ref_cnt for refered ones are 1.
Available volumes will be tracked by volume reference count.
Add this field to storage volume,
so that storage volume/pool action validation can rely on it.
Royce Lv (6):
Fix vm disk path when it does not have source element
Add volume ref_cnt: update api.md
Add volume ref_cnt: Update controller and json schema
Add volume ref_cnt: Add model and mockmodel implementation
Add volume ref_cnt: Update test
Multiple pep8 fixes
docs/API.md | 3 +++
src/kimchi/API.json | 25 +++++++++++++++++++++++++
src/kimchi/control/storagevolumes.py | 1 +
src/kimchi/i18n.py | 4 ++++
src/kimchi/mockmodel.py | 10 +++++++---
src/kimchi/model/debugreports.py | 2 +-
src/kimchi/model/storagevolumes.py | 30 ++++++++++++++++++++++++++++++
src/kimchi/model/templates.py | 2 +-
src/kimchi/model/vmstorages.py | 23 +++++++++++++----------
tests/test_model.py | 4 ++++
tests/test_rest.py | 2 ++
11 files changed, 91 insertions(+), 15 deletions(-)
--
1.8.1.2
10 years, 9 months
[PATCH] issue #312: Rename LVM while deleting logical storage pool
by Aline Manera
From: Aline Manera <alinefm(a)br.ibm.com>
When creating a Logical storage pool, a LVM is created with the same
name.
And when deleting the storage pool the LVM keeps on the system. Which is
the correct behavior as the storage pool is only a concept and deleting it
should not affect the file system.
But it prevents the user to create a new logical pool with a name used
before which is odd.
So when deleting a logical pool, rename the LVM to a single name to
allow user create a logical pool with any name.
Also convert an error message parameter to string instead of virStoragePool
instance.
Signed-off-by: Aline Manera <alinefm(a)br.ibm.com>
---
src/kimchi/model/storagepools.py | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/kimchi/model/storagepools.py b/src/kimchi/model/storagepools.py
index 76ab2d6..dd3c9a2 100644
--- a/src/kimchi/model/storagepools.py
+++ b/src/kimchi/model/storagepools.py
@@ -17,6 +17,8 @@
# 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 time
+
import libvirt
from kimchi import xmlutils
@@ -172,7 +174,8 @@ class StoragePoolModel(object):
return 0
except libvirt.libvirtError as e:
raise OperationFailed("KCHPOOL0008E",
- {'name': pool, 'err': e.get_error_message()})
+ {'name': pool.name(),
+ 'err': e.get_error_message()})
def _get_storage_source(self, pool_type, pool_xml):
source = {}
@@ -348,7 +351,17 @@ class StoragePoolModel(object):
if pool.isActive():
raise InvalidOperation("KCHPOOL0005E", {'name': name})
try:
+ xml = pool.XMLDesc(0)
+ pool_type = xmlutils.xpath_get_text(xml, "/pool/@type")[0]
pool.undefine()
+ # The user may want to create a logical pool with the same name
+ # used before but a LVM will already exist with this name
+ # So rename the former LVM to avoid future conflicts
+ if pool_type == 'logical':
+ lvm_name = "%s-%s" % (name, str(int(time.time()*1000)))
+ vgrename_cmd = ["vgrename", name, lvm_name]
+ run_command(vgrename_cmd)
+
except libvirt.libvirtError as e:
raise OperationFailed("KCHPOOL0011E",
{'name': name, 'err': e.get_error_message()})
--
1.7.10.4
10 years, 9 months
[PATCH V2] Issue #333
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
V1 -> V2
improve commit message.
ShaoHe Feng (1):
Issue #333: do not encode error.html when the cherrpy version less
than '3.2.5'
src/kimchi/root.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--
1.8.4.2
10 years, 9 months