[Wok] Fix suse rpm build
by Ramon Medeiros
Suse was not being built on suse, due missing parameter %configure on
%build section. Just added it
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
contrib/wok.spec.suse.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/wok.spec.suse.in b/contrib/wok.spec.suse.in
index 20d7138..9e6b7f2 100644
--- a/contrib/wok.spec.suse.in
+++ b/contrib/wok.spec.suse.in
@@ -41,6 +41,7 @@ Wok is Webserver Originated from Kimchi.
%setup
%build
+%configure
make
%install
--
2.1.0
8 years, 11 months
[Wok v2] Fix suse rpm build
by Ramon Medeiros
Wok was not being built on suse, due missing parameter %configure on
%build section. Just added it.
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
Changes:
v2:
Fix typo
contrib/wok.spec.suse.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/wok.spec.suse.in b/contrib/wok.spec.suse.in
index 20d7138..9e6b7f2 100644
--- a/contrib/wok.spec.suse.in
+++ b/contrib/wok.spec.suse.in
@@ -41,6 +41,7 @@ Wok is Webserver Originated from Kimchi.
%setup
%build
+%configure
make
%install
--
2.1.0
8 years, 11 months
[PATCH] [Ginger] Sysmodules (SRIOV) tab initial implementation
by andreteodoro.work@gmail.com
From: Andre Teodoro <andreteodoro.work(a)gmail.com>
Andre Teodoro (1):
Sysmodules (SRIOV) tab initial implementation
ui/config/tab-ext.xml | 23 +-
ui/css/ginger.css | 209 +++++++-
ui/css/src/ginger.scss | 70 ++-
ui/css/src/modules/_sysmodules.scss | 126 +++++
ui/js/host-sysmodules.js | 76 +++
ui/js/util.js | 871 ++++++++++++++++----------------
ui/pages/tabs/host-sysmodules.html.tmpl | 88 ++++
7 files changed, 1012 insertions(+), 451 deletions(-)
create mode 100644 ui/css/src/modules/_sysmodules.scss
create mode 100644 ui/js/host-sysmodules.js
create mode 100644 ui/pages/tabs/host-sysmodules.html.tmpl
--
1.8.3.1
8 years, 11 months
[PATCH 1/2 - v2][wok] Limit number of backup log files and make it configurable
by Rodrigo Trujillo
Currently Wok is configured to keep up to 1000 log files of 10MB, this
behavior makes Wok/Kimchi log space become huge (up to 20GB, for error
and access logs).
This patch changes the configuration, limiting the number of stored log
files to 10. So space required in the system will be up to 200MB.
It also adds log_backup_count property to /etc/wok.conf, allowing users
to change this value if necessary.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
src/wok.conf.in | 3 +++
src/wok/config.py.in | 2 ++
src/wok/server.py | 6 ++++--
src/wokd.in | 2 ++
4 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/wok.conf.in b/src/wok.conf.in
index 60d826f..5e86ff8 100644
--- a/src/wok.conf.in
+++ b/src/wok.conf.in
@@ -43,6 +43,9 @@
# Logging level: debug, info, warning, error or critical
#log_level = debug
+# Log files backup count. The number of old log files to keep in the system
+# log_backup_count = 10
+
[display]
# Port for websocket proxy to listen on
#display_proxy_port = 64667
diff --git a/src/wok/config.py.in b/src/wok/config.py.in
index 0c83812..342e80b 100644
--- a/src/wok/config.py.in
+++ b/src/wok/config.py.in
@@ -29,6 +29,7 @@ __release__ = "@wokrelease@"
CACHEEXPIRES = 31536000 # expires is one year.
DEFAULT_LOG_LEVEL = "debug"
+DEFAULT_LOG_BACKUP_COUNT = 10
FONT_FILES = {'fontawesome': ['fontawesome-webfont.ttf'],
'opensans': ['OpenSans-ExtraBoldItalic.ttf',
@@ -247,6 +248,7 @@ def _get_config():
config.add_section("logging")
config.set("logging", "log_dir", paths.log_dir)
config.set("logging", "log_level", DEFAULT_LOG_LEVEL)
+ config.set("logging", "log_backup_count", str(DEFAULT_LOG_BACKUP_COUNT))
config.add_section("display")
config.set("display", "display_proxy_port", "64667")
diff --git a/src/wok/server.py b/src/wok/server.py
index 59ecdc0..53af12a 100644
--- a/src/wok/server.py
+++ b/src/wok/server.py
@@ -101,7 +101,8 @@ class Server(object):
# Create handler to rotate access log file
h = logging.handlers.RotatingFileHandler(options.access_log, 'a',
- 10000000, 1000)
+ 10000000,
+ options.log_backup_count)
h.setLevel(logLevel)
h.setFormatter(cherrypy._cplogging.logfmt)
@@ -110,7 +111,8 @@ class Server(object):
# Create handler to rotate error log file
h = logging.handlers.RotatingFileHandler(options.error_log, 'a',
- 10000000, 1000)
+ 10000000,
+ options.log_backup_count)
h.setLevel(logLevel)
h.setFormatter(cherrypy._cplogging.logfmt)
diff --git a/src/wokd.in b/src/wokd.in
index c5510fd..ac43df6 100644
--- a/src/wokd.in
+++ b/src/wokd.in
@@ -94,6 +94,8 @@ def main(options):
setattr(options, 'ssl_key', config.config.get('server', 'ssl_key'))
setattr(options, 'max_body_size',
config.config.get('server', 'max_body_size'))
+ setattr(options, 'log_backup_count',
+ config.config.get('logging', 'log_backup_count'))
wok.server.main(options)
--
2.1.0
8 years, 11 months
[PATCH] [WoK] utils.py: run_command runs in an en_US environment by default
by dhbarboza82@gmail.com
From: Daniel Henrique Barboza <dhbarboza82(a)gmail.com>
This requirement started in a fixed Gingerbase bug (#18) that
reported lscpu problems when running in a French environment.
The output was being translated to french and breaking the
parsing made by the backend.
This is such a powder keg for all the plug-ins that I believe
this patch is justified. Instead of forcing en_US language
by using subprocess.Popen and setting the env, this is how
run_command will behave now:
- A new optional attribute, env_vars, was added. As the name
suggests, it allows the setup of the environment variables
to run the command.
- If env_vars is not set, run_command will copy the current
environment variables and set the language to the default
(en_US) by setting LC_ALL='C' variable. As of now, this is
the case of all the existing run_command calls in the code
for all WoK plug-ins. No behavior change will happen.
- If env_vars is set, but the LC_ALL var isn't, run_command
will set it to 'C' and force the default language.
- If env_vars is set and LC_ALL is also set, run_command
will not touch it and will run with env_vars as is. This
allows the caller to set the language at will.
Signed-off-by: Daniel Henrique Barboza <dhbarboza82(a)gmail.com>
---
src/wok/utils.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/wok/utils.py b/src/wok/utils.py
index 05574d7..af534ec 100644
--- a/src/wok/utils.py
+++ b/src/wok/utils.py
@@ -136,7 +136,8 @@ def import_module(module_name, class_name=''):
return __import__(module_name, globals(), locals(), [class_name])
-def run_command(cmd, timeout=None, silent=False, tee=None):
+def run_command(cmd, timeout=None, silent=False, tee=None,
+ env_vars=None):
"""
cmd is a sequence of command arguments.
timeout is a float number in seconds.
@@ -184,9 +185,15 @@ def run_command(cmd, timeout=None, silent=False, tee=None):
timer = None
timeout_flag = [False]
+ if env_vars is None:
+ env_vars = os.environ.copy()
+ env_vars['LC_ALL'] = 'C'
+ elif env_vars.get('LC_ALL') is None:
+ env_vars['LC_ALL'] = 'C'
+
try:
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ stderr=subprocess.PIPE, env=env_vars)
if timeout is not None:
timer = Timer(timeout, kill_proc, [proc, timeout_flag])
timer.setDaemon(True)
--
2.5.0
8 years, 11 months
[PATCH][wok] Limit number of log files kept in the system to 10
by Rodrigo Trujillo
Currently Wok is configured to keep up to 1000 log files of 10MB, this
behavior makes Wok/Kimchi log space become huge (up to 20GB, for error
and access logs).
This patch changes the configuration, limiting the number of stored log
files to 10. So space required in the system will be up to 200MB.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
src/wok/server.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/wok/server.py b/src/wok/server.py
index 59ecdc0..8ac67a1 100644
--- a/src/wok/server.py
+++ b/src/wok/server.py
@@ -101,7 +101,7 @@ class Server(object):
# Create handler to rotate access log file
h = logging.handlers.RotatingFileHandler(options.access_log, 'a',
- 10000000, 1000)
+ 10000000, 10)
h.setLevel(logLevel)
h.setFormatter(cherrypy._cplogging.logfmt)
@@ -110,7 +110,7 @@ class Server(object):
# Create handler to rotate error log file
h = logging.handlers.RotatingFileHandler(options.error_log, 'a',
- 10000000, 1000)
+ 10000000, 10)
h.setLevel(logLevel)
h.setFormatter(cherrypy._cplogging.logfmt)
--
2.1.0
8 years, 11 months
[PATCH] [Wok] Adding typeahead library to wok
by peterpnns@gmail.com
From: peterpennings <peterpnns(a)gmail.com>
This library is necessary to replace wok.comboBox() in iSCSI Server and target when defining a new storage pool and when loading sysmodules in Ginger.
peterpennings (1):
Adding typeahead library to wok
configure.ac | 1 +
ui/libs/Makefile.am | 2 +-
ui/libs/typeahead/LICENSE | 19 +++++++++++++++++++
ui/libs/typeahead/Makefile.am | 22 ++++++++++++++++++++++
ui/libs/typeahead/typeahead.bundle.min.js | 8 ++++++++
ui/pages/wok-ui.html.tmpl | 1 +
6 files changed, 52 insertions(+), 1 deletion(-)
create mode 100644 ui/libs/typeahead/LICENSE
create mode 100644 ui/libs/typeahead/Makefile.am
create mode 100644 ui/libs/typeahead/typeahead.bundle.min.js
--
1.9.1
8 years, 11 months
Re: [Kimchi-devel] Guest disk: Allocate storage volume when attaching disk to vm
by Aline Manera
Adding Samuel and Andre to this discussion and also forward to Kimchi ML.
On 16/11/2015 14:21, Aline Manera wrote:
>
> Hi Socorro,
>
> On 12/11/2015 21:20, Socorro Stoppler wrote:
>> Hi Aline,
>>
>> I chatted w/Paulo about the UI portion of this. He stated that the
>> user has the option to select to add a new volume (in which the the
>> UI must execute two requests: one to create a volume, and other to
>> attach the new volume to the guest being edited). So in this screen
>> (I know it's the old UI but this shows better than current new UI :)):
>>
>>
>>
>> What do you think of 3. being radio buttons? -
>
> I think 2 should be that radio buttons.
>
> So:
>
> 1. Device type
> <disk>
>
> 2. ( ) Create a new disk image
>
> ( ) Select existing disk image
>
> 3. Storage pool
> <pools>
>
> 4. Capacity or Volume (depends on selection on 2.)
>
> Below is how virt-manage does it.
>
>
>
>> <New Volume> -
>> Volume: Storage volume name of 'new_vol' --- we prob do not
>> need to show this in the UI, right?
>> Capacity: in bytes
>> Format: qcow2 -- is this the only option we want to provide?
>> <Create Button>
>>
>> <Existing Volume> - which consists of current combobox above
>>
>> Also, if user selects to do the new volume, then created it, but
>> decided that they didn't want to attach it, is that ok? Not sure of
>> the different scenarios we have
>> or if I'm totally missing the intent here.
>>
>> Let me know if you had envisioned something else for this UI.
>>
>> Thanks
>> -Socorro
>>
>>
>
8 years, 11 months
[PATCH] [Wok] Fix dependence name of the python-pip package.
by pvital@linux.vnet.ibm.com
From: Paulo Vital <pvital(a)linux.vnet.ibm.com>
Signed-off-by: Paulo Vital <pvital(a)linux.vnet.ibm.com>
---
docs/README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/README.md b/docs/README.md
index 4d719f3..4c0009d 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -66,7 +66,7 @@ Install Dependencies
$ sudo yum install pyflakes python-pep8 python-requests
# For UI development
- $ sudo yum install gcc-c++ python-devel python pip
+ $ sudo yum install gcc-c++ python-devel python-pip
$ sudo pip install cython libsass
*Note for RHEL users*: Some of the above packages are located in the Red Hat
@@ -94,7 +94,7 @@ channel at RHN Classic or Red Hat Satellite.
$ sudo apt-get install pep8 pyflakes python-requests
# For UI development
- $ sudo apt-get install g++ python-dev python pip
+ $ sudo apt-get install g++ python-dev python-pip
$ sudo pip install cython libsass
**For openSUSE:**
@@ -113,7 +113,7 @@ channel at RHN Classic or Red Hat Satellite.
$ sudo zypper install python-pyflakes python-pep8 python-requests
# For UI development
- $ sudo zypper install gcc-c++ python-devel python pip
+ $ sudo zypper install gcc-c++ python-devel python-pip
$ sudo pip install cython libsass
Build and Install
--
2.5.0
8 years, 11 months
[PATCH v2] [Wok] Added disabled and readonly states to Bootstrap Select
by sguimaraes943@gmail.com
From: samhenri <samuel.guimaraes(a)eldorado.org.br>
This patch fixes readonly and disabled states for Bootstrap Select elements initialized by selectpicker() in the UI.
You can spot this changes in action when editing a Template if you apply "Fixed minor UI issues when saving edited template".
v2 - Included correct files + compiled CSS file
samhenri (1):
Added disabled and readonly states to Bootstrap Select
ui/css/bootstrap-select.custom.css | 28 ++++++++++++++++++++++++++++
ui/css/src/bootstrap-select.custom.scss | 18 ++++++++++++++++++
2 files changed, 46 insertions(+)
--
1.9.3
8 years, 11 months