[PATCH] [Kimchi] Do not show OVS bridges for now
by Lucio Correia
This is a temporary fix to not show OVS bridges when
creating a new bridged network, since that support is
only included in the backend. To be reverted once UI
is adapted to support it.
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
netinfo.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/netinfo.py b/netinfo.py
index ff91489..4c7a234 100644
--- a/netinfo.py
+++ b/netinfo.py
@@ -221,7 +221,8 @@ def is_bare_nic(iface):
# a slave of bond.
# The bridge will not be exposed when all it's port are tap.
def all_favored_interfaces():
- return aggregated_bridges() + bare_nics() + bondings()
+ return list(set(aggregated_bridges() + bare_nics() + bondings()) -
+ set(ovs_bridges()))
def get_interface_type(iface):
--
1.9.1
9 years
[PATCH] [Kimchi] Fix ovs commands output handling
by Lucio Correia
I've noticed this problem in Kimchi's error output:
rc: 1 error: ovs-vsctl: no bridge named \nbr0
returned from cmd: /bin/ovs-vsctl --oneline list-ports \nbr0
Error listing OVS bridge ports for \nbr0
This patch fixes that by:
- removing --oneline usage from ovs command;
- using list comprehensions to split() each string in the list.
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
netinfo.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/netinfo.py b/netinfo.py
index ff91489..c00f603 100644
--- a/netinfo.py
+++ b/netinfo.py
@@ -94,12 +94,12 @@ def ovs_bridges():
if ovs_cmd is None:
return []
- out, error, rc = run_command([ovs_cmd, '--oneline', 'list-br'])
+ out, error, rc = run_command([ovs_cmd, 'list-br'])
if rc != 0:
wok_log.info("Error listing OVS bridges")
return []
- return list(set(out.split('\n')) - set(['']))
+ return [x.strip() for x in out.rstrip('\n').split('\n') if x.strip()]
def is_ovs_bridge(iface):
@@ -113,12 +113,12 @@ def ovs_bridge_ports(ovsbr):
if ovs_cmd is None:
return []
- out, error, rc = run_command([ovs_cmd, '--oneline', 'list-ports', ovsbr])
+ out, error, rc = run_command([ovs_cmd, 'list-ports', ovsbr])
if rc != 0:
wok_log.info("Error listing OVS bridge ports for %s" % str(ovsbr))
return []
- return list(set(out.split('\n')) - set(['']))
+ return [x.strip() for x in out.rstrip('\n').split('\n') if x.strip()]
def all_interfaces():
--
1.9.1
9 years
[PATCH] [Kimchi] Bugfix 786: Undefine button enabled for active storage pool
by Socorro Stoppler
Undefine button is no longer enabled when storage pool is active
Had to use a different function call to disable the 'Undefine' 'button' since this was
no longer defined as a 'button' but rather a link. .attr or .prop do not work on links.
Socorro Stoppler (1):
Bugfix 786: Undefine button enabled for active storage pool
ui/js/src/kimchi.storage_main.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
1.9.1
9 years
[RFC] Change template creation media input
by Ramon Medeiros
Hi,
we have a propose to change how templates are created by Kimchi. Today
we do this way:
1) Specify if it's cdrom or disk
2) Pass image path
The new propose is: Kimchi will identify if the media is disk or cdrom.
So, the user will just pass the media and let kimchi discover it.
The main argument of this change is that we won't have errors with users
trying to add disks on cdrom template creation, for example.
What do you think guys?
--
Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn(a)br.ibm.com
9 years
[PATCH 0/2] Live Migration UI v4
by sguimaraes943@gmail.com
From: samhenri <samuel.guimaraes(a)eldorado.org.br>
This patch adds Live Migration functionality to the new-ui.
I'm attaching Socorro initial commit because I had to rebase it with the new-ui in Guests page.
v1 - "Delete this VM when the migration is completed" checkbox not
working
v2 - Added support for checkbox but somehow Live Migration window was hanging instead of displaying error messages.
v3 - Fixed problem above and rebased both patches to Kimchi submodule.
v4 - Fixed form validation and POST request data.
Socorro Stoppler (1):
Initial checkin for live migration UI support
samhenri (1):
Fixing Live Migration for the new-ui Guests tab
ui/js/src/kimchi.api.js | 3 +-
ui/js/src/kimchi.guest_livemigration.js | 121 ++++++++++++++++++++++++++++++++
ui/js/src/kimchi.guest_main.js | 82 ++++++++++++++++++++--
ui/pages/guest-migration.html.tmpl | 67 ++++++++++++++++++
ui/pages/guest.html.tmpl | 7 +-
ui/pages/guests.html.tmpl | 4 +-
ui/pages/i18n.json.tmpl | 2 +
7 files changed, 274 insertions(+), 12 deletions(-)
create mode 100644 ui/js/src/kimchi.guest_livemigration.js
create mode 100644 ui/pages/guest-migration.html.tmpl
--
1.9.3
9 years
[PATCH 0/2] [Wok] Fixed duplicate ID and disabled drop-down menu style
by sguimaraes943@gmail.com
From: samhenri <samuel.guimaraes(a)eldorado.org.br>
This set fixes two minor bugs in the UI.
First removes unused collapse class from login.html.tmpl and changes "user" id in the top navigation bar to "user-login" to avoid duplicated IDs with live migration script.
The second patch fixes the disabled state for "critical" options in drop-down menus (as seen in Storages and Network screens)
samhenri (2):
[Wok] Removed duplicate id reference for Live Migration
[Wok] Fixed disabled state in dropdown-menu
ui/css/src/modules/_menu-flat.scss | 379 +++++++++++++++++--------------------
ui/js/src/wok.user.js | 4 +-
ui/pages/login.html.tmpl | 6 -
ui/pages/wok-ui.html.tmpl | 2 +-
4 files changed, 175 insertions(+), 216 deletions(-)
--
1.9.3
9 years
[PATCH] [Kimchi 0/2] Fix network lookup to show macvtap networks
by Lucio Correia
Lucio Correia (2):
Differentiate network lookup between macvtap and bridge
Use "macvtap" instead of "bridged"
model/networks.py | 3 +++
ui/js/src/kimchi.network.js | 2 +-
ui/js/src/kimchi.network_add_main.js | 4 ++--
ui/pages/network-add.html.tmpl | 2 +-
4 files changed, 7 insertions(+), 4 deletions(-)
--
1.9.1
9 years
[PATCH 0/2] Live Migration UI v3
by sguimaraes943@gmail.com
From: samhenri <samuel.guimaraes(a)eldorado.org.br>
This patch addes Live Migration functionality to the new-ui.
I'm attaching Socorro initial commit because I had to rebase it with the new-ui in Guests page.
v1 - "Delete this VM when the migration is completed" checkbox not working
v2 - Added support for checkbox but somehow Live Migration window was hanging instead of displaying error messages.
v3 - Fixed problem above and rebased both patches to Kimchi submodule.
Socorro Stoppler (1):
Initial checkin for live migration UI support
samhenri (1):
Fixing Live Migration for the new-ui Guests tab
ui/js/src/kimchi.api.js | 3 +-
ui/js/src/kimchi.guest_livemigration.js | 113 ++++++++++++++++++++++++++++++++
ui/js/src/kimchi.guest_main.js | 82 +++++++++++++++++++++--
ui/pages/guest-migration.html.tmpl | 67 +++++++++++++++++++
ui/pages/guest.html.tmpl | 7 +-
ui/pages/guests.html.tmpl | 4 +-
ui/pages/i18n.json.tmpl | 2 +
7 files changed, 266 insertions(+), 12 deletions(-)
create mode 100644 ui/js/src/kimchi.guest_livemigration.js
create mode 100644 ui/pages/guest-migration.html.tmpl
--
1.9.3
9 years
[RFC] UI changes for Linux bridge/OVS bridge support
by Lucio Correia
Hi team,
This is a proposal for UI changes to reflect the new API options for
"add network".
Network tab -> User clicks on add (+) button
Currently, there are 3 options in "Network Type": Isolated, NAT, Bridged
(which sets macvtap bridges as of now).
The API is changing for Kimchi 2.0:
"Bridged" option will now be used for creating networks tied to Linux
bridges, while a 4th option "macvtap" will be added for creating
networks tied to macvtap bridges.
Changes in Bridged option:
1) Change description of "Bridged" option to refer to Linux bridges
2) When "Bridged" is selected, "Destination" will show all the
interfaces it currently shows plus OVS bridges
3) "Enable VLAN" is not showed
4) "Bridged" option will call network_create API with "bridge" as value
for "connection" parameter
New macvtap option:
5) Add a new option "macvtap" to Network Type
6) When macvtap option is selected, "Destination" will show the same
that is currently showed for "Bridged" option (no OVS bridges)
7) "Enable VLAN" option is showed
8) macvtap option will call network create API with "macvtap" as
"connection" parameter value
Please let me know your thoughts.
Thanks,
--
Lucio Correia
Software Engineer
IBM LTC Brazil
9 years
[PATCH 2/2] Change the code like suggested by Aline Manera
by stephan.conrad@gmail.com
From: Stephan Conrad <stephan.conrad(a)gmail.com>
Signed-off-by: Stephan Conrad <stephan.conrad(a)gmail.com>
---
src/wok/proxy.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/wok/proxy.py b/src/wok/proxy.py
index 574a3b3..f281522 100644
--- a/src/wok/proxy.py
+++ b/src/wok/proxy.py
@@ -50,11 +50,11 @@ def _create_proxy_config(options):
user_proxy = None
user_list = ('nginx', 'www-data', 'http')
sys_users = [p.pw_name for p in pwd.getpwall()]
- for user in user_list:
- if user in sys_users:
- user_proxy = user
- break
-
+ common_users = list(set(user_list) & set(sys_users))
+ if len(common_users) == 0:
+ raise Exception("No common user found")
+ else:
+ user_proxy = common_users[0]
config_dir = paths.conf_dir
nginx_config_dir = paths.nginx_conf_dir
cert = options.ssl_cert
--
2.6.3
9 years