Skip to content

Fix bootstrapping from git on Debian 8 by installing latest tornado via pip - #828

Merged
s0undt3ch merged 8 commits into
saltstack:developfrom
vutny:fix-debian8-git-tornado
May 24, 2016
Merged

s0undt3ch merged 8 commits into
saltstack:developfrom
vutny:fix-debian8-git-tornado

Conversation

@vutny

@vutny vutny commented Apr 24, 2016

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes git installation type on Debian Jessie. Also puts corrected systemd service units in the right place.

What issues does this PR fix or reference?

#820

Previous Behavior

Salt services unable to start because of old version of python-tornado distribution package.

New Behavior

Support installing latest tornado module by enabling pip based installation (-P).

Comment thread bootstrap-salt.sh Outdated

if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then
__check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud"
__check_pip_allowed "You need to allow pip based installations (-P) in order to install requested 'apache-libcloud"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to close single quotes

@vutny

vutny commented Apr 25, 2016

Copy link
Copy Markdown
Contributor Author

@s0undt3ch You've got a sharp eye! :-) Fixed.

@vutny

vutny commented Apr 27, 2016

Copy link
Copy Markdown
Contributor Author

@s0undt3ch I've also added a check for Debian specific initscripts and SystemD units present in the checkouted Git working directory. When PR saltstack/salt#32857 will be merged, these changes should eliminate the need to download the files from external sources or copy-and-edit RPM specific ones. Of course, old behavior is preserved as a fallback.

@vutny

vutny commented Apr 29, 2016

Copy link
Copy Markdown
Contributor Author

@s0undt3ch Bump

@siccrusher

Copy link
Copy Markdown

Tested this PR in a fresh env, worked fine. +1

@vutny

vutny commented May 17, 2016

Copy link
Copy Markdown
Contributor Author

@siccrusher Thanks for testing! I've also added ability to get python-tornado package from backports repo for Jessie in case if pip-based installation is not allowed.

Ping @jfindlay

@rallytime

Copy link
Copy Markdown
Contributor

This looks good to me, but I think a review from @s0undt3ch would still be good here.

@s0undt3ch

Copy link
Copy Markdown
Contributor

Go Go Jenkins!

Comment thread bootstrap-salt.sh
# shellcheck disable=SC2086,SC2046,SC2144
if [ -f /etc/rc$(runlevel | awk '{ print $2 }').d/S*${servicename} ]; then
# Check if the service is going to be started at any runlevel, fixes bootstrap in container (Docker, LXC)
if ls /etc/rc?.d/S*"${servicename}" >/dev/null 2>&1; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I can't rely on the current Jenkins setup, did you passed these changes by shellcheck locally?
I assume they passed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@s0undt3ch Of course!

$ git status
On branch fix-debian8-git-tornado
Your branch is up-to-date with 'origin/fix-debian8-git-tornado'.
nothing to commit, working directory clean
$ shellcheck -V
ShellCheck - shell script analysis tool
version: 0.4.3
license: GNU General Public License, version 3
website: http://www.shellcheck.net
$ shellcheck bootstrap-salt.sh 
$

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@s0undt3ch
s0undt3ch merged commit 76e9f02 into saltstack:develop May 24, 2016
@vutny
vutny deleted the fix-debian8-git-tornado branch May 26, 2016 07:55
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

Successfully merging this pull request may close these issues.

4 participants