Giter VIP home page Giter VIP logo

wok's Introduction

What is Wok?

Wok is a cherrypy-based web framework with HTML5 support originated from Kimchi. It can be extended by plugins which expose functionality through REST APIs.

Examples of such plugins are Kimchi (Virtualization Management); Ginger Base (Basic host management) and; Ginger (System Administration).

Wok runs through wokd daemon.

Browser Support

Wok and its plugins can run in any web browser that supports HTML5. The Kimchi community (responsible for Wok project) makes an effort to test it with the latest versions of Chrome and Firefox browsers, but the following list can be used as reference to browser support.

Desktop Browser Support:

  • Internet Explorer: Current version
  • Chrome: Current version
  • Firefox: Current version
  • Safari: Current version
  • Opera: Current version

Mobile Browser Support:

  • Safari iOS: Current version
  • Android Browser Current version

Linux Support

Wok might run on any GNU/Linux distribution that meets the conditions described on the 'Getting Started' section below.

The Kimchi community (responsible for Wok project) makes an effort to test it with the latest versions of Fedora, openSUSE, and Ubuntu.

Getting Started

Install Dependencies

In order to have Wok running as expected in your system, please make sure to have all the dependencies installed before building Wok or starting up the wokd service.

Fedora

First of all, install python3-pip

sudo dnf install -y python3-pip

Development Dependencies

sudo -H pip3 install -r requirements-dev.txt
sudo dnf install -y gcc make autoconf automake git python3-pip python3-requests python3-mock gettext-devel rpm-build libxslt gcc-c++ python3-devel python3-pep8 python3-pyflakes rpmlint python3-pyyaml

Runtime Dependencies

sudo dnf install -y systemd logrotate python3-psutil python3-ldap python3-lxml python3-websockify python3-jsonschema openssl nginx python3-cherrypy python3-cheetah python3-pam python3-m2crypto gettext-devel

Debian

First of all, install python3-pip

sudo apt install -y python3-pip

Development Dependencies

sudo -H pip3 install -r requirements-dev.txt
sudo apt install -y gcc make autoconf automake git python3-pip python3-requests python3-mock gettext pkgconf xsltproc python3-dev pep8 pyflakes python3-yaml

Runtime Dependencies

sudo apt install -y systemd logrotate python3-psutil python3-ldap python3-lxml python3-websockify python3-jsonschema openssl nginx python3-cherrypy3 python3-cheetah python3-pampy python3-m2crypto gettext python3-openssl

Ubuntu

First of all, install python3-pip

sudo apt install -y python3-pip

Development Dependencies

sudo -H pip3 install -r requirements-dev.txt
sudo apt install -y gcc make autoconf automake git python3-pip python3-requests python3-mock gettext pkgconf xsltproc python3-dev pep8 pyflakes python3-yaml

Runtime Dependencies

sudo apt install -y systemd logrotate python3-psutil python3-ldap python3-lxml python3-websockify python3-jsonschema openssl nginx python3-cherrypy3 python3-cheetah python3-pam python3-m2crypto gettext python3-openssl

openSUSE LEAP

First of all, install python3-pip

sudo zypper install -y python3-pip

Development Dependencies

sudo -H pip3 install -r requirements-dev.txt
sudo zypper install -y gcc make autoconf automake git python3-pip python3-requests python3-mock gettext-tools rpm-build libxslt-tools gcc-c++ python3-devel python3-pep8 python3-pyflakes rpmlint python3-PyYAML python3-distro

Runtime Dependencies

sudo zypper install -y systemd logrotate python3-psutil python3-ldap python3-lxml python3-websockify python3-jsonschema openssl nginx python3-CherryPy python3-Cheetah3 python3-python-pam python3-M2Crypto gettext-tools python3-distro

Build and Install

sudo ./autogen.sh --system
make

# Optional if running from the source tree
sudo make install

# Or, to make installable .deb packages
make deb

# Or, for RPM packages
make rpm

If you are looking for stable versions, there are some packages available at https://github.com/kimchi-project/wok/releases

Starting up Wok

sudo python3 src/wokd

To access Wok, please, connect your browser to https://localhost:8001.

Contributing to Wok Project

There are a lof of ways to contribute to the Wok Project:

Find more information about Wok Project at https://github.com/kimchi-project/wok/wiki

wok's People

Contributors

adamkingit avatar alinefm avatar alisonjenkins avatar apporc avatar atreyeemukhopadhyay avatar baude avatar cbosdo avatar cd1 avatar clnperez avatar danielhb avatar edusf avatar edwardbadboy avatar frediz avatar gouzongmei avatar ian-otto avatar julbrygd avatar laptop006 avatar lvroyce avatar peterpennings avatar potula-chandra avatar pradeepkumars avatar rajatgupta21 avatar samhenri avatar ssdxiao avatar sstoppler avatar sureshab avatar truja avatar wenwang1989 avatar xinding avatar yuxinhuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wok's Issues

Session Handling and Page Redirection

login_1 1
login1 2

  1. Post session expire when we try to navigate through tabs we get server error pages.
  2. Post session expire if we have any pop up window open and try some operation login page appears in pop up window and post authentication pop up gets closed and on browser we get server errors
  3. Home page it gives error message : The server encountered an unexpected condition which prevented it from fulfilling the request.

make rpm on CentOS 7 fails

Running make rpm on CentOS 7 fails.

I downloaded the latest zip file from github.
Extracted it on a pristine CentOS installation.
Executed ./autogen.sh.
Executed make
Executed make rpm (failed with below error)
error: File not found: /root/wok-master/rpm/BUILDROOT/wok-2.0.0-0.el7.centos.x86_64/usr/lib/firewalld/services/wokd.xml

Line 130 in the specfile says: %{_prefix}/lib/firewalld/services/wokd.xml, but this isn't available. I guess the src/firewalld.xml file should be copied to that location, but that's just a wild guess.

regards

[wok] make rpm fails on fedora 22

Steps to reproduce:

  1. ./autogen.sh --system
  2. make
  3. make rpm failed with the following error:
    [chandra@localhost wok]$ make rpm
    make dist-gzip am__post_remove_distdir='@:'
    make[1]: Entering directory '/home/chandra/wok'
    fatal: No names found, cannot describe anything.
    Makefile:1039: recipe for target 'VERSION' failed
    make[1]: *** [VERSION] Error 128
    make[1]: Leaving directory '/home/chandra/wok'
    Makefile:708: recipe for target 'dist' failed
    make: *** [dist] Error 2

For some weird reason VERSION file content will become empty after "make rpm" I guess.

Tab order in Host is not consistent

Order of tabs in host is not consistent..
example 1:
screenshot from 2016-01-19 15 45 39

example 2:
screenshot from 2016-01-20 14 51 32

ideal order of the tabs would be "Dashboard", "Updates", "Administration", "Network", "Storage" as per design discussions when gingerbase plugin was formed.

Option to specific logging levels

Currently wok.conf has option to specify log_level. But even if with log_level as error, it is logging info logs.
So currently its behaviors like logging level set as info. And hence after some days of wok running, system gets lots of wok-error.log rotated files.

Displaying host name in wok page

in left top corner of UI, it displays the ip which you are using to access wok. this could be replaced with host name on which wok is running.

In below screen shot, it displays 'localhost' since i used 'localhost:8001' in browser to access the wok instance running on the same machine.
screenshot from 2016-03-03 16 20 40

host name from /etc/hostname file:
$ cat /etc/hostname
sureshtp

WoK 'make rpm' requiring 'sample' plug-in is killing my swag


$ sudo make rpm
make  dist-gzip am__post_remove_distdir='@:'
make[1]: Entering directory '/home/danielhb/kimchi/wok_ginger'
if test -d "wok-2.0"; then find "wok-2.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "wok-2.0" || { sleep 5 && rm -rf "wok-2.0"; }; else :; fi
test -d "wok-2.0" || mkdir "wok-2.0"
 (cd src && make  top_distdir=../wok-2.0 distdir=../wok-2.0/src \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[2]: Entering directory '/home/danielhb/kimchi/wok_ginger/src'
 (cd wok && make  top_distdir=../../wok-2.0 distdir=../../wok-2.0/src/wok \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[3]: Entering directory '/home/danielhb/kimchi/wok_ginger/src/wok'
 (cd control && make  top_distdir=../../../wok-2.0 distdir=../../../wok-2.0/src/wok/control \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[4]: Entering directory '/home/danielhb/kimchi/wok_ginger/src/wok/control'
make[4]: Leaving directory '/home/danielhb/kimchi/wok_ginger/src/wok/control'
 (cd model && make  top_distdir=../../../wok-2.0 distdir=../../../wok-2.0/src/wok/model \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[4]: Entering directory '/home/danielhb/kimchi/wok_ginger/src/wok/model'
make[4]: Leaving directory '/home/danielhb/kimchi/wok_ginger/src/wok/model'
 (cd xmlutils && make  top_distdir=../../../wok-2.0 distdir=../../../wok-2.0/src/wok/xmlutils \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[4]: Entering directory '/home/danielhb/kimchi/wok_ginger/src/wok/xmlutils'
make[4]: Leaving directory '/home/danielhb/kimchi/wok_ginger/src/wok/xmlutils'
 (cd plugins && make  top_distdir=../../../wok-2.0 distdir=../../../wok-2.0/src/wok/plugins \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[4]: Entering directory '/home/danielhb/kimchi/wok_ginger/src/wok/plugins'
 (cd sample && make  top_distdir=../../../../wok-2.0 distdir=../../../../wok-2.0/src/wok/plugins/sample \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
/bin/sh: line 14: cd: sample: No such file or directory
Makefile:560: recipe for target 'distdir' failed
make[4]: *** [distdir] Error 1
make[4]: Leaving directory '/home/danielhb/kimchi/wok_ginger/src/wok/plugins'
Makefile:626: recipe for target 'distdir' failed
make[3]: *** [distdir] Error 1
make[3]: Leaving directory '/home/danielhb/kimchi/wok_ginger/src/wok'
Makefile:580: recipe for target 'distdir' failed
make[2]: *** [distdir] Error 1
make[2]: Leaving directory '/home/danielhb/kimchi/wok_ginger/src'
Makefile:609: recipe for target 'distdir' failed
make[1]: *** [distdir] Error 1
make[1]: Leaving directory '/home/danielhb/kimchi/wok_ginger'
Makefile:708: recipe for target 'dist' failed
make: *** [dist] Error 2

After restart wokd daemon, browser still shows previous main page instead of log in screen

Originally reported on kimchi-project/kimchi#708

Environment: x86
Operating system: Ubuntu
Browser: Mozilla Firefox
Steps performed:

  1. Installed WOK (https://github.com/kimchi-project/kimchi/tree/wok)
  2. Started wokd daemon
  3. From browser launched https://127.0.0.1:8001
  4. Login screen displayed
  5. Entered userid and password
  6. WOK web page displayed
  7. Restared wokd daemon
  8. Refreshed the url https://127.0.0.1:8001 on browser
    Problem: browser still shows previous main page instead of log in screen

Changng the host = parm in /etc/wok/wok.conf doesn't restrict wok from listening on all network interfaces

We would like to restrict the wok to listen on only our private network interface, and not public interface.

So we update the /etc/wok/wok.conf file like so:

[server]
host = private network interface IP

However, after restarting wokd.service, we still see the
wok ports (8000, 8002) in netstat with 0.0.0.0 :

tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8002 0.0.0.0:* LISTEN

and so, we can still access HVM thru our public network.

=== Steps to Reproduce ====================================

===========================================================

  1. Update the wok.conf file to set host = < a specific IP >
  2. Restart wokd.service
  3. Attempt to access the wok thru another IP interface - not the one
    specified in the host = parm

[wok] autogen.sh --system gives No names found message

[chandra@localhost wok]$ ./autogen.sh --system
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
configure: loading site script /usr/share/config.site
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for a Python interpreter with version >= 2.6... python
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib64/python2.7/site-packages
checking for pep8... /usr/bin/pep8
checking python module: unittest... yes
checking python module: cython... yes
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for cheetah... /usr/bin/cheetah
checking for pyflakes... no
configure: WARNING: pyflakes not found
checking for sassc... /usr/bin/sassc
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating po/Makefile.in
config.status: creating po/gen-pot
config.status: creating Makefile
config.status: creating docs/Makefile
config.status: creating docs/wokd.8
config.status: creating src/Makefile
config.status: creating src/nginx/Makefile
config.status: creating src/wok/Makefile
config.status: creating src/wok/control/Makefile
config.status: creating src/wok/model/Makefile
config.status: creating src/wok/xmlutils/Makefile
config.status: creating src/wok/plugins/Makefile
config.status: creating src/wok/plugins/sample/Makefile
config.status: creating src/wok/plugins/sample/po/Makefile.in
config.status: creating src/wok/plugins/sample/sample.conf
config.status: creating src/wok/plugins/sample/ui/Makefile
config.status: creating src/wok/plugins/sample/ui/config/Makefile
config.status: creating src/wok/plugins/sample/ui/js/Makefile
config.status: creating src/wok/plugins/sample/ui/pages/Makefile
config.status: creating ui/Makefile
config.status: creating ui/base64/Makefile
config.status: creating ui/css/Makefile
config.status: creating ui/css/fontawesome/Makefile
config.status: creating ui/css/opensans/Makefile
config.status: creating ui/images/Makefile
config.status: creating ui/images/theme-default/Makefile
config.status: creating ui/js/Makefile
config.status: creating ui/libs/Makefile
config.status: creating ui/libs/bootstrap/Makefile
config.status: creating ui/libs/bootstrap-select/Makefile
config.status: creating ui/libs/bootstrap-select/dist/Makefile
config.status: creating ui/libs/bootstrap-select/dist/js/Makefile
config.status: creating ui/libs/bootstrap-select/dist/css/Makefile
config.status: creating ui/libs/es5-shim/Makefile
config.status: creating ui/libs/jquery/Makefile
config.status: creating ui/libs/jquery-i18n/Makefile
config.status: creating ui/libs/jquery-ui/Makefile
config.status: creating ui/libs/jquery-ui/themes/Makefile
config.status: creating ui/libs/jquery-ui/themes/base/Makefile
config.status: creating ui/libs/jquery-ui/themes/base/images/Makefile
config.status: creating ui/pages/Makefile
config.status: creating ui/pages/websockify/Makefile
config.status: creating contrib/Makefile
config.status: creating contrib/DEBIAN/Makefile
config.status: creating contrib/DEBIAN/control
config.status: creating contrib/wok.spec.fedora
config.status: creating contrib/wok.spec.suse
config.status: creating tests/Makefile
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: creating src/wok/plugins/sample/po/POTFILES
config.status: creating src/wok/plugins/sample/po/Makefile
config.status: executing depfiles commands

I guess this due to tags ; git describe --tags

Build and Run-time dependencies for firewalld for fedora, RHEL and Ubuntu

Build and Run-time dependencies for firewalld for fedora, RHEL and Ubuntu
wok/Makefile.am has clear dependency of firewalld folder's for the targets : install-deb, install-data-local and uninstall-local .

Can we make firewalld as both build and runtime dependency for the applicable dirstros?

User Activity Log UI

I'm compiling all the requirements for User Activity Log in the mailing list and adding it here.

Location:

  • Will be displayed as a new tab in Wok navbar next to other plugins (Host, Virtualization, new tab).
  • Title: To be defined (Settings? Configuration?)
  • In order to add the new tab, we'll have to follow wok plugins structure and create a new folder in /src/wok/plugins/new-plugin/tab-ext.xml
  • Navbar color: Red / Old Administration new-ui color (previously associated with Ginger) To be confirmed
  • "Plugin" name: same as the title

UI:

  • Must follow Ginger and Gingerbase collapsible panels
  • Tab title: User Activity Log
  • Panel title: Logs
  • Elements:
    • Advanced Search area:
      • Plugin - Selectpicker / Combobox - Only 1 option
      • User - Input Text (If there's an API to get all users then we can attach Typeahead.js to this field)
      • Request - Selectpicker / Combobox - Only 1 option
      • Date - From (to be confirmed) - Datepicker
      • Date - To (to be confirmed) - Datepicker
      • Button: Search (format JSON data to match selected fields)
      • Button: Reset to Default (clears search and restores JSON data to show only logs from current date)
    • Logs area:
      • jQuery Bootgrid Table
      • Show inline-search renamed to "Filter" - To be confirmed
      • Enable pagination
      • Hide dropdown buttons on the right (the one that filters records shown in page and the other one that filter columns)
      • Download button on top of the table. It will download the filtered JSON data from Advanced Search area and not the inline-search from jQuery Bootgrid
      • Add Bootstrap labels to plugins names (red for Wok, green for Kimchi, blue for Ginger and cyan to Gingerbase) - To be confirmed
      • Columns: Plugin, User, Request, Date

Wireframes (these were made with Google Chrome devtools, nevermind the "Edit Template" link)
user-log-3
user-log-4

Unable to start wok

Downloaded the latest upstreamed code.

wokd is not able start.

nginx: [emerg] still could not bind()
Traceback (most recent call last):
File "/usr/bin/wokd", line 97, in
sys.exit(main(sys.argv[1:]))
File "/usr/bin/wokd", line 94, in main
wok.server.main(options)
File "/usr/lib/python2.7/site-packages/wok/server.py", line 204, in main
srv = Server(options)
File "/usr/lib/python2.7/site-packages/wok/server.py", line 137, in init
self._load_plugins(options)
File "/usr/lib/python2.7/site-packages/wok/server.py", line 182, in _load_plugins
for ident, node in sub_nodes.items():
UnboundLocalError: local variable 'sub_nodes' referenced before assignment

Multiprocess-safe logger for wok

Python logging system is thread-safe* but not multiprocess-safe. Because serial console, which runs in different process, it's necessary to have a file handler that knows how to deal with processes concurrency when writing to a logfile.

Option to make cherrypy timeout configurable

Currently wok does not have given an option to make cherrypy server timeout configurable.

If any API call takes longer than 10mins, which happens in case of lost of storage devices approx 2500+. UI says request timed-out.

By giving the option of giving cherrypy timeout configurable with some default value, user can configure it as per system setup.

Kimchi logo still displaying on the main page

Originally reported on kimchi-project/kimchi#707

Environment: x86
Operating system: Ubuntu
Browser: Mozilla Firefox
Steps performed:

  1. Installed WOK (https://github.com/kimchi-project/kimchi/tree/wok)
  2. Started wokd daemon
  3. From browser launched https://127.0.0.1:8001
  4. Login screen displayed
  5. Entered userid and password
  6. WOK web page displayed

Problem: Kimchi logo still displaying on the main page

https://cloud.githubusercontent.com/assets/12508158/8746389/475c2262-2ca6-11e5-8ec4-da0f3c4283f4.jpg

Even after wokd service enabled, wokd service not comes up after reboot.

Wokd fails to start on system boot, because of libvirtd not started before wokd.

Below is the logs from /var/log/messages:

Feb 1 18:36:32 zs95k4 kernel: end_request: I/O error, dev dasdd, sector 4206976
Feb 1 18:36:32 zs95k4 wokd: libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
Feb 1 18:36:32 zs95k4 wokd: Traceback (most recent call last):
Feb 1 18:36:32 zs95k4 wokd: File "/usr/bin/wokd", line 97, in
Feb 1 18:36:32 zs95k4 wokd: sys.exit(main(sys.argv[1:]))
Feb 1 18:36:32 zs95k4 wokd: File "/usr/bin/wokd", line 94, in main
Feb 1 18:36:32 zs95k4 wokd: wok.server.main(options)
Feb 1 18:36:32 zs95k4 wokd: File "/usr/lib/python2.7/site-packages/wok/server.py", line 205, in main
Feb 1 18:36:32 zs95k4 wokd: srv = Server(options)
Feb 1 18:36:32 zs95k4 wokd: File "/usr/lib/python2.7/site-packages/wok/server.py", line 137, in init
Feb 1 18:36:32 zs95k4 wokd: self._load_plugins(options)
Feb 1 18:36:32 zs95k4 wokd: File "/usr/lib/python2.7/site-packages/wok/server.py", line 158, in _load_plugins
Feb 1 18:36:32 zs95k4 wokd: plugin_app = import_class(plugin_class)(options)
Feb 1 18:36:32 zs95k4 wokd: File "/usr/lib/python2.7/site-packages/wok/utils.py", line 126, in import_class
Feb 1 18:36:32 zs95k4 wokd: mod = import_module(module_name, class_name)
Feb 1 18:36:32 zs95k4 wokd: File "/usr/lib/python2.7/site-packages/wok/utils.py", line 136, in import_module
Feb 1 18:36:32 zs95k4 wokd: return import(module_name, globals(), locals(), [class_name])
Feb 1 18:36:32 zs95k4 wokd: File "/usr/lib/python2.7/site-packages/wok/plugins/ginger/init.py", line 20, in
Feb 1 18:36:32 zs95k4 wokd: from ginger import Ginger
Feb 1 18:36:32 zs95k4 wokd: File "/usr/lib/python2.7/site-packages/wok/plugins/ginger/ginger.py", line 34, in
Feb 1 18:36:32 zs95k4 wokd: from models import GingerModel
Feb 1 18:36:32 zs95k4 wokd: File "/usr/lib/python2.7/site-packages/wok/plugins/ginger/models/init.py", line 21, in
Feb 1 18:36:32 zs95k4 wokd: from model import GingerModel
Feb 1 18:36:32 zs95k4 wokd: File "/usr/lib/python2.7/site-packages/wok/plugins/ginger/models/model.py", line 24, in
Feb 1 18:36:32 zs95k4 wokd: from cfginterfaces import CfginterfaceModel, CfginterfacesModel
Feb 1 18:36:32 zs95k4 wokd: File "/usr/lib/python2.7/site-packages/wok/plugins/ginger/models/cfginterfaces.py", line 32, in
Feb 1 18:36:32 zs95k4 wokd: from interfaces import InterfaceModel
Feb 1 18:36:32 zs95k4 wokd: File "/usr/lib/python2.7/site-packages/wok/plugins/ginger/models/interfaces.py", line 52, in
Feb 1 18:36:32 zs95k4 wokd: class InterfaceModel(object):
Feb 1 18:36:32 zs95k4 wokd: File "/usr/lib/python2.7/site-packages/wok/plugins/ginger/models/interfaces.py", line 54, in InterfaceModel
Feb 1 18:36:32 zs95k4 wokd: _conn = libvirt.open("qemu:///system")
Feb 1 18:36:32 zs95k4 wokd: File "/usr/lib64/python2.7/site-packages/libvirt.py", line 255, in open

After adding 'After=libvirtd.service" in [Unit] section of "/usr/lib/systemd/system/wokd.service" solves the issue.

Patch will be following soon.

Failing to load plugins in CentOS 7

Hi, I was able to run Wok with all plugins on CentOS 7 with some workarounds but my branches were a few commits behind.
After fetching the latest updates and compiling them it throws the following error messages when I run wokd:

➜  wok git:(master) ✗ sudo python src/wokd --host=0.0.0.0 --environment=development
Failed to import plugin plugins.ginger.Ginger, error: Class plugins.ginger.Ginger can not be imported, error: cannot import name upgrade_objectstore_schema
Failed to import plugin plugins.gingerbase.GingerBase, error: Class plugins.gingerbase.GingerBase can not be imported, error: cannot import name config
Failed to import plugin plugins.kimchi.KimchiRoot, error: Class plugins.kimchi.KimchiRoot can not be imported, error: cannot import name config

Distro info:

CentOS Linux release 7.1.1503 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.1.1503 (Core)
CentOS Linux release 7.1.1503 (Core)

wokd start fails if plugin does not have ui/config/tab-ext.xml

Gingers390x does not required any tabs, so it does not required to have ui/config/tab-ext.xml. But if remove ui/config/tab-ext.xml from plugins wokd start fails with below error:

Traceback (most recent call last):
File "/usr/bin/wokd", line 30, in
import wok.server
File "/usr/lib/python2.7/site-packages/wok/server.py", line 28, in
from wok import auth
File "/usr/lib/python2.7/site-packages/wok/auth.py", line 45, in
tabs = get_all_tabs()
File "/usr/lib/python2.7/site-packages/wok/utils.py", line 108, in get_all_tabs
root = ET.parse(f)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 647, in parse
source = open(source, "rb")
IOError: [Errno 2] No such file or directory: '/usr/share/wok/plugins/gingers390x/ui/config/tab-ext.xml'

"About" pop up window is not matching the new UI style

Originally reported on kimchi-project/kimchi#706

Environment: x86
Operating system: Ubuntu
Browser: Mozilla Firefox
Steps performed:

  1. Installed WOK (https://github.com/kimchi-project/kimchi/tree/wok)
  2. Started wokd daemon
  3. From browser launched https://127.0.0.1:8001
  4. Login screen displayed
  5. Entered userid and password
  6. WOK web page displayed
  7. Clicked on "About" button.
    Problem: "About" pop up window is not matching the new UI style

https://cloud.githubusercontent.com/assets/12508158/8746320/bb0676a0-2ca5-11e5-8811-a99bef5374a2.jpg

Proposal to move "Wok" tab to wok, from gingerbase

On installing wok, we get the following screen.
screenshot from 2016-03-03 16 20 40

And with installation of gingerbase, we get Wok tab and Host tab.

Wok tab has "Settings" with "User Activity" log,
screenshot from 2016-03-03 16 21 47

Since "User activity log" is at wok level and also the tab name - "Wok", makes more sense to have it in Wok framework than in Gingerbase.

I know wok was initially designed, not to include any functionality. But it make more sense to have "Wok" tab and "User Activity log" as part of wok framework.

Just my point of view.

Upon log into WOK, getting error: WOKAUTH0002E: You are not authorized to access Kimchi

I have installed WOK , and plugins : gingerbase, ginger and gingers390x.
and from browser logged into wok.
I didnt see any issue on UI, but log says following -
tail -f /var/log/wok/wok-error.log
[18/Mar/2016:12:43:01] ENGINE Bus STARTING
[18/Mar/2016:12:43:01] ENGINE Serving on 127.0.0.1:8010
*** Running feature tests ***
*** Feature tests completed ***
[18/Mar/2016:12:43:01] ENGINE Bus STARTED
[18/Mar/2016:12:43:25] ENGINE Started monitor thread 'Session cleanup'.
WOKAUTH0002E: You are not authorized to access Kimchi

Asynchronous event notification

Instead of polling the asynchronous task time by time, wok should provide a mechanism to inform the UI a task had its status changed.

Duplicated log messages

When creating a new process for websockify, both process (main and child) is probably using the same log handler. The problem is that all log entries are being duplicated:

% ps -efa | grep python
root      5204  5196 21 22:53 pts/17   00:00:01 python2 src/wokd --host=0.0.0.0
root      5235  5204  0 22:53 pts/17   00:00:00 python2 src/wokd --host=0.0.0.0
% tail -f log/wok-error.log | grep -v WOKOBJST0001E
KCHNET0011E: Network name must be a string without slashes (/) or quotes (")
KCHNET0011E: Network name must be a string without slashes (/) or quotes (")

Multi language support required for tabs

Multi language support required for tabs.

For example Host tab or the new tabs introduced for Ginger base (Dashboard, Update etc...)

screen shot 2015-12-17 at 6 33 06 pm

Right now they are in English. not sure if this issue has to be moved to plugins but I guess we need to support !!!

objectsore issue with fresh installation

platform: s390x, os: KVM for IBM z Systems
steps:
installed os freshly, installed dependencies and installed wok, ginger, gingerbase and gingers390x via git clone, autogen, make and make install.

logged in from ui and got below error when loading "Administration" tab.
screenshot from 2015-12-30 16 09 05

log captured:

[30/Dec/2015:11:34:26] HTTP Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 656, in respond
response.body = self.handler()
File "/usr/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line 188, in call
self.body = self.oldhandler(_args, *_kwargs)
File "/usr/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 34, in call
return self.callable(_self.args, *_self.kwargs)
File "/usr/lib/python2.7/site-packages/wok/control/base.py", line 351, in index
return self.get(filter_params)
File "/usr/lib/python2.7/site-packages/wok/control/base.py", line 338, in get
resources = self._get_resources(flag_filter)
File "/usr/lib/python2.7/site-packages/wok/control/base.py", line 295, in _get_resources
idents = get_list(_self.model_args, *_flag_filter)
File "/usr/lib/python2.7/site-packages/wok/plugins/ginger/models/backup.py", line 202, in get_list
return self._session_get_list(session)
File "/usr/lib/python2.7/site-packages/wok/plugins/ginger/models/backup.py", line 198, in _session_get_list
return session.get_list(self._objstore_type, sort_key='timestamp')
File "/usr/lib/python2.7/site-packages/wok/objectstore.py", line 48, in get_list
ids = self._get_list(obj_type)
File "/usr/lib/python2.7/site-packages/wok/objectstore.py", line 44, in _get_list
res = c.execute('SELECT id FROM objects WHERE type=?', (obj_type,))
OperationalError: no such table: objects

looks like some select statement is executed on empty objectstore db

[Feature request] Compress Wok logs

Hello, I want to suggest the gzip compression of kimchi logs. I noticed the logs present in /var/log/kimchi can become very large, so the gzip compression seems good idea.

Thanks,

Guilherme

Jquery-bootgrid plugin library js is broken and showing js error

While page is loaded Jquery-bootgrid plugin library js file jquery.bootgrid.min.js is showing sysntax error.
As a result bootgrid components in ginger storage and networking tab are not working.

jb issue

When the patch is applied using eml file the jquery.bootgrid.min.js is broken. While wok-ui.html.tmpl loads the same, browser console shows the above error and bootgrid init function is showing undefined.
Same is working for when patch is applied using .patch file .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.