Skip to content
This repository was archived by the owner on Mar 19, 2022. It is now read-only.

Fix gem-based bootstrap on Ubuntu 14.04 and up#454

Open
leonid-shevtsov wants to merge 1 commit intomatschaffer:masterfrom
leonid-shevtsov:master
Open

Fix gem-based bootstrap on Ubuntu 14.04 and up#454
leonid-shevtsov wants to merge 1 commit intomatschaffer:masterfrom
leonid-shevtsov:master

Conversation

@leonid-shevtsov
Copy link
Copy Markdown

Fixes #373 - I was setting up another machine and finally took the time to fix the script.

libopenssl-ruby and libopenssl-ruby1.9 are both virtual packages, meaning they don't contain any files, and only instruct apt to install libruby, which is the real package. And, unlike the virtual packages, it has available on both older and newer (>14.04) systems.

I've also added a check that the package installation had succeeded.

@matschaffer
Copy link
Copy Markdown
Owner

What led to the check code? If it's something we really need I'd rather see it consistently across all installation strategies rather than just a feature for the debianoid_gem_install.

Pretty sure we have a helper in the project somewhere that also does this (i.e., runs a command fails the whole knife command if the command fails).

@matschaffer
Copy link
Copy Markdown
Owner

Oh I think I was wrong on the helper. Must have been thinking of something else.

Anyway, I'd like to have any checking code be consistent across more that just one strategy if you think it's worth including. Also

raise "chef-solo failed. See output above." unless result.success?
seems to be a more common pattern than just checking the exit code directly.

@leonid-shevtsov
Copy link
Copy Markdown
Author

Maybe the run_command method should check for success itself (and add a flag to it to ignore errors)? Because after looking at the bootstrapper code, I don't see much cases when a failed command would allow the process to continue.

@matschaffer
Copy link
Copy Markdown
Owner

It will at least need some way to allow failures since I'm pretty sure it's the same function that's used to do things like check for presence of sudo, ver, etc.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

knife solo prepare fails silently on Ubuntu 14.04 gem install

2 participants