Monthly Archives: February 2013

uWSGI : Mono ASP.NET support

Quick post to point out that the upcoming 1.9 release of uWSGI will support running ASP.NET applications using Mono.

Not to mention all the benefits of the uWSGI application deployment and monitoring mechanisms, this is a very interesting point as you can have a unique platform running your Python and ASP.NET applications ! I’ll certainly keep an eye on it.

uWSGI : v1.4.6 released

This is quite a big release for its backports and improvements. But there are two more interesting things to note here : uWSGI supports Heroku and Dreamhost deployments !

tutorials

highlights

  • fix SERVER_PORT value in corerouters when using shared sockets
  • backported –thunder-lock option to reduce thundering herd problem (use with caution)
  • fixed pthread robust mutexes in newer glibc
  • backported improvements for the alarm_xmpp plugin
  • fixed suspend when harakiri is in place
  • reset sigmask on startup
  • fixed master+emperor configurations
  • backported more logvars (check here: https://uwsgi-docs.readthedocs.org/en/latest/LogFormat.html)
  • fixed muleloop in uwsgidecorators
  • fixed a refcnt bug in the psgi plugin spotted by Nick Gregory (issue #158)
  • backported new python build system (Heroku friendly)
  • backported –perl-arg and –perl-args options (to add items in @ARGV)
  • backported perl async fixes
  • allows –attach-daemon without workers

Packaging py3status

So I exchanged some mails with Michael Stapelberg of i3wm who rightly pointed out that my initial installation method of py3status was un-pythonic. I was not satisfied of using a bash setup either and I couldn’t imagine a better opportunity to learn how to write a proper setup.py for my project.

Thanks to my Gentoo Linux packager experience, I knew what I had to do, so a few searchs and tests later I’m glad to announce that py3status installation is standard ! I of course also packaged py3status for Gentoo Linux users : meet x11-misc/py3status on my overlay.

py3status being a real command and not a simple python module, I had to find the way to have setuptools taking care of this for me. I was happy to find out that this is pretty easy and that it works on both Linux & Windows, it’s awesome !

I will explain all this in one of my next blog post as I’m sure it can be of interest.

Meet py3status

This is the first public release of one of my open-source projects, don’t hesitate to share some feedback and/or thoughts with me.

Background

As a sysadmin, I have a lot of consoles open on multiples desktops and my 30″ screen was still not enough to cover my needs. To make things short, I needed to spare every pixel I could and KDE was really frustrating me as it was wasting a lot of space and ran quite a bunch of useless stuff in the background (akonadi/nepomuk anyone ?).

Then came my cyclic rage about it and I finally found my precious : i3wm. I just love it as it is what I ever needed : a lightweight yet very functional and handy WM.

  • No more resizing my consoles to fit next to each other and I can still use floating windows for the needed applications.
  • No more huge and pixel-hungry task bar, just a simple and very efficient one.

customization

The problem when you start using something new and awesome is that you get a lot of ideas on what you could do with it and how you’d love to customize it. I mean, when using KDE or Gnome, your ideas are quickly shaped by the fact that you’d have to learn some exotic framework or language to implement them.

  • Did you ever ask yourself how to add your own stuff in your task bar on KDE or Gnome ?
  • What if the customization options you want are not available in your WM menus ?

Well, my answer was “never mind” tbh and I slowly even lost the idea of implementing anything on my task bar.

i3bar & i3status

After switching to i3wm, my first customization was to name my workspaces and setup my own colors to adjust the look & feel of my desktop. Then I started to tune the program responsible for displaying useful information on my bar : i3status. As you may know, you have some limited modules which can take care of displaying some useful information on your bar such as the free disk space on a disk partition or your wired/wireless network status.

But then I asked myself the same questions as I used to on my KDE days : what if I want more ? my own stuff on my task bar ?

Introducing py3status

Thanks to the i3bar open and simple protocol and the robust (even if somewhat limited) i3status program, I could finally hack into my bar. Naturally, I had to do it myself and there was a few examples available on the net but nothing really handy and extensible enough. That’s how I had the idea of developping py3status !

philosophy & goals

  • no extra configuration file needed
  • rely on i3status and its existing configuration as much as possible
  • be extensible, it must be easy for users to add their own stuff/output by writing a simple python class which will be loaded and executed dynamically
  • add some built-in enhancement/transformation of basic i3status modules output

available now on github

I’m glad to announce that I pushed it today on github ! You can start using py3status now and give your feedback. I hope this project will help users get more of their i3wm environment and encourage their hacking power !

Postfix 2.10.0

Earlier this week, Wietse Venema announced the latest stable release of postfix, the famous Mail Transfer Agent. As I’m a long time user of this MTA, I thought I’d give it an echo on my blog with the usual highlights for you lazy readers.

highlights

  • Separation of relay policy (with smtpd_relay_restrictions) from spam policy (with smtpd_{client, helo, sender, recipient}_restrictions), which makes accidental open relay configuration less likely. The default is backwards compatible.
  • HAproxy load-balancer support for postscreen(8) and smtpd(8). The nginx proxy was already supported by Postfix 2.9 smtpd(8), using XCLIENT commands.
  • Support for the TLSv1 and TLSv2 protocols, as well as support to turn them off if needed for inter-operability.
  • Laptop-friendly configuration. By default, Postfix now uses UNIX-domain sockets instead of FIFOs, and thus avoids MTIME file system updates on an idle mail system.
  • Revised postconf(1) command. The “-x” option expands $name in a parameter value (both main.cf and master.cf); the “-o name=value” option overrides a main.cf parameter setting; and postconf(1) now warns about a $name that has no name=value setting.

Clustering : resource-agents v3.9.5 & crmsh v1.2.5

Quick post about two bumps I made yesterday. The important one is sys-cluster/resource-agents-3.9.5 because the previous release contained a regression on the IPaddr2 resource. IPaddr2 didn’t send unsolicited ARPs on start, depending on the ARP cache timeout time of the hosts on your topology, this could cause some serious delay when a failover takes place ! Also note the nice additions on crmsh which will make our lives easier.

resource-agents-3.9.5

  • fix IPaddr2 ARP regression
  • pgsql: support starting as Hot Standby
  • support for RA tracing

crmsh-1.2.5

  • cibconfig: modgroup command
  • cibconfig: directed graph support
  • history: diff command (between PE inputs)
  • history: show command (show configuration of PE inputs)
  • history: graph command

MooseFS : v1.6.26 released

This was one of my first package creation in portage and although it doesn’t have a quick iteration I still find this software very interesting. I was glad to see upstream release a new stable version but I have to admit I slacked quite a lot on actually seeing this bump (2012-08-16) 🙂 Anyway, it’s now live for some time in portage and I hope some folks were happy to update their platform with it.

changelog

  • (all) fixed signal handling in multithreaded modules
  • (master) added goal and trashtime limits to mfsexport.cfg
  • (metalogger) added simple check for downloaded metadata file (inspired by Davies Liu)
  • (master) better handle disk full (inspired by Davies Liu)
  • (master+metalogger) added keeping previous copies of metadata (inspired by Davies Liu)
  • (all) reload all settings on “reload” (SIGHUP)
  • (cs) disk scanning in background
  • (cs) fixed long termination issue (found by Davies Liu)

mongoDB v2.2.3 & uwsgi v1.4.5

Today’s bumps are interesting, kudos to both upstreams for their work.

mongodb-2.2.3

The main benefit of this version is the performance improvements on replicaSets. You can see the changelog here.

uwsgi-1.4.5

This one is quite a bump. I was particulary interested to know that the memory leak discovered on the gevent loop got fixed. Have a look at all the nice backports too, they’re worth it.

  • added –python-version and –perl-version
  • fixed a gevent memory leak
  • backported –extract option
  • added HTTP_Authorization support in mod_proxy_uwsgi
  • backported –php-fallback
  • backported perl uwsgi::postfork and uwsgi::atexit
  • fixed a memory leak with –http-socket during uploads
  • fixed unix signals usage in mules and spoolers
  • reset cores/requests on worker startup
  • fixed a refcnt bug in python uwsgi.workers()
  • fixed async mode when multiple fds are in place
  • fixed a cache collision bug
  • backported –emperor-procname
  • backported –touch-reload refactoring from 1.5
  • backported master+emperor fix from 1.5
  • new rbtree implementation (based on nginx) backported from 1.5
  • backported new logvars from 1.5