So, I have an interesting problem.
I have an RoR image management application that I've been developing
that currently processes images by running a system command to a
customized image utility. That part works great.
Now, some of these processes take a while, and I've had some success
speeding things up by running them via XGrid on many computers at once.
I've come very far in having my application send these batch commands
directly to the grid:
1. I have the XGrid set up with Kerberos so that each computer can
operate on the images over the network with the correct permissions.
2. I have my program set up to produce a proper plist to describe the
3. If I log into the shell, run kinit -k -t /etc/my_app.keytab
my_app_user@DOMAIN.NAME.COM, and then run my xgrid command with the
plist that my program generates, it works fabulously.
But there's one big snag. If I try to run a system call from within
Ror (using system() or backtick syntax, or an IO.popen, or a
PTY.spawn), no matter what I do, I just can't get kinit to get valid
credentials. Even if I log in as my_app_user on the command line, and
run kinit myself, my program still can't get any credentials.
The error reported by kinit is:
kinit: Error getting initial tickets: Credentials cache server
Now, I've scoured the internet and I can't find a single explanation of
what this error means. I checked the environment variables, and even
if I set the subshell's environment variables to match exactly those of
my login shell, it gives the same error. What's really weird is many
places refer to problems with the credentials cache, but none of them
refer to a "credentials cache *server*".
Is there a better way to do this that might actually work? I read out
there that at least one person has developed a way to bind kerberos to
ruby, but I have no idea what to do with it, and it still doesn't
answer the question of xgrid (because xgrid would still be within the
system call, unless of course someone out there has a way to send xgrid
commands directly from ror - anyone? (doubt it)). I uh... really
don't know much about kerberos, so I might just be missing something
obvious here, still I can't find any useful information anywhere.
It'll be really sweet if I can get this to work, and in exchange I'd be
happy to share my xgrid plist functions... I know it's not much, but
it's like 4 hours you don't have to waste... Thanks!