Skip to content
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

Whyrun mode seems to be very broken #9

Open
zwant opened this issue Feb 12, 2015 · 1 comment
Open

Whyrun mode seems to be very broken #9

zwant opened this issue Feb 12, 2015 · 1 comment

Comments

@zwant
Copy link

zwant commented Feb 12, 2015

Doing a whyrun on a fresh machine with the redis2 cookbook fails in a couple of ways.
First of all, node["redis2"]["version"] is set based on the output of a shell-command

shell_out("#{node["redis2"]["daemon"]} -v").stdout[/(version |v=)([0-9.]+)/,2]

that shell-command can obviously not run in whyrun mode, especially if redis hasn't been installed before. That renders an obscure error in redis.conf.erb:

<% redis_2_4 = (node["redis2"]["version"].split(".").map(&:to_i) <=> [2, 4]) < 0 %>

This will fail on the split in whyrun mode (since the string is nil).

Moreso, I tried manually setting node["redis2"]["version"] directly on the node to see what happens. That just makes it fail in a later stage when initializing the instance in runit_service[redis_master]:

Could not locate main runit sv_bin at "/sbin/sv". Did you remember to install runit before declaring a "runit_service" resource?

That could maybe be a bug in runit not properly supporting whyrun mode.

@nukemberg
Copy link
Member

yes, whyrun is broken, both in redis2 and runit. i'll look into resolving the redis version attribute issue but the runit issue will have to be resolved in the runit cookbook project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants