20100808

How are the mighty fallen...

I am defeated. The computer has won. Tomorrow I shall retaliate with a reboot of several pieces of hardware, but right now I'm done with it all.

One wouldn't think that something as simple as a NAS could bring down several servers. I'm not even sure why it's capable, but it is. And two of my servers have now paid the price.

I'm a into-virtualization-kind-of-guy. I like to virtualize my hosts because it gives me the ability to send magical reset button events to them without having to drive into the office. I can RDC to their system consoles and make the magick happen whilst sshd is milling around in a zombie-like state. I never fear cycling the systems while I'm at home, comfortable, at my workstation.

But when the VM host suffers a panic-attack, the shit hits the fan. (In true "Airplane!" fashion, it also spins around a little before shlopping out onto the counter.) So I'm guessing right about now the host has a load average of around 10; it should be less than 1. I'm guessing that the VM responsible - which is already terminated, by the way - got nice and clunked up when the Netgear ReadyNAS 1100 exploded itself while trying to facilitate my very simple chmod -R request. I mean, really, wtf?! Is this what technology has come to? I know every Windows user expects a lock-up at least once a week, and a therapeutic reboot to fix all problems, but the "rest of us" like machines and operating systems that can go 180 days without flinching. Yeah, try that on Windows XP or 7 - I DARE YOU!

I once had a box live over 300 days before the power went out. Damn UPS batteries.

But here we have ReadyNAS, a strange Debian derivation running on a Sparc, serving up LVM-goodness and some superiority-complex called "X-RAID". Whatever it's got, it isn't enough to deal with my burly Linux boxen that madly request to store data on it. Even with dual gigabit ports, it simply can't handle the load, it seems...

...or it has shitty hard drives. That's also a distinct possibility. We've been through that mess already, but I have a terrible suspicion the faulty disks are not all gone. Anyway, it was over NFS, a simple chmod command, and then KABLAM! I can ping it, but I can't see it on Raidar (their nifty little utility that doesn't do much except make NAS lights blink - which is kinda cool in and of itself), nor can I connect to it via any mechanism including the web interface, which was painfully slow when it WAS working.

What a pain in the ass....

20100711

New Server Notes

Like mentioned in my last post, I don't really look forward to what I'm about to subject myself to. But, it needs to be done. Kinda like regular prostate exams...

(No, I haven't gone through one of those yet. Not looking forward to it, either.)

Set Up Server: Ubuntu Server 10.04 LTS x64
Commands so far:

apt-get dist-upgrade
apt-get upgrade
apt-get install postgresql-8.4 postgresql-client postgresql-doc
apt-get install vnc4server fluxbox
apt-get install ia32-libs


Reconfigure .vnc/xstartup to start fluxbox instead of the default window manager.

How to configure sudo access (via the foobar group membership) to an alternative account (the foobar user) without giving pure root access:

%foobar ALL=(ALL) NOPASSWD: /bin/su - foobar


Other tasks to do:
  • Set up other user accounts and grant them access to the appropriate folders, powers.
  • Upload a basic smalltalk distro and get it running
  • Configure automatic-loading scripts in case of server reboot
  • (someday) configure nice shutdown scripts for taking server offline or rebooting
Handy scripts:
launch_smalltalk.sh
#!/bin/bash
cd current
nohup ./cobalt.sh &
echo $!

Make sure that the headless.sh script loads the correct video driver; also, fix if necessary from trying to link to libraries that don't exist, or have been moved to someplace else.
start_vnc.sh
#!/bin/bash
vncserver -alwaysshared -localhost -geometry 1024x768 :1


stop_vnc.sh
#!/bin/bash
vncserver -kill :1




Notes on Configuring PostgreSQL 8.4
as root:
su - postgres
psql
(do your funk here)
  • Create a new role, as postgresql views roles and users as the same thing.
  • Alter the role after you forget to give it permissions like LOGIN.
  • Optionally create a tablespace and make sure the new database uses it.
  • Create a database: CREATE DATABASE foo OWNER bar;
That should just about do it, I think...

Fun with PostgreSQL and Smalltalk

On any windows system, this would be trivial. NOT SO ON LINUX. Why did I use Linux? Because I love it, and it doesn't need a GIG OF F*CKING RAM to run a web server. That being said, I'm not sure I'd "happily" choose it again if the web server was one based on Seaside, but I'm going to do it again. But Seaside is the second half of the fun. The first half was getting PostgreSQL/ODBC and the given Smalltalk environment (OpenCobalt) to be friends.

You'll have to pardon my opinions. I am not a zealot, nor an evangelist. As such, I may well be burned at the stake as an absolute heretic. But I know my sh*t, I put in my hours, I bust my ass, and I have very little patience for those who cling to and fight fervently for lofty ideals while not achieving harmonious utility and productivity from their efforts. Such people are, AFAIC, a sinful waste of time.

Server: Ubuntu Server 10.04 LTS x64
WHAT I DID:

apt-get install odbc-postgresql
odbcinst -i -d -f /usr/share/psqlodbc/odbcinst.ini.template


* Configured DSN using ODBCConfig tool in X (superuser to do this; apt-get it before trying to use it)

Handy Documentation:
FFI info - http://wiki.squeak.org/squeak/1414

"I find myself saving every few minutes; it reminds me of when I was a kid, playing those old Sierra adventure games. Every few steps or screens I'd hit SAVE. The motto was 'Save Early, Save Often' because you never knew when or how you were gonna die! So it is with Squeak..."




FFI Loading Snafu...
The Foreign Function Interface was totally missing, or partially broken, depending on which distro you use. To recover it, you have to do the following voodoo dance:

Get the sources:

MCHttpRepository
location: 'http://source.squeak.org/FFI'
user: ''
password: ''.


Load the sources, in THIS ORDER:
  1. FFI-Pools
  2. FFI-Kernel
  3. FFI-Win32 (or FFI-Unix, or FFI-MacOS, or all three)
  4. FFI-Tests
  5. FFI-Examples

"The more I use the end-products of Smalltalk coders, I suspect their work to be steaming piles of crap. Disorganized, disjointed, lacking in all notion of communal productivity and standardization - it's the ultimate narcisists' environment. Now, the language may have some fault in that, but the environment devised around language is where the true evil seems to lurk."


DEALING WITH ODBC LIBRARY FROM SQUEAKMAP
OpenCobalt does NOT understand the _ operator. Seems they've moved on to bigger and better keyboards. Find/replace all " _ " with " := " when trying to filein the ODBC changeset that is available from SqueakMap.

By the way, the ODBC lib I found in Sqeakmap was terribly outdated. Had zero support for non-Windows systems. Got updated copy from coworker - have NO IDEA where he got it. And that's kind of crap that just pisses me off.

Of course, once you have the right lib, it still won't Just Work (tm). To get ODBC library to work correctly, do:
    ODBCLibrary default initialze.