New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DE65]: runit cookbook making installs fail #352

Closed
kstev opened this Issue Mar 28, 2013 · 8 comments

Comments

Projects
None yet
5 participants
@kstev

kstev commented Mar 28, 2013

When uploading cookbooks to chef server running chef-server version 10.12.0, upload fails with the following error:

FATAL: Cookbook file test/spec/libraries/provider_runit_service_spec.rb has a ruby syntax error:
FATAL: /opt/rpcs/chef-cookbooks/cookbooks/runit/test/spec/libraries/provider_runit_service_spec.rb:72: syntax error, unexpected '.', expecting kEND
FATAL: .with(service_status_command)
FATAL: ^
FATAL: /opt/rpcs/chef-cookbooks/cookbooks/runit/test/spec/libraries/provider_runit_service_spec.rb:73: syntax error, unexpected '.', expecting kEND
FATAL: .and_return(mock("ouput", :stdo...
FATAL: ^

Adding '' characters onto the end of lines before problem lines passes the syntax check so upload succeeds.

@breu

This comment has been minimized.

Show comment
Hide comment
@breu

breu Mar 29, 2013

Contributor

@kstev Your chef-server and chef-client are out of date and do not include an updated ruby interpreter...

Contributor

breu commented Mar 29, 2013

@kstev Your chef-server and chef-client are out of date and do not include an updated ruby interpreter...

@mancdaz

This comment has been minimized.

Show comment
Hide comment
@mancdaz

mancdaz Apr 3, 2013

Member

@kstev - the current cookbooks are designed for use with > chef 11. The runit cookbook is actually maintained by opscode here: https://github.com/opscode-cookbooks/runit. We simply submodule from it in our parent repo.

Member

mancdaz commented Apr 3, 2013

@kstev - the current cookbooks are designed for use with > chef 11. The runit cookbook is actually maintained by opscode here: https://github.com/opscode-cookbooks/runit. We simply submodule from it in our parent repo.

@mancdaz mancdaz closed this Apr 3, 2013

@JCallicoat

This comment has been minimized.

Show comment
Hide comment
@JCallicoat

JCallicoat Apr 22, 2013

I'm getting the same traceback with chef-server 11.0.2 with embedded ruby 1.9.3, no other ruby in the path, and knife 11.2.0 on the client.

root@infra01:~# ssh rack@169.254.123.2 'which ruby ; echo $?'
1

root@infra01:~# ssh rack@169.254.123.2 '/opt/chef-server/embedded/bin/ruby -v'
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux]

root@infra01:~# knife -v
Chef: 11.2.0

root@infra01:~# knife client list -VV
DEBUG: Signing the request as controller
DEBUG: Sending HTTP Request via GET to 169.254.123.2:443/clients
DEBUG: ---- HTTP Status and Header Data: ----
DEBUG: HTTP 1.1 200 OK
DEBUG: server: nginx/1.2.3
DEBUG: date: Mon, 22 Apr 2013 21:51:02 GMT
DEBUG: content-type: application/json
DEBUG: transfer-encoding: chunked
DEBUG: connection: close
DEBUG: x-ops-api-info: flavor=osc;version=11.0.2;erchef=1.2.5
DEBUG: content-encoding: gzip
DEBUG: ---- End HTTP Status/Header Data ----

JCallicoat commented Apr 22, 2013

I'm getting the same traceback with chef-server 11.0.2 with embedded ruby 1.9.3, no other ruby in the path, and knife 11.2.0 on the client.

root@infra01:~# ssh rack@169.254.123.2 'which ruby ; echo $?'
1

root@infra01:~# ssh rack@169.254.123.2 '/opt/chef-server/embedded/bin/ruby -v'
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux]

root@infra01:~# knife -v
Chef: 11.2.0

root@infra01:~# knife client list -VV
DEBUG: Signing the request as controller
DEBUG: Sending HTTP Request via GET to 169.254.123.2:443/clients
DEBUG: ---- HTTP Status and Header Data: ----
DEBUG: HTTP 1.1 200 OK
DEBUG: server: nginx/1.2.3
DEBUG: date: Mon, 22 Apr 2013 21:51:02 GMT
DEBUG: content-type: application/json
DEBUG: transfer-encoding: chunked
DEBUG: connection: close
DEBUG: x-ops-api-info: flavor=osc;version=11.0.2;erchef=1.2.5
DEBUG: content-encoding: gzip
DEBUG: ---- End HTTP Status/Header Data ----

@mancdaz

This comment has been minimized.

Show comment
Hide comment
@mancdaz

mancdaz Apr 23, 2013

Member

@JCallicoat Are you sure that you're using chef server 11? This is a known problem only with chef server 10 since the runit cookbook is using ruby 1.9 syntax, which ruby 1.8.7 doesn't like.

Either way, the runit cookbook was actually fixed to remove this syntax (https://github.com/opscode-cookbooks/runit/pull/28/files) and we have updated the submodule pointer to point to this commit in the latest version of the cookbooks. So, in the product, this has been fixed, though not necessarily packaged yet (nor yet pushed into the master branch of the chef-cookbooks repo). For the versions of the cookbooks you're using, you'll be able to get around this by manually updating to the latest version of the runit cookbook:

cd cookbooks/runit
git checkout master
git pull
knife cookbook upload runit

As I said, this will fix the issue, which is only an issue if you're using chef server 10

Member

mancdaz commented Apr 23, 2013

@JCallicoat Are you sure that you're using chef server 11? This is a known problem only with chef server 10 since the runit cookbook is using ruby 1.9 syntax, which ruby 1.8.7 doesn't like.

Either way, the runit cookbook was actually fixed to remove this syntax (https://github.com/opscode-cookbooks/runit/pull/28/files) and we have updated the submodule pointer to point to this commit in the latest version of the cookbooks. So, in the product, this has been fixed, though not necessarily packaged yet (nor yet pushed into the master branch of the chef-cookbooks repo). For the versions of the cookbooks you're using, you'll be able to get around this by manually updating to the latest version of the runit cookbook:

cd cookbooks/runit
git checkout master
git pull
knife cookbook upload runit

As I said, this will fix the issue, which is only an issue if you're using chef server 10

@mancdaz mancdaz reopened this Apr 23, 2013

@JCallicoat

This comment has been minimized.

Show comment
Hide comment
@JCallicoat

JCallicoat Apr 23, 2013

I totally understand that the ruby bundled with the chef version I'm using should handle the syntax; that's why I listed the bundled ruby version and made sure there were no other rubys in my path. I understand the runit cookbook is maintained upstream, and merging the ruby 1.8.7 patchset is good (though I swear I'm on erchef 11 / ruby 1.9.3 :P). I commented on this bug because I ran into this even though it seems like I shouldn't have. Will try to reproduce and include details.

JCallicoat commented Apr 23, 2013

I totally understand that the ruby bundled with the chef version I'm using should handle the syntax; that's why I listed the bundled ruby version and made sure there were no other rubys in my path. I understand the runit cookbook is maintained upstream, and merging the ruby 1.8.7 patchset is good (though I swear I'm on erchef 11 / ruby 1.9.3 :P). I commented on this bug because I ran into this even though it seems like I shouldn't have. Will try to reproduce and include details.

@JCallicoat

This comment has been minimized.

Show comment
Hide comment
@JCallicoat

JCallicoat Apr 25, 2013

I was able to reproduce with ruby 1.8.7 installed on the node running the knife cookbook upload command. Chef apparently uses local ruby to do the syntax check prior to uploading. Upgrading to ruby 1.9.1 on the client fixed the issue.

JCallicoat commented Apr 25, 2013

I was able to reproduce with ruby 1.8.7 installed on the node running the knife cookbook upload command. Chef apparently uses local ruby to do the syntax check prior to uploading. Upgrading to ruby 1.9.1 on the client fixed the issue.

@claco

This comment has been minimized.

Show comment
Hide comment
@claco

claco Apr 25, 2013

Contributor

That seems... broken.

Contributor

claco commented Apr 25, 2013

That seems... broken.

@mancdaz

This comment has been minimized.

Show comment
Hide comment
@mancdaz

mancdaz Apr 26, 2013

Member

kind of. maybe. maybe not. But that's knife, not us.

Member

mancdaz commented Apr 26, 2013

kind of. maybe. maybe not. But that's knife, not us.

@mancdaz mancdaz closed this Apr 26, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment