{"id":730,"date":"2013-07-29T22:12:42","date_gmt":"2013-07-30T05:12:42","guid":{"rendered":"http:\/\/www.dreness.com\/blog\/?p=730"},"modified":"2019-12-07T17:10:30","modified_gmt":"2019-12-08T00:10:30","slug":"longcuts-occasionally-form-when-shortcuts-conspire","status":"publish","type":"post","link":"https:\/\/dreness.com\/blog\/archives\/730","title":{"rendered":"Longcuts occasionally form when shortcuts conspire"},"content":{"rendered":"<p>Saw a tweet about one of those one-touch <a href=\"https:\/\/github.com\/yahonda\/rails-dev-box\">&#8216;build me a VM&#8217; things<\/a>\u00a0for Oracle server + rails and decided to try it; this one is mostly driven by some software called <a href=\"https:\/\/www.vagrantup.com\/downloads.html\">vagrant<\/a>, which seems cool enough. It definitely doesn&#8217;t seem like it&#8217;s supposed to be hard.<\/p>\n<p>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 &#8211; which I did. The error is:<\/p>\n<pre>err: \/Stage[main]\/Oracle::Xe\/File[\/home\/vagrant\/oracle-xe-11.2.0-1.0.x86_64.rpm.zip]:\r\nCould not evaluate: Could not retrieve information from environment production\r\nsource(s) puppet:\/\/\/modules\/oracle\/oracle-xe-11.2.0-1.0.x86_64.rpm.zip at\r\n\/tmp\/vagrant-puppet\/modules-0\/oracle\/manifests\/init.pp:100<\/pre>\n<p>I looked, and sure enough the file is totally there &#8211; I copied it there! Ah ha, but Safari helpfully decompressed it for me, leaving a naked .rpm, which vagrant seemingly isn&#8217;t prepared to handle. Ok, whatever&#8230; zip it:<\/p>\n<pre style=\"padding-left: 30px;\">cd\u00a0puppet\/modules\/oracle\/files\r\nzip -r\u00a0oracle-xe-11.2.0-1.0.x86_64.rpm.zip\u00a0oracle-xe-11.2.0-1.0.x86_64.rpm<\/pre>\n<p>Try again: vagrant destroy ; vagrant up. Faile. This time, the error is:<\/p>\n<pre>err: \/Stage[main]\/Oracle::Xe\/Exec[alien xe]\/returns: change from notrun to 0\u00a0\r\nfailed: \/usr\/bin\/alien --to-deb --scripts Disk1\/oracle-xe-11.2.0-1.0.x86_64.rpm\u00a0\r\nreturned 2 instead of one of [0] at\u00a0\r\n\/tmp\/vagrant-puppet\/modules-0\/oracle\/manifests\/init.pp:129<\/pre>\n<p>Uh&#8230; what? two instead of one of zero. Ok&#8230; As I was reading the zip man page, I remembered that I totally don&#8217;t like zip, leading to the immediate assumption that even though zip exited zero, it didn&#8217;t produce output that vagrant was expecting. In a little rodent voice, my mind said &#8220;probably some kind of silly directory nesting crap&#8221;.<\/p>\n<p>I revoked Safari&#8217;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!<\/p>\n<pre>notice: Finished catalog run in 1401.84 seconds<\/pre>\n<p>Oracle is all ready to go!<\/p>\n<pre>{56} andre@foci [work\/rails-dev-box-runs-oracle] % vagrant ssh\r\nWelcome to Ubuntu 12.04 LTS (GNU\/Linux 3.2.0-23-generic x86_64)\r\n\u00a0* Documentation:\u00a0 https:\/\/help.ubuntu.com\/\r\nWelcome to your Vagrant-built virtual machine.\r\nLast login: Fri Sep 14 02:23:18 2012 from 10.0.2.2\r\nvagrant@rails-dev-box:~$ sqlplus\r\nSQL*Plus: Release 11.2.0.2.0 Production on Tue Jul 30 00:12:34 2013\r\nCopyright (c) 1982, 2011, Oracle.\u00a0 All rights reserved.\r\nEnter user-name: ^C\r\nvagrant@rails-dev-box:~$ tnsping localhost\r\nTNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on 30-JUL-2013 00:16:24\r\nCopyright (c) 1997, 2011, Oracle.\u00a0 All rights reserved.\r\nUsed parameter files:\r\nUsed HOSTNAME adapter to resolve the alias\r\nAttempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))\r\nOK (0 msec)<\/pre>\n<p>&#8230;<\/p>\n<p>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.<\/p>\n<p><a href=\"https:\/\/dreness.com\/blog\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-29-at-9.43.15-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-736\" alt=\"nested things...\" src=\"https:\/\/dreness.com\/blog\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-29-at-9.43.15-PM-1024x649.png\" width=\"640\" height=\"405\" srcset=\"https:\/\/dreness.com\/blog\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-29-at-9.43.15-PM-1024x649.png 1024w, https:\/\/dreness.com\/blog\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-29-at-9.43.15-PM-300x190.png 300w, https:\/\/dreness.com\/blog\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-29-at-9.43.15-PM.png 1240w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>I used &#8220;Show in Finder&#8221; from the safari downloads list to get there (which can be done successfully without reading anything, since the position is dependable), and somehow didn&#8217;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&#8217;t ever type &#8220;Disk1&#8221;. Drive safe!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Saw a tweet about one of those one-touch &#8216;build me a VM&#8217; things\u00a0for 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&#8217;t seem &hellip; <a href=\"https:\/\/dreness.com\/blog\/archives\/730\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,13],"tags":[],"class_list":["post-730","post","type-post","status-publish","format-standard","hentry","category-pro-tip","category-the-more-you-know"],"_links":{"self":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts\/730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/comments?post=730"}],"version-history":[{"count":22,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts\/730\/revisions"}],"predecessor-version":[{"id":1236,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/posts\/730\/revisions\/1236"}],"wp:attachment":[{"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/media?parent=730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/categories?post=730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dreness.com\/blog\/wp-json\/wp\/v2\/tags?post=730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}