Customizing Thin Clients

As some of you know, the company I’m currently working for, recently acquired some thin clients to replace our old computers for the students to work on. Those PC’s are like P3 800 MHz with 512MB RAM and sadly don’t run Office 2007 anymore, so we replaced them with thin clients and are streaming those applications from a Windows Terminal Server cluster (created by and with 2X Application LoadBalancer).

So far so good, getting them to display the applications ain’t hard, the real hard part starts when you want additional things from this Windows XPe (Embedded), like lets say getting them to display a German language.

First thing is, the management software for those terminals (Wyse Device Manager or WDM) uses it’s own scripting language (with pseudo abbreviations like DF or MR – Delete File and Merge Registry – get it ?), which control the whole distribution of “packages“.

That ain’t necessarily a bad thing, it’s just an additional “language” you need to understand/learn. The initial threshold is rather low (it ain’t no C++ or C#) as it’s just a pseudo language, you just need to make sure you do things in a certain order (like use the auto login registry entry with a new administrator password *after* you changed the administrator password).

We had a lot of work at the beginning of the week (like getting all packages working), and I think we managed finishing all of them (besides some default icon foo, for which is plenty of time when them terminals are already in use).

Turning a simple chroot into a binpkg repository

OK, since Alex asked me last Sunday what exactly needs to be done to turn a simple chroot (or even a bloody box) into a binpkg producing environment, here’s a little howto …

First, lets start from a freshly unpacked stage3.

With that single change you’re basically nearly finished with setting up the whole thing, the remaining things are just

  1. Making sure the binary packages get to a web-enabled (either ftp or http) box, from where you’re going to fetch the binary packages to their target
  2. Make sure you use binary packages on the target systems by default

But first, we’re gonna need to emerge something within that freshly created build chroot.

Since we now emerged some things we do have quite a few binary packages, which we are going to need on the target systems in order to avoid individual compile time.

Now, we just need to figure out a way to get the packages to a remote repository. That’s where bashrc, rsync and ssh come into play.

Take a looksie at my bashrc (or at solar’s if you can find it), especially at syncpkg. That’s the actual function doing all the work for us. It’s basically guessing what profile you’re using atm (by reading the info’s on /etc/make.profile (x86, amd64)), and the uploading it to the remote location given by REPO_HOST, REPO_BASE and REPO_TYPE (either via environment or by /etc/make.conf).

Sure the emerge takes a bit longer (since emerge forks an rsync process via ssh that syncs the just merged binary to our remote repository), but that way you have a nice repository, from which you can install one or 1.000 boxes.

Nagios & plugins

Since we started utilizing Nagios‘s power two months ago, I finally came up with a C-based ram-plugin for nagios. The biggest problem I had with the python and perl based plugins, that some distributions (yes, SLES and Debian) don’t install either Python or Perl.

Since I wanted a manageable setup (as in unified code base across all distributions), I wanted it to work without installing too much. So I took the swap plugin and basically removed what wasn’t necessary and voila!

Here we go, yay ME!

Only thing I need to finish sometime soon, is getting the NSClient++ work on my Windows boxen (which I do have quite a few, the domain controllers, nas-cluster, …)

Thin clients

As some of you people know, we (as in the University) recently purchased some Thin Clients in order to replace some oldish’ computers and solve the software management at the same time.

The Thin Clients ain’t bad, they are Wyse V90L‘s and they (as in Wyse) use their own management software to manage and deploy those thin clients and software. The bad thing about that, is it’s using it’s own “Scripting Language” (if you can call it that way – it’s more pseudo scripting since you can’t do much with it besides some basic actions).

The Wyse Device Manager also introduces it’s own limitations. Up till now our DHCP had server options for thin clients in some other facility and thus was sending those to *all* subnets it’s acting on, thus overwriting (or disabling ?) the DHCP ACK send out by the WDM. But that’s only one.

The second one is that the WDM seems to use (or expect) the American date format internally. But how did I stumble upon that ? As you know, I’m living and working in Germany and we use a different time/date format than the American’s. Now, lets assume you want to deploy packages to you Thin Clients when no one’s using them anymore (like say – around midnight), you drag your package upon the devices and select “Specific Date/Time“. Now if you have the German date/time format, the WDM will simply tell you, “Deployment date can’t be less than the current system time.

Initially I was like *WTF*, didn’t I just enter a time in the future (~15 minutes in the future from where we at right now) ?

First I looked through their Knowledgebase, but as nothing was documented there, I called their Support Hotline, where I briefly told ’em what was going on and he immediately told me, that’d I was hitting that error, since the WDM *is* using _and_ expecting the American time/date format internally. But he told me that they’ll hopefully fix that with the next release since they get asked that quite often.

Drivers license

Somehow, there still seem to exist honest people on this world … I just found my drivers license in the mail, somehow the office responsible for the district I lost it in (it seems I lost it somewhere in Greifswald, since I got mail from the office in Landhagen) found it in their postbox and immediately mailed it to my address. YAY!

TYPO3 and MySQL replication

Apparently the TYPO3 version we are using, doesn’t play too nice with the MySQL MasterMaster replication.

Sometimes, something like this is going to happen:

Well, as you can see from the last line in the log, the Slave-SQL thread found a duplicate entry and thought it is smart to just turn off the thread instead of disregarding the just made entry. So from now on, both databases drift since there ain’t no replication anymore until someone kick starts the replication again (someone being me).

Anyway, I think I finally traced the fucker down, supposedly one of the problematic cases is located in t3lib/class.t3lib_tstemplate.php on line 362.

Basically what TYPO3 is doing is a DELETE and an INSERT right afterwards. But apparently, it doesn’t check whether the DELETE even succeeded. I hacked it for now, simply adding this:

Sadly, this looks more and more like a race-condition between the two boxes (as in the replication / UPDATE being too slow), when users visit a edited site, that hasn’t had it’s cache regenerated yet. Problem is, it ain’t just this single spot, but also the search indexing, image cache and the whole page cache. For now we switched the cluster to active/passive load balancing, till we have a chance to see if a newer TYPO3 fixes those issues.

Being oblivious

Well, the title nearly says everything .. I managed to loose my second pair of car keys, today I somehow found out that I was driving without a drivers license, so I have to go to the registration office and apply for a new one, hopefully should be done in about 4-6 weeks. Oh hell, and I have to spend about 40 € on it ..

Well, live kinda sucks if you’re oblivious. Anyway, work is giving me a ass-load of fun right now, so I’m kinda happy, though it’s Saturday evening, I’m sitting back home, just lost all my custom build Debian packages (yes, I happen to use that at work, right after SLES) and listening to Hed PE.

git-lkml for stupid people (like me)

OK, as Stephen recently asked why there is a double inclusion of in kernel/sysctl.c (and I asked Greg and Randy); I finally decided to write a patch to the LKML for possible inclusion.

But, git ain’t easy for people like me (who are used to the easiness of say – subversion or even cvs). So here’s what I did (thanks to Fernando for the help earlier today):

Now you should have a mailable patch, ready to be sent upstream that looks like this:

And if you wanna delete the branch afterwards again, just do this:

PacketPro 450 and SSH checks

As apparently the guys at Teamix read my recent blog post about their cluster solution, someone of their technical support called me on friday at work 😯

And pointed out

  1. That I’m free to express my thoughts about their product (which I recently did)
  2. That there is a better way to workaround this issue

He also said, its something which they had asked multiple times. It’s as simple as editing the Virtual Server and changing the service inspection from “Connection” to “None” .. *duh*

Don’t get me wrong, the previous rant simply originated from the logs filling up within three day. I still like the PacketPro.

Praise teh sed

Since my talk with Robin on Thursday regarding the autogenerated userinfo.xml, I finally found some time today to get all the info’s I need out of userinfo.xml.

Since I don’t really want to manually enter all those mail addresses from userinfo into LDAP manually, I figured sed might be my best friend. *BUT* sed ain’t easy .. But thanks to Fabian and Gilles, I learned something new about sed today ..

Basically I searched for a way to transform userinfo.xml into a datafile for ldapedit.

As most of you know, userinfo.xml would look like this:

So the first step would be to simply use egrep on userinfo.xml to filter only the things I needed ..

That looks more like a processable list to me. Now I only needed to convert the into dn, the into mail and be done with it.

This is what I applied on top of the above filter:

And that’s it, I just need to check the dn’s for all the users, and when I’m done with that, finito!