Merge pull request #56108 from tpepper/trivial

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

e2e_node: small fixes to setup_host.sh for Ubuntu Trusty

**What this PR does / why we need it**:
Two small fixes for how nsenter is built from source and installed on Ubuntu Trusty:
1. Use mktemp for the creating the build directory instead of a hard coded name
2. Use current (2.31) util-linux instead of 3+ year old version

**Which issue(s) this PR fixes**:

Fixes #56106 

**Special notes for your reviewer**:

See https://github.com/kubernetes/kubernetes/issues/56106 for some thoughts on other ways to address this.  My patch for util-linux 2.31 may just be a band-aid?

**Release note**:
```release-note
NONE
```
pull/6/head
Kubernetes Submit Queue 2017-12-18 16:36:26 -08:00 committed by GitHub
commit 6eb6955371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -57,17 +57,17 @@ cat /etc/*-release | grep "ID=ubuntu"
if [ $? -eq 0 ]; then
if ! which nsenter > /dev/null; then
echo "Do not find nsenter. Install it."
mkdir -p /tmp/nsenter-install
cd /tmp/nsenter-install
curl https://www.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.tar.gz | tar -zxf-
NSENTER_BUILD_DIR=$(mktemp -d /tmp/nsenter-build-XXXXXX)
cd $NSENTER_BUILD_DIR
curl https://www.kernel.org/pub/linux/utils/util-linux/v2.31/util-linux-2.31.tar.gz | tar -zxf-
sudo apt-get update
sudo apt-get --yes install make
sudo apt-get --yes install gcc
cd util-linux-2.24
cd util-linux-2.31
./configure --without-ncurses
make nsenter
sudo cp nsenter /usr/local/bin
rm -rf /tmp/nsenter-install
rm -rf $NSENTER_BUILD_DIR
fi
fi