Longcuts occasionally form when shortcuts conspire

Saw a tweet about one of those one-touch ‘build me a VM’ things for Oracle server + rails and decided to try it; this one is mostly driven by some software called vagrant, which seems cool enough. It definitely doesn’t seem like it’s supposed to be hard.

Everything was going fine until one of the child scripts reached for an RPM I was supposed to have downloaded and placed in specific spot – which I did. The error is:

err: /Stage[main]/Oracle::Xe/File[/home/vagrant/oracle-xe-11.2.0-1.0.x86_64.rpm.zip]:
Could not evaluate: Could not retrieve information from environment production
source(s) puppet:///modules/oracle/oracle-xe-11.2.0-1.0.x86_64.rpm.zip at

I looked, and sure enough the file is totally there – I copied it there! Ah ha, but Safari helpfully decompressed it for me, leaving a naked .rpm, which vagrant seemingly isn’t prepared to handle. Ok, whatever… zip it:

cd puppet/modules/oracle/files
zip -r oracle-xe-11.2.0-1.0.x86_64.rpm.zip oracle-xe-11.2.0-1.0.x86_64.rpm

Try again: vagrant destroy ; vagrant up. Faile. This time, the error is:

err: /Stage[main]/Oracle::Xe/Exec[alien xe]/returns: change from notrun to 0 
failed: /usr/bin/alien --to-deb --scripts Disk1/oracle-xe-11.2.0-1.0.x86_64.rpm 
returned 2 instead of one of [0] at 

Uh… what? two instead of one of zero. Ok… As I was reading the zip man page, I remembered that I totally don’t like zip, leading to the immediate assumption that even though zip exited zero, it didn’t produce output that vagrant was expecting. In a little rodent voice, my mind said “probably some kind of silly directory nesting crap”.

I revoked Safari’s archive expanding credentials and re-downloaded the rpm.zip, and copied that zip file into the puppet staging area. This time it all worked!

notice: Finished catalog run in 1401.84 seconds

Oracle is all ready to go!

{56} andre@foci [work/rails-dev-box-runs-oracle] % vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
 * Documentation:  https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Last login: Fri Sep 14 02:23:18 2012 from
vagrant@rails-dev-box:~$ sqlplus
SQL*Plus: Release Production on Tue Jul 30 00:12:34 2013
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Enter user-name: ^C
vagrant@rails-dev-box:~$ tnsping localhost
TNS Ping Utility for Linux: Version - Production on 30-JUL-2013 00:16:24
Copyright (c) 1997, 2011, Oracle.  All rights reserved.
Used parameter files:
Used HOSTNAME adapter to resolve the alias
OK (0 msec)

Looking back in Finder, I did eventually notice that the zip file expands to a directory called Disk1, from which I copied the rpm to the puppet staging area without realizing I was not copying from the downloads folder.

nested things...

I used “Show in Finder” from the safari downloads list to get there (which can be done successfully without reading anything, since the position is dependable), and somehow didn’t notice the extra nesting; and I used drag-and-drop to insert the file path into a waiting Terminal window to cp it into the puppet area, so I didn’t ever type “Disk1”. Drive safe!

About dre

I like all kinds of food.
This entry was posted in Pro Tip, The More You Know. Bookmark the permalink.

Leave a Reply