Posts in category WMI

Twisted web, thread pools and daemonization

The title of this blog post could have been a ticket summary like: WMI takes 100% of CPU when daemonized (with a lot of "WSGI application error" and EBADF crashes), but everything is OK when it stays attached to the current terminal. Luckily I found the solution before posting a new ticket and pushing changes to the branch ;-)

It made me suffer from a headache, because there is no documentation on this subject on Twisted website. Twisted folks tend to think everyone will use their twistd for daemon-purposes, which is a broken assumption when Twisted must just fit into an existing architecture.

I searched a lot on the daemonization side and cleaned my foundations.process.daemonize() function a little but this didn't help, anyway. Then  Rob Golding gave me an hint about it, via a very generic « twisted django wsgi » google search with a very lot of luck.

I just moved the twisted imports after the daemonization call, and everything went fine again. Hopefully, importing twisted.web.version is still possible at the beginning of my wmi.py file without breaking this thread-pool thing, which makes the "please install twisted.web" message still possible too. Nice!

Upcoming WMI2 internals (and new repo in Trac)

The following schema tries to explain how the future WMI2 is working. This architecture is already fully functionnal in our development repository and will enter stable branch soon (official due date: March 5th, 2012). We are currently in the process of polishing it before releasing the patch.

The new WMI will be a huge step forward interactive and web-2.0-like interface ; everything can be handled asynchronously, and the WMI can update any part of its interface without refreshing the whole page. It is even a fully-featured Django + Jinja2 + jQuery application, which runs on top of our new webserver. The webserver is fully WSGI compliant, and built on top of the great gevent co-routine-based library.

RPC Events Arch for WMI2

As a side note, I've now integrated the WMI2 repository into Trac to help follow the changes and global Licorn® activity. Without this, one could think that Licorn® development is halted, because it all happens in this separate branch, until its merged into the stable one.

D3 and consequent graphical updates in the WMI

I just found  D3, while researching for various things related to Licorn® evolutions. I'm pretty impressed (the word is weak).

I just experimented a little with it, and the result is very cool. See before:

Defore D3

And After:

After D3

What you can't see it that the graph is completely dynamic, made of SVG, and refreshed every 5 seconds with smooth animations, scale morphing, label smart-placing and other cool things. There are still some rough edges (in the way scale lines come in), but this is just an experiment. Which is very very positive, BTW.

Hope you like it.

WMI listen address is now configurable

The WMI listen address is now configurable, either:

  • in the main configuration file (/etc/licorn/licorn.conf if you didn't change it), with the directive daemon.wmi.listen_address. Don't put any quotes around the address. Example:
    daemon.wmi.listen_address = 192.168.1.1
    
  • on the command line, when manually starting the daemon. Example:
    sudo licornd -vvD -W 192.168.1.1
    

You can use an IP address, or a hostname (it will be resolved to an IP address). Note that the CLI argument has always precedence over the configuration file, for obvious reasons of easy testing.

WMI released, LDAP in progress

I released the version 1.1 of Licorn®, which is quite a good news. The first release after nearly a year of silence and 2 weeks of code.

All WMI features are completely functionnal, except the "import users" one, which is not critical in early deployments.

LDAP work has begun and I plan to release the first beta version (managing users and groups) between the middle and the end of the week. LDAP support will be very preliminary: we will support only all *nix features, not the SAMBA ones. But ongoing work will take care of extending these.

First goal is to make Linux clients authenticate against a Licorn® server, making the whole thing rock solid. I hate bugs ;-)