March 2010
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
About
This site is an effort to share some of the base knowledge I have gathered through all this years working with Linux, FreeBSD, OpenBSD, Python or Zope, among others. So, take a look around and I hope you will find the contents useful.
Recent Entries
Recent Comments

collective.plonetruegallery 0.8.2b3
2010-03-10 plone.org releases

Press Room 3.3
2010-03-10 plone.org releases

Products.Scrawl 1.3.2
2010-03-10 plone.org releases

Self-motivator: Programming You might not know him. You should....
2010-03-09 Ramble on

La Copy & Paste Web
2010-03-09 blackshell

Branco
2010-03-09 emereci

Melodía
2010-03-09 emereci

Palabras Contadas
2010-03-09 emereci

Speed test between django_mongokit and postgresql_psycopg2
2010-03-09 peterbe.com

In July
2010-03-09 Ramble on

Dark Yellow Morning Sky
2010-03-09 betabug

Vende enlaces con backlinks.com
2010-03-09 userlinux.net

OpenSSH 5.4 released
2010-03-09 OpenBSD Journal (undeadly.org)

Mercurial en Fedora Core 4 y CentOS 5
2010-03-08 userlinux.net

How and why to use django-mongokit (aka. Django to MongoDB)
2010-03-08 peterbe.com

"As Spain holds the rotating Presidency of the EU Council, it is currently defining a European..."
2010-03-07 Ramble on

Planting Trees
2010-03-07 betabug

Returning committer: Niels Heinen (ports)
2010-03-07 FreeBSD latest news

pjsua: The Geek Out SIP Client
2010-03-06 betabug

Ubuntu Cola or Ubuntu Linux
2010-03-06 peterbe.com

DbWrench Database Design & Synchronization v1.6.3
2010-03-05 PostgreSQL latest news

High performance Grails with memcached
2010-03-04 Oliver's place (django)

Notificador para Spotify en Linux sobre Wine
2010-03-04 vaites (dmnet)

FreeBSD 7.3-RC2 Available
2010-03-04 FreeBSD latest news

Global hotkeys para Spotify en Linux sobre Wine
2010-03-03 vaites (dmnet)

"[…] when researchers extract a single food from a diet of proven value, it usually fails to..."
2010-03-03 Saâd Kadhi / The Web self()

New committer: Neel Natu (src)
2010-03-03 FreeBSD latest news

DynDNS, ddclient y mundo-r
2010-03-02 userlinux.net

This Month in Plone - March 2010
2010-03-02 plone.org news

Announcing the Plone logo usage guidelines & policy
2010-03-02 plone.org news

Recent Trackbacks
Categories
OpenBSD (8 items)
BSD (0 items)
FreeBSD (11 items)
Linux (1 items)
Security (3 items)
Python (18 items)
Zope (12 items)
Daily (104 items)
e-shell (7 items)
Hacks (7 items)
PostgreSQL (3 items)
OSX (7 items)
Nintendo DS (0 items)
enlightenment (0 items)
Apache (3 items)
Nintendo Wii (0 items)
Django (23 items)
Music (9 items)
Plone (7 items)
Archives
Links

Syndicate this site (XML)

RSS/RDF 0.91

03 marzo
2010

someone should tell google to avoid certain subdomain names

google! google! I'm here, I'm telling you that!

It all began this morning, when someone pointed me to the fact that the domain gemablog-.blogspot.com wasn't resolving correctly.

What? of course it is not resolving - was my first thought - did you see the - at the end of the subdomain name?

As you can read in RFC-1034:

The labels must follow the rules for ARPANET host names. They must start with a letter, end with a letter or digit, and have as interior characters only letters, digits, and hyphen. There are also some restrictions on the length. Labels must be 63 characters or less.

I know there are some other RFCs that added some modifications to that rule later on, but I didn't find any that allow us to use - at the end of a subdomain or domain name (please do correct me if I'm wrong).

The funny part of the story is that, depending on your operating system and the tool you are using, that domain will resolve, or not.

For example:

  • dig works in FreeBSD 7 and 8, OpenBSD 4.2 and 4.6, Ubuntu Karmic, Linux Mint Helena, Debian Lenny and MacOSX Leopard

  • ping works in OpenBSD 4.2 and 4.6 and in MacOSX Leopard, but it doesn't on the other ones, resulting in different errors:

    In Linux I got:

    ping: unknown host gemablog-.blogspot.com
    

    While in FreeBSD I got:

    ping: cannot resolve gemablog-.blogspot.com: Unknown server error
    

The same happens to some other tools (like lynx or links) or even if you try to open connections to that hostname using a programming language.

Adding a line in /etc/hosts for the domain (pointing to the appropiate ip address) solves the problem.

Anyone that could add a reasonable explanation on this?

OH! and it is not only google who is doing that, seems there are some other domains that allow users to use such subdomain naming scheme (while others don't, like dyndns.org).

Posted by wu at 14:49 | Comments (2) | Trackbacks (0)
24 febrero
2010

Daybreakers (2009)

Daybreakers (2009) official cover Daybreakers (2009) vampires in a nearby future

"It is 2019, in a world where being a vampire is no more extraordinary, different, and they've replaced humans' place in the planet, there are still a few people that will fight for a change"

This could be a small summary of the plot of the movie. This is not a new-era vampire movie (where vampires are not afraid of the light, for example) but it has all the well-known myths from those creatures (you got a hit through your heart, you are dead!) with a touch of sci-fi in the background.

The overall look of the film reminds me of Equilibrium, which is probably one of the reasons I liked it. Perhaps the only think I disliked was that, imho, the movie is a little bit short (90 minutes). Perhaps doing it 30-40 minutes longer could avoid that sensation it left on me that things happens too fast, some times like being not connected one to another.

Anyway, if you like vampire, action and sci-fi movies, go for it!.

You can get more info about the movie in the IMDB:

http://www.imdb.com/title/tt0433362/

Posted by wu at 08:37 | Comments (2) | Trackbacks (0)
22 febrero
2010

A sysadmin life, everyday is like this

xkcd did it once again, great job man!

The weird sense of duty really good sysadmins have can border on the sociopathic, but it's nice to know that it stands between the forces of darkness and your cat blog's servers. <- Xkcd.com

From: http://xkcd.com/705/

Posted by wu at 19:45 | Comments (0) | Trackbacks (0)
16 febrero
2010

NFS server behind a PF firewall

redirecting NFS traffic could be a little bit tricky

Second post entitled something behind some-other-thing, I've wasted all my imagination when I was a child... ;)

Yesterday I found a small problem with NFS while working on this setup:

NFS behind a PF firewall

In the setup, there are 2 Linux-based NAS devices that export a 1Tb share over NFS. Both NAS are in sync so, if one fails, we can mount the other one and users would be able to keep working while the first NAS is replaced.

Both NAS devices are in a Gigabit LAN, connected with one of the network interfaces on a FreeBSD server (subnet 192.168.10.0/24).

On the other side of the server, there was another LAN, where workstations are connected to the server (subnet 192.168.1.0/24).

The plan was to mount the /nfs/shares share in the FreeBSD server and then export it again from the server, allowing the workstations to mount it. It didn't work. After some reading I found out that NFS does not like to re-export NFS shares, that is, if you mount an NFS share from server A on server B and then you try to export that share from the mount point in server B to server C (for example) you will get all kinds of nasty errors.

It was time for a change in the plan. I didn't want to give full-access to the NAS devices and I didn't want the workstations to mount the share directly from the NAS devices either, because if one fails, I would have to modify the mounts in every workstation so they use the backup NAS device.

Perhaps I could use PF in the FreeBSD server to redirect NFS traffic from the workstations directly to the NAS devices...

Continue reading "NFS server behind a PF firewall"
Posted by wu at 14:01 | Comments (6) | Trackbacks (0)
05 febrero
2010

tracd behind an apache2 proxy

wrong redirect after adding a ticket

I found this weird behaviour with tracd and an apache proxy today, while setting up some public trac access for one of our projects.

This is the setup (click on the image for a larger version):

tracd behind an apache 2.2 proxy

The idea is pretty basic, there is an Apache server running with SSL support and accepting requests for https://my.publicname.com. It is configured to act as a reverse proxy for the server running tracd behind it, accepting requests for http://192.168.1.2:8000.

So, in the example someone could open up a browser, put https://my.publicaddress.com/project in the address/location bar and access that project trac page. The process would be:

  • 1. A request is sent to the Apache server, which will accept it and process it using the following rule in the VirtualHost configuration:

    RewriteRule ^/project/(.*) \
                http://192.168.1.2:8000/project/$1 [L,P]
    
  • 2. Another request is sent from Apache to tracd, asking for the needed data

  • 3. The data is sent back from tracd to Apache

  • 4. The data is sent back to the user, transparently (the user doesn't even know that there are more than one server serving the contents).

Nice!! but... it failed when I tried to add a ticket using a external connection. :(

Each time I tried to add a ticket, after it was added, my browser was redirected to http://192.168.1.1:8000/project/ticket/(ticketnumber) instead of https://my.publicaddress.com/project/ticket/(ticketnumber). Ugly. It seemed like trac was building the url internally and, of course, that internal url will not work from outside.

After some read-and-try, I found that the problem could be solved editing my trac env trac.ini config file, and replacing:

base_url =

[ ... ]

use_base_url_for_redirect = False

with:

base_url = /project

[ ... ]

use_base_url_for_redirect = True

This solved the problem, allowing me to use the trac instance from both within the LAN and from the outside.

Posted by wu at 16:24 | Comments (1) | Trackbacks (0)
28 enero
2010

Paris happiness

wow, almost 5 years have passed since that picture

Feeling happiness in Paris - 2005

Yes, I was happy when Marta took that picture. It was 2005 and we (Marta, Rita, Dolo and me) were in Paris during our one-week excursion to France (3 days in the Bretagne, 3 days in Paris) and I was happy.

I like group trips, even more if there is a car involved and it ends in a road trip. That trip was kind of a mix, road trip during the first 3 days and totally different while we were in Paris.

The photo was taken in a small green area by the memorial to the martyrs of deportation. It was February (or March, don't remember exactly) and it was cold, but I couldn't resist to lay down on the grass.

It was perfect, being there, doing that, almost perfect... until a gendarme appeared and told us that laying on the grass was not allowed, too bad.

Posted by wu at 09:23 | Comments (0) | Trackbacks (0)
24 enero
2010

New FreeBSD port: openerp-web

YES! my first port after sooo much time.

Today my first FreeBSD port went into the ports tree:

http://www.freebsd.org/cgi/query-pr.cgi?pr=143036

I've ported the OpenERP web client so, if you update your ports tree now (using portsnap or csup) you can search for openerp:

cd /usr/ports && make search name=openerp

You will get two results, the openerp-server port and my openerp-web port:

Port:   py26-openerp-web-5.0.6
Path:   /usr/ports/finance/openerp-web
Info:   OpenERP Web Client
Maint:  HERE_GOES_MY_EMAIL!
B-deps: gettext-0.17_1 libiconv-1.13.1 py26-Babel-0.9.4 py26-beaker-1.5.1 py26-cheetah-2.4.1_1 py26-cherrypy-3.1.2 py26-formencode-1.2.2 py26-mako-0.2.5 py26-markdown-2.0.3 py26-parsing-1.5.2_1 py26-pytz-2009u py26-setuptools-0.6c11 py26-simplejson-2.0.9 py26-xlwt-0.7.2 python26-2.6.4
R-deps: gettext-0.17_1 libiconv-1.13.1 py26-Babel-0.9.4 py26-beaker-1.5.1 py26-cheetah-2.4.1_1 py26-cherrypy-3.1.2 py26-formencode-1.2.2 py26-mako-0.2.5 py26-markdown-2.0.3 py26-parsing-1.5.2_1 py26-pytz-2009u py26-setuptools-0.6c11 py26-simplejson-2.0.9 py26-xlwt-0.7.2 python26-2.6.4
WWW:    https://launchpad.net/openobject-client-web

I needed that, as I've been working a lot on setting up OpenERP solutions under FreeBSD so having the ports to take care of the dependencies is very useful.

Lately I've been working on a howto style doc too. In that doc I cover how to install and configure both the openerp server and the web client. I'll post about it once it is finished.

Posted by wu at 13:07 | Comments (2) | Trackbacks (0)