Fix important recipes that don't run under mavericks
Closed this issue · 10 comments
These recipes need to be fixed for mavericks
- LABS - pivotal_workstation::vim_config
- LABS - pivotal_workstation::rvm
- LABS - pivotal_workstation::postgres
- LABS - pivotal_workstation::qt
This is making Sprout sort of useless on all the new machines we buy. We put a bounty out on it so hopefully it can get some attention:
https://www.bountysource.com/issues/1215590-fix-import-recipes-that-don-t-run-under-mavericks
Are you able to leave out the recipes that don't work under Mavericks for
you? This is what we've done in the mavericks branch for sprout-wrap. It
shouldn't be all or nothing.
I'll aim to send a longer update about Mavericks support to the
sprout-users@ mailing list in a few days.
In the interim, here's a brief outline of the approach we'll be taking:
- fix as many existing recipes as possible
- do not bring over recipes that prove stubborn under Mavericks, leave them
on the mountain-lion branch though - once we release the mavericks branch by making it the default, only minor
updates will be continue to be made on mountain-lion
Sprout has some recipes from the ~Leopard era, we're taking this
opportunity to purge recipes that no longer work so the project gets easier
to maintain and better for everyone.
Like its predecessor, Sprout will only support one version of OSX at a
time, for now that's still Mountain Lion, very soon it'll change Mavericks.
Thanks for posting the bounty, any help in line with the outline I've just
described would be much appreciated.
Hope this information helps you get a little closer to getting your new
machines setup.
On Tuesday, November 19, 2013, Gust wrote:
This is making Sprout sort of useless on all the new machines we buy. We
put a bounty out on it so hopefully it can get some attention:https://www.bountysource.com/issues/1215590-fix-import-recipes-that-don-t-run-under-mavericks
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/149#issuecomment-28791717
.
tiny keyboard + fat fingers
pivotal_workstation::postgres
failed on Mavericks the first time it ran (error below), it succeeded on a subsequent run.
Recipe: pivotal_workstation::postgres
* directory[/Users/vagrant/.install_markers] action create[2013-11-20T08:21:33-08:00] INFO: Processing directory[/Users/vagrant/.install_markers] action create (pivotal_workstation::postgres line 21)
[2013-11-20T08:21:33-08:00] INFO: directory[/Users/vagrant/.install_markers] created directory /Users/vagrant/.install_markers
- create new directory /Users/vagrant/.install_markers[2013-11-20T08:21:33-08:00] INFO: directory[/Users/vagrant/.install_markers] owner changed to 501
- change owner from '' to 'vagrant'
* log[no marker file found for postgres in /Users/vagrant/.install_markers, running] action write[2013-11-20T08:21:33-08:00] INFO: Processing log[no marker file found for postgres in /Users/vagrant/.install_markers, running] action write (pivotal_workstation::postgres line 31)
[2013-11-20T08:21:33-08:00] INFO: no marker file found for postgres in /Users/vagrant/.install_markers, running
* log[Did not find plist at /Users/vagrant/Library/LaunchAgents/homebrew.mxcl.postgresql.plist don't try to unload it] action write[2013-11-20T08:21:33-08:00] INFO: Processing log[Did not find plist at /Users/vagrant/Library/LaunchAgents/homebrew.mxcl.postgresql.plist don't try to unload it] action write (pivotal_workstation::postgres line 15)
[2013-11-20T08:21:33-08:00] INFO: Did not find plist at /Users/vagrant/Library/LaunchAgents/homebrew.mxcl.postgresql.plist don't try to unload it
* log[Did not find plist at /Users/vagrant/Library/LaunchAgents/org.postgresql.postgres.plist don't try to unload it] action write[2013-11-20T08:21:33-08:00] INFO: Processing log[Did not find plist at /Users/vagrant/Library/LaunchAgents/org.postgresql.postgres.plist don't try to unload it] action write (pivotal_workstation::postgres line 15)
[2013-11-20T08:21:33-08:00] INFO: Did not find plist at /Users/vagrant/Library/LaunchAgents/org.postgresql.postgres.plist don't try to unload it
* directory[/usr/local/var/postgres] action delete[2013-11-20T08:21:33-08:00] INFO: Processing directory[/usr/local/var/postgres] action delete (pivotal_workstation::postgres line 20)
(up to date)
* execute[brew install postgresql] action run[2013-11-20T08:21:33-08:00] INFO: Processing execute[brew install postgresql] action run (pivotal_workstation::postgres line 25)
==> Installing dependencies for postgresql: readline, ossp-uuid
==> Installing postgresql dependency: readline
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/readline-6.2.4.mavericks.bottle.1.tar.gz
==> Pouring readline-6.2.4.mavericks.bottle.1.tar.gz
==> Caveats
This formula is keg-only, so it was not symlinked into /usr/local.
OS X provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/readline/lib
CPPFLAGS: -I/usr/local/opt/readline/include
==> Summary
[beer] /usr/local/Cellar/readline/6.2.4: 31 files, 1.6M
==> Installing postgresql dependency: ossp-uuid
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/ossp-uuid-1.6.2.mavericks.bottle.tar.gz
==> Pouring ossp-uuid-1.6.2.mavericks.bottle.tar.gz
==> Caveats
This formula is keg-only, so it was not symlinked into /usr/local.
OS X provides a uuid.h which conflicts with ossp-uuid's header.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/ossp-uuid/lib
CPPFLAGS: -I/usr/local/opt/ossp-uuid/include
==> Summary
[beer] /usr/local/Cellar/ossp-uuid/1.6.2: 15 files, 228K
==> Installing postgresql
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/postgresql-9.3.1.mavericks.bottle.tar.gz
==> Pouring postgresql-9.3.1.mavericks.bottle.tar.gz
==> /usr/local/Cellar/postgresql/9.3.1/bin/initdb /usr/local/var/postgres -E utf8
==> Caveats
If builds of PostgreSQL 9 are failing and you have version 8.x installed,
you may need to remove the previous version first. See:
https://github.com/mxcl/homebrew/issues/issue/2510
To migrate existing data from a previous major version (pre-9.3) of PostgreSQL, see:
http://www.postgresql.org/docs/9.3/static/upgrading.html
When installing the postgres gem, including ARCHFLAGS is recommended:
ARCHFLAGS="-arch x86_64" gem install pg
To install gems without sudo, see the Homebrew wiki.
To have launchd start postgresql at login:
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
Then to load postgresql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Or, if you don't want/need launchctl, you can just run:
postgres -D /usr/local/var/postgres
==> Summary
[beer] /usr/local/Cellar/postgresql/9.3.1: 2919 files, 39M
[2013-11-20T08:22:28-08:00] INFO: execute[brew install postgresql] ran successfully
- execute brew install postgresql
* execute[create the database] action run[2013-11-20T08:22:28-08:00] INFO: Processing execute[create the database] action run (pivotal_workstation::postgres line 27)
The files belonging to this database system will be owned by user "vagrant".
This user must also own the server process.
The database cluster will be initialized with locale "en_US".
The default text search configuration will be set to "english".
Data page checksums are disabled.
================================================================================
Error executing action `run` on resource 'execute[create the database]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /usr/local/bin/initdb -U postgres --encoding=utf8 --locale=en_US /usr/local/var/postgres ----
STDOUT: The files belonging to this database system will be owned by user "vagrant".
This user must also own the server process.
The database cluster will be initialized with locale "en_US".
The default text search configuration will be set to "english".
Data page checksums are disabled.
STDERR: initdb: directory "/usr/local/var/postgres" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/usr/local/var/postgres" or run initdb
with an argument other than "/usr/local/var/postgres".
---- End output of /usr/local/bin/initdb -U postgres --encoding=utf8 --locale=en_US /usr/local/var/postgres ----
Ran /usr/local/bin/initdb -U postgres --encoding=utf8 --locale=en_US /usr/local/var/postgres returned 1
Resource Declaration:
---------------------
# In /Users/vagrant/sprout-wrap/cookbooks/pivotal_workstation/recipes/postgres.rb
27: execute "create the database" do
28: command "/usr/local/bin/initdb -U postgres --encoding=utf8 --locale=en_US /usr/local/var/postgres"
29: user node['current_user']
30: end
31:
Compiled Resource:
------------------
# Declared in /Users/vagrant/sprout-wrap/cookbooks/pivotal_workstation/recipes/postgres.rb:27:in `block in from_file'
execute("create the database") do
action "run"
retries 0
retry_delay 2
command "/usr/local/bin/initdb -U postgres --encoding=utf8 --locale=en_US /usr/local/var/postgres"
backup 5
returns 0
user "vagrant"
cookbook_name :pivotal_workstation
recipe_name "postgres"
end
[2013-11-20T08:22:28-08:00] INFO: Running queued delayed notifications before re-raising exception
[2013-11-20T08:22:28-08:00] ERROR: Running exception handlers
[2013-11-20T08:22:28-08:00] ERROR: Exception handlers complete
[2013-11-20T08:22:28-08:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 55 resources updated
[2013-11-20T08:22:28-08:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
sprout-osx-
And then it worked:
Recipe: pivotal_workstation::postgres
* directory[/Users/vagrant/.install_markers] action create[2013-11-20T19:07:40-08:00] INFO: Processing directory[/Users/vagrant/.install_markers] action create (pivotal_workstation::postgres line 21)
(up to date)
* log[no marker file found for postgres in /Users/vagrant/.install_markers, running] action write[2013-11-20T19:07:40-08:00] INFO: Processing log[no marker file found for postgres in /Users/vagrant/.install_markers, running] action write (pivotal_workstation::postgres line 31)
[2013-11-20T19:07:40-08:00] INFO: no marker file found for postgres in /Users/vagrant/.install_markers, running
* log[Did not find plist at /Users/vagrant/Library/LaunchAgents/homebrew.mxcl.postgresql.plist don't try to unload it] action write[2013-11-20T19:07:40-08:00] INFO: Processing log[Did not find plist at /Users/vagrant/Library/LaunchAgents/homebrew.mxcl.postgresql.plist don't try to unload it] action write (pivotal_workstation::postgres line 15)
[2013-11-20T19:07:40-08:00] INFO: Did not find plist at /Users/vagrant/Library/LaunchAgents/homebrew.mxcl.postgresql.plist don't try to unload it
* log[Did not find plist at /Users/vagrant/Library/LaunchAgents/org.postgresql.postgres.plist don't try to unload it] action write[2013-11-20T19:07:40-08:00] INFO: Processing log[Did not find plist at /Users/vagrant/Library/LaunchAgents/org.postgresql.postgres.plist don't try to unload it] action write (pivotal_workstation::postgres line 15)
[2013-11-20T19:07:40-08:00] INFO: Did not find plist at /Users/vagrant/Library/LaunchAgents/org.postgresql.postgres.plist don't try to unload it
* directory[/usr/local/var/postgres] action delete[2013-11-20T19:07:40-08:00] INFO: Processing directory[/usr/local/var/postgres] action delete (pivotal_workstation::postgres line 20)
[2013-11-20T19:07:40-08:00] INFO: directory[/usr/local/var/postgres] deleted /usr/local/var/postgres recursively
- delete existing directory /usr/local/var/postgres
* execute[create the database] action run[2013-11-20T19:07:40-08:00] INFO: Processing execute[create the database] action run (pivotal_workstation::postgres line 27)
The files belonging to this database system will be owned by user "vagrant".
This user must also own the server process.
The database cluster will be initialized with locale "en_US".
The default text search configuration will be set to "english".
Data page checksums are disabled.
creating directory /usr/local/var/postgres ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
creating configuration files ... ok
creating template1 database in /usr/local/var/postgres/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
/usr/local/bin/postgres -D /usr/local/var/postgres
or
/usr/local/bin/pg_ctl -D /usr/local/var/postgres -l logfile start
[2013-11-20T19:07:42-08:00] INFO: execute[create the database] ran successfully
- execute /usr/local/bin/initdb -U postgres --encoding=utf8 --locale=en_US /usr/local/var/postgres
* directory[/Users/vagrant/Library/LaunchAgents] action create[2013-11-20T19:07:42-08:00] INFO: Processing directory[/Users/vagrant/Library/LaunchAgents] action create (pivotal_workstation::postgres line 33)
(up to date)
* execute[copy over the plist] action run[2013-11-20T19:07:42-08:00] INFO: Processing execute[copy over the plist] action run (pivotal_workstation::postgres line 40)
[2013-11-20T19:07:42-08:00] INFO: execute[copy over the plist] ran successfully
- execute cp /usr/local/Cellar/postgresql/9.*/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
* execute[start the daemon] action run[2013-11-20T19:07:42-08:00] INFO: Processing execute[start the daemon] action run (pivotal_workstation::postgres line 45)
[2013-11-20T19:07:42-08:00] INFO: execute[start the daemon] ran successfully
- execute launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
* ruby_block[wait four seconds for the database to start] action run[2013-11-20T19:07:42-08:00] INFO: Processing ruby_block[wait four seconds for the database to start] action run (pivotal_workstation::postgres line 50)
[2013-11-20T19:07:46-08:00] INFO: ruby_block[wait four seconds for the database to start] called
- execute the ruby block wait four seconds for the database to start
* execute[create the database] action run[2013-11-20T19:07:46-08:00] INFO: Processing execute[create the database] action run (pivotal_workstation::postgres line 56)
[2013-11-20T19:07:47-08:00] INFO: execute[create the database] ran successfully
- execute /usr/local/bin/createdb -U postgres
* execute[create the postgres 'vagrant' superuser] action run[2013-11-20T19:07:47-08:00] INFO: Processing execute[create the postgres 'vagrant' superuser] action run (pivotal_workstation::postgres line 65)
[2013-11-20T19:07:47-08:00] INFO: execute[create the postgres 'vagrant' superuser] ran successfully
- execute /usr/local/bin/createuser -U postgres --superuser vagrant
* log[Make sure /usr/local/bin comes first in your PATH, else you will invoke the wrong psql and error with '...Domain socket "/var/pgsql_socket/.s.PGSQL.5432"] action write[2013-11-20T19:07:47-08:00] INFO: Processing log[Make sure /usr/local/bin comes first in your PATH, else you will invoke the wrong psql and error with '...Domain socket "/var/pgsql_socket/.s.PGSQL.5432"] action write (pivotal_workstation::postgres line 70)
[2013-11-20T19:07:47-08:00] INFO: Make sure /usr/local/bin comes first in your PATH, else you will invoke the wrong psql and error with '...Domain socket "/var/pgsql_socket/.s.PGSQL.5432"
* execute[touching marker file /Users/vagrant/.install_markers/postgres after successful run] action run[2013-11-20T19:07:47-08:00] INFO: Processing execute[touching marker file /Users/vagrant/.install_markers/postgres after successful run] action run (pivotal_workstation::postgres line 35)
[2013-11-20T19:07:47-08:00] INFO: execute[touching marker file /Users/vagrant/.install_markers/postgres after successful run] ran successfully
- execute touch /Users/vagrant/.install_markers/postgres
* ruby_block[test to see if postgres is running] action run[2013-11-20T19:07:47-08:00] INFO: Processing ruby_block[test to see if postgres is running] action run (pivotal_workstation::postgres line 73)
[2013-11-20T19:07:47-08:00] INFO: ruby_block[test to see if postgres is running] called
- execute the ruby block test to see if postgres is running
Yes, the postgresql installation does in fact work after the second install. It seems like the directory /usr/local/var/postgres
may be created in the new brew installation of postgres. The second pass of the postgres recipe deletes that same directory before running initdb
the second time.
I'm not entirely sure what is wrong with RVM, but am trying to fix it. Is it installing ruby-2.0.0-p247 that is broken?
@hiremaga there was broken ruby-2.0.0 binary but it has been removed and also ruby version was bumped, please try again and if it fails again let me know about the problems you face
You're right!
The current script for postgres doesn't seem to work for a new machine.
See details in #216