[PATCH 0/2] Warn before Power Off non-persistent VM
by Christy Perez
Adding a new field for VM properties, and a new error message.
Note: The error message needs Portuguese and Chinese translation.
Christy Perez (2):
Add persistent flag to VM info
Display appropriate warning for Power Off of non-persistent VM
docs/API.md | 2 ++
po/en_US.po | 3 +++
po/pt_BR.po | 3 +++
po/zh_CN.po | 3 +++
src/kimchi/model/vms.py | 3 ++-
ui/js/src/kimchi.guest_main.js | 6 +++++-
ui/pages/i18n.json.tmpl | 1 +
7 files changed, 19 insertions(+), 2 deletions(-)
--
1.9.3
10 years, 4 months
[PATCH V2] Bugfix UI: Change button text to indicate user network is generating
by Wen Wang
V1 -> V2:
1)Change the create button from "Creating..." to "Create" when error
occurs.
2)Disable input when creating a new network.
When network is generating, if the network is not up, we bring the
network up first, then we create the network. During the time we bring
the network up(less than 10s), we change the text as well as the layout
of the button to indicate this process is working.
Signed-off-by: Wen Wang <wenwang(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.network.js | 10 ++++++++++
ui/pages/i18n.json.tmpl | 1 +
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/ui/js/src/kimchi.network.js b/ui/js/src/kimchi.network.js
index c8f983f..4ee7249 100644
--- a/ui/js/src/kimchi.network.js
+++ b/ui/js/src/kimchi.network.js
@@ -207,6 +207,11 @@ kimchi.initNetworkCreation = function() {
network.persistent = result.persistent;
kimchi.addNetworkItem(network);
$("#networkConfig").dialog("close");
+ }, function(data) {
+ kimchi.message.error(data.responseJSON.reason);
+ $("#networkFormOk").button("enable");
+ $("#networkName").removeAttr("readonly");
+ $("#networkFormOk span").text(i18n.KCHAPI6005M);
});
});
});
@@ -270,6 +275,9 @@ kimchi.openNetworkDialog = function(okCallback) {
title : i18n.KCHNET6003M
});
$("#networkFormOk").on("click", function() {
+ $("#networkFormOk").button("disable");
+ $("#networkName").prop("readonly", "readonly");
+ $("#networkFormOk span").text(i18n.KCHAPI6008M);
okCallback();
});
$("#enableVlan").on("click", function() {
@@ -337,6 +345,8 @@ kimchi.cleanNetworkDialog = function() {
$("#networkDestinationLabel").text($("#networkDestinationID li:first-child").text());
$("#networkFormOk").off("click");
$("#networkFormOk").button("disable");
+ $("#networkFormOk span").text(i18n.KCHAPI6005M);
+ $("#networkName").removeAttr("readonly");
$("#networkVlanID").toggle(false);
$("#labelNetworkVlanID").toggle(false);
$("#enableVlan").prop("checked", false);
diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl
index ccfb081..cbcd077 100644
--- a/ui/pages/i18n.json.tmpl
+++ b/ui/pages/i18n.json.tmpl
@@ -49,6 +49,7 @@
"KCHAPI6005M": "$_("Create")",
"KCHAPI6006M": "$_("Warning")",
"KCHAPI6007M": "$_("Save")",
+ "KCHAPI6008M": "$_("Creating...")",
"KCHGRD6001M": "$_("Loading...")",
"KCHGRD6002M": "$_("An error occurs while checking for packages update.")",
--
1.7.1
10 years, 4 months
[PATCH v2] Bug fix: Github #354
by Daniel Henrique Barboza
v2:
- fixed "make check" issue
The following patch fixes the issue described in Github #354:
"storage: used nfs source path need to be filtered out in creation page"
https://github.com/kimchi-project/kimchi/issues/354
Daniel Henrique Barboza (1):
model/storagetargets: filtering used nfs paths
src/kimchi/model/storagetargets.py | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
--
1.8.3.1
10 years, 4 months
[PATCH] Change function that verifies network interface status
by Ramon Medeiros
LTC Bugzilla #115031 - LTCTest: build-8: List interfaces which are
active
The old way does just consider if the interface has connectivity, not
the interface status. The new file can determine if the interface is up
or down and if cable is connected or not.
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
src/kimchi/netinfo.py | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/netinfo.py b/src/kimchi/netinfo.py
index 5fd6130..276c0b7 100644
--- a/src/kimchi/netinfo.py
+++ b/src/kimchi/netinfo.py
@@ -29,7 +29,7 @@ BONDING_PATH = '/sys/class/net/*/bonding'
WLAN_PATH = '/sys/class/net/*/wireless'
NET_BRPORT = '/sys/class/net/%s/brport'
NET_MASTER = '/sys/class/net/%s/master'
-NET_STATE = '/sys/class/net/%s/operstate'
+NET_STATE = '/sys/class/net/%s/carrier'
PROC_NET_VLAN = '/proc/net/vlan/'
BONDING_SLAVES = '/sys/class/net/%s/bonding/slaves'
BRIDGE_PORTS = '/sys/class/net/%s/brif'
@@ -101,8 +101,21 @@ def is_bondlave(nic):
def operstate(dev):
- return open(NET_STATE % dev).readline().strip()
+ status = None
+
+ # try to read interface status
+ try:
+ status = open(NET_STATE % dev).readline().strip()
+ except IOError:
+ pass
+
+ # when IOError is raised, interface is down
+ if status == None:
+ return "down"
+ # if value is 1, cable is connected
+ # 0 corresponds to no interface up with no cable
+ return "up"
def get_vlan_device(vlan):
""" Return the device of the given VLAN. """
--
1.8.3.1
10 years, 4 months
[PATCH] Bugfix: Log out from Administrator tab raises popup errors
by Wen Wang
This bug turns out to be caused by we change the login format from
login-window to tranditional login format. After the logout, we can no
longer and there is no need to update the pages and popup a login
window. Now we redirect to login.html after logout.
Signed-off-by: Wen Wang <wenwang(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.main.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ui/js/src/kimchi.main.js b/ui/js/src/kimchi.main.js
index 613ab41..ba54b26 100644
--- a/ui/js/src/kimchi.main.js
+++ b/ui/js/src/kimchi.main.js
@@ -239,7 +239,7 @@ kimchi.main = function() {
// Perform logging out via Ajax request.
$('#btn-logout').on('click', function() {
kimchi.logout(function() {
- updatePage();
+ document.location.href = "login.html";
}, function(err) {
kimchi.message.error(err.responseJSON.reason);
});
--
1.7.1
10 years, 4 months
[RFC] UI Mockup - ISO Pool: Download from URL and Upload
by Hongliang Wang
Agree with Aline's proposal to add a button in ISO line of storage pool tab:
And then pop out a window:
And then show progress. Here we'll have 2 options: progress with
percentage indication and only running/finished status.
Option 1:
Option 2:
For option 1, we need back-end support that enables in-time notification
of completion percentage when uploading a file with 2 pieces of
information: total file size, and received file size.
10 years, 4 months
[PATCH 0/2] Warn users about non-persistent guests when using Power Off
by Christy Perez
Someone reported that their guests (not created by Kimchi) were being deleted if
they used Kimchi to shut them down. This small patchset adds a warning message
and also increases the size of the confirmation dialog in the UI to fit the
new text.
Note: It still needs the Chinese translation.
Christy Perez (2):
Add Power-Off warning for non-persistent guests
Make the confirmation dialog bigger
po/en_US.po | 15 ++++++++++++---
po/kimchi.pot | 10 ++++++++--
po/pt_BR.po | 16 +++++++++++++---
po/zh_CN.po | 10 ++++++++--
ui/css/theme-default/message.css | 4 ++--
ui/pages/i18n.json.tmpl | 1 +
6 files changed, 44 insertions(+), 12 deletions(-)
--
1.9.3
10 years, 4 months
Libvirt bug ? (Multiple errors in edit guest storage window #405)
by Rodrigo Trujillo
Hi all,
I have worked to fix https://github.com/kimchi-project/kimchi/issues/405
In problem (2) the cause seems to be an error in libvirt, it is saving
the device with
wrong protocol, which makes kimchi not return the path.
Reproduce:
1- Create a virtual machine with a local cdrom iso configure. You will
see a device such as ("virsh edit" shows):
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/ISOS/ubuntu-14.04-server-amd64.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
</disk>
2- Create a file with new device (same dev name) configuration, such as
(/tmp/new-cdrom):
<disk device="cdrom" type="network">
<driver type="raw" name="qemu"/>
<target bus="ide" dev="hdc"/>
<source protocol="http"
name="/releases/14.04.1/release/ubuntu-14.04.1-desktop-amd64+mac.iso">
<host port="80" name="cdimages.ubuntu.com"/>
</source>
</disk>
3- Update the virtual machine device with virsh:
sudo virsh update-device <VM-NAME> /tmp/new-cdrom
4- Edit the vm xml and you will see that the device was added with "NBD"
protocol and without HOST information!!! :
<disk type='network' device='cdrom'>
<driver name='qemu' type='raw'/>
<source protocol='nbd'
name='/releases/14.04.1/release/ubuntu-14.04.1-desktop-amd64+mac.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
</disk>
----------------------
Kimchi uses "dom.updateDeviceFlags", the same API.
Notice that this happens when changing from local to remote ISO only.
Remote to remote works ... and local to local too.
Does anyone have idea why this happens ?
As workaround I can detach, then attach the device again. Thoughts ?
Rodrigo Trujillo
10 years, 4 months
[PATCH] Bugfix UI: Change button text to indicate user network is generating
by Wen Wang
From: Wen Wang <wenwang(a)linux.vnet.ibm.com>
When network is generating, if the network is not up, we bring the
network up first, then we create the network. During the time we bring
the network up(less than 10s), we change the text as well as the layout
of the button to indicate this process is working.
Signed-off-by: Wen Wang <wenwang(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.network.js | 3 +++
ui/pages/i18n.json.tmpl | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/ui/js/src/kimchi.network.js b/ui/js/src/kimchi.network.js
index c8f983f..cee5864 100644
--- a/ui/js/src/kimchi.network.js
+++ b/ui/js/src/kimchi.network.js
@@ -270,6 +270,8 @@ kimchi.openNetworkDialog = function(okCallback) {
title : i18n.KCHNET6003M
});
$("#networkFormOk").on("click", function() {
+ $("#networkFormOk").button("disable");
+ $("#networkFormOk span").text(i18n.KCHAPI6008M);
okCallback();
});
$("#enableVlan").on("click", function() {
@@ -337,6 +339,7 @@ kimchi.cleanNetworkDialog = function() {
$("#networkDestinationLabel").text($("#networkDestinationID li:first-child").text());
$("#networkFormOk").off("click");
$("#networkFormOk").button("disable");
+ $("#networkFormOk span").text(i18n.KCHAPI6005M);
$("#networkVlanID").toggle(false);
$("#labelNetworkVlanID").toggle(false);
$("#enableVlan").prop("checked", false);
diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl
index ccfb081..cbcd077 100644
--- a/ui/pages/i18n.json.tmpl
+++ b/ui/pages/i18n.json.tmpl
@@ -49,6 +49,7 @@
"KCHAPI6005M": "$_("Create")",
"KCHAPI6006M": "$_("Warning")",
"KCHAPI6007M": "$_("Save")",
+ "KCHAPI6008M": "$_("Creating...")",
"KCHGRD6001M": "$_("Loading...")",
"KCHGRD6002M": "$_("An error occurs while checking for packages update.")",
--
1.7.1
10 years, 4 months
[RFC] ISO pool: Support to download ISO from URL
by Crístian Viana
The following API changes should be made to implement the remote
download ISO feature:
1) POST /storagepools/ISO/storagevolumes/download {'url':
<http|https|ftp|ftps>, 'name': <volume name>}
Description: Starts downloading a remote ISO image to Kimchi's
storage pool.
Parameters:
'url': specifies where the image is hosted. Required.
'name': specifies the name of the local file when the download
finishes. If this parameter is omitted, Kimchi will try to use the same
file name as the remote file. Optional.
Return codes:
200: the remote URL is valid and the download started successfully.
400: the remote URL is not valid;
the provided 'name' is already in use (this error
shouldn't happen if 'name' is omitted).
the storage pool doesn't have enough free space to hold
the remote file.
Return data:
{'name': <vol-name>}
2) POST /storagepools/ISO/storagevolumes/download/pause {'name': <volume
name>}
Description: Pauses a remote ISO download.
Parameters:
'name': the remote volume name to be paused. Required.
Return codes:
200: 'name' is an ongoing download file and the operation was paused
successfully.
400: 'name' is an invalid volume name (doesn't exist / isn't an ongoing
download);
download referred by 'name' cannot be paused.
Return data:
{}
3) POST /storagepools/ISO/storagevolumes/download/resume {'name':
<volume name>}
Description: Resumes a paused remote ISO download.
Parameters:
'name': the remote volume name to be resumed. Required.
Return codes:
200: 'name' is a paused download file and the operation was resumed
successfully.
400: 'name' is an invalid volume name (doesn't exist / isn't a paused
download).
Return data:
{}
4) POST /storagepools/ISO/storagevolumes/download/cancel {'name':
<volume name>}
Description: Cancels a remote ISO download.
Parameters:
'name': the remote volume name to be canceled. Required.
Return codes:
200: 'name' is an ongoing download file and the operation was canceled
successfully. Whatever data has been downloaded so far should be deleted.
400: 'name' is an invalid volume name (doesn't exist / isn't an ongoing
download).
Return data:
{}
5) POST /storagepools/ISO/storagevolumes/download/status {'name':
<volume name>}
Description: Provides status of a remote ISO download.
Parameters:
'name': the remote volume name. Required.
Return codes:
200: 'name' is a download file and its status information was returned
successfully.
400: 'name' is an invalid volume name (doesn't exist / isn't a remote
download).
Return data:
{'name': <volume name>, 'status': [downloading|paused], 'total_size':
<size in bytes>, 'downloaded_size': <size in bytes>}
I tried to put together the feedback given in another e-mail thread,
especially by Aline, Royce and Yu Xin Huo, along with some ideas of my
own. This RFC doesn't support choosing a different storage pool other
than "ISO" to host the downloaded files. If we're doing this, wel need
to update this new API accordingly.
The implementation details will be discussed later.
Please share your feedback with us.
10 years, 4 months