Skip to content

Instantly share code, notes, and snippets.

@xypnox
Created March 4, 2019 10:21
Show Gist options
  • Save xypnox/44a85d6b79812b6d23a95c0f28d12010 to your computer and use it in GitHub Desktop.
Save xypnox/44a85d6b79812b6d23a95c0f28d12010 to your computer and use it in GitHub Desktop.
Vagrant error log
Collecting PyYAML
Downloading https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz (270kB)
Building wheels for collected packages: PyYAML
Building wheel for PyYAML (setup.py): started
Building wheel for PyYAML (setup.py): finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/ad/da/0c/74eb680767247273e2cf2723482cb9c924fe70af57c334513f
Successfully built PyYAML
Installing collected packages: PyYAML
Found existing installation: PyYAML 3.12
Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
psql is /usr/bin/psql
userdel: user untrusted00 is currently used by process 17550
Site submitty already disabled
# this script must be run by root or sudo
if [[ "$UID" -ne "0" ]] ; then
echo "ERROR: This script must be run by root or sudo"
exit 1
fi
#################################################################
# CONSTANTS
#################
# PATHS
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SUBMITTY_REPOSITORY=/usr/local/submitty/GIT_CHECKOUT/Submitty
SUBMITTY_INSTALL_DIR=/usr/local/submitty
SUBMITTY_DATA_DIR=/var/local/submitty
# USERS / GROUPS
DAEMON_USER=submitty_daemon
DAEMON_GROUP=submitty_daemon
PHP_USER=submitty_php
PHP_GROUP=submitty_php
CGI_USER=submitty_cgi
CGI_GROUP=submitty_cgi
DAEMONPHP_GROUP=submitty_daemonphp
DAEMONCGI_GROUP=submitty_daemoncgi
# VERSIONS
source ${CURRENT_DIR}/bin/versions.sh
########################################################################
# These variables specify the version of these dependencies that we
# want. This affects both checking out the repo as well as installation
# of built artificats.
# SUBMITTY REPOS
export AnalysisTools_Version=v.18.06.00
export Lichen_Version=v.18.12.00
export RainbowGrades_Version=v.18.07.00
export Tutorial_Version=v.19.02.00
export Pdf_Annotate_Js_Version=v.18.10.00
# JAVA
export JUNIT_VERSION=4.12
export HAMCREST_VERSION=1.3
export EMMA_VERSION=2.0.5312
export JACOCO_VERSION=0.8.0
# DR. MEMORY
export DRMEMORY_TAG=release_2.0.1
export DRMEMORY_VERSION=2.0.1-2
#################################################################
# PROVISION SETUP
#################
export VAGRANT=0
export NO_SUBMISSIONS=0
export WORKER=0
# Read through the flags passed to the script reading them in and setting
# appropriate bash variables, breaking out of this once we hit something we
# don't recognize as a flag
while :; do
case $1 in
--vagrant)
export VAGRANT=1
;;
--worker)
export WORKER=1
;;
--no_submissions)
export NO_SUBMISSIONS=1
echo 'no_submissions'
;;
*) # No more options, so break out of the loop.
break
esac
shift
done
if [ ${VAGRANT} == 1 ]; then
echo "Non-interactive vagrant script..."
export DEBIAN_FRONTEND=noninteractive
# Setting it up to allow SSH as root by default
mkdir -p -m 700 /root/.ssh
cp /home/vagrant/.ssh/authorized_keys /root/.ssh
sed -i -e "s/PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
# Set up some convinence stuff for the root user on ssh
echo -e "
# Convinence stuff for Submitty
export SUBMITTY_REPOSITORY=${SUBMITTY_REPOSITORY}
export SUBMITTY_INSTALL_DIR=${SUBMITTY_INSTALL_DIR}
export SUBMITTY_DATA_DIR=${SUBMITTY_DATA_DIR}
alias install_submitty='/usr/local/submitty/.setup/INSTALL_SUBMITTY.sh'
alias install_submitty_site='bash /usr/local/submitty/GIT_CHECKOUT/Submitty/.setup/INSTALL_SUBMITTY_HELPER_SITE.sh'
alias install_submitty_bin='bash /usr/local/submitty/GIT_CHECKOUT/Submitty/.setup/INSTALL_SUBMITTY_HELPER_BIN.sh'
alias submitty_code_watcher='python3 /usr/local/submitty/GIT_CHECKOUT/Submitty/.setup/bin/code_watcher.py'
cd ${SUBMITTY_INSTALL_DIR}" >> /root/.bashrc
else
#TODO: We should get options for ./.setup/CONFIGURE_SUBMITTY.py script
:
fi
Non-interactive vagrant script...
if [ ${WORKER} == 1 ]; then
echo "Installing Submitty in worker mode."
else
echo "Installing primary Submitty."
fi
Installing primary Submitty.
COURSE_BUILDERS_GROUP=submitty_course_builders
DB_USER=submitty_dbuser
DATABASE_PASSWORD=submitty_dbuser
#################################################################
# DISTRO SETUP
#################
source ${CURRENT_DIR}/distro_setup/setup_distro.sh
#!/usr/bin/env bash
# this script must be run by root or sudo
if [[ "$UID" -ne "0" ]] ; then
echo "ERROR: This script must be run by root or sudo"
exit
fi
SOURCE="${BASH_SOURCE[0]}"
CURRENT_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
DISTRO=$(lsb_release -si | tr '[:upper:]' '[:lower:]')
VERSION=$(lsb_release -sc | tr '[:upper:]' '[:lower:]')
if [ ! -d ${CURRENT_DIR}/${DISTRO}/${VERSION} ]; then
(>&2 echo "Unknown distro: ${DISTRO} ${VERSION}")
exit 1
fi
echo "Setting up distro: ${DISTRO} ${VERSION}"
Setting up distro: ubuntu bionic
source ${CURRENT_DIR}/${DISTRO}/${VERSION}/setup_distro.sh
#!/usr/bin/env bash
# this script must be run by root or sudo
if [[ "$UID" -ne "0" ]] ; then
echo "ERROR: This script must be run by root or sudo"
exit
fi
if [ ${VAGRANT} == 1 ]; then
export SUBMISSION_URL='http://192.168.56.111'
fi
#################################################################
# PACKAGE SETUP
#################
apt-get -qqy update
apt-get install -qqy apt-transport-https ca-certificates curl software-properties-common
apt-get install -qqy python python-dev python3 python3-dev libpython3.6
############################
# NTP: Network Time Protocol
# You want to be sure the clock stays in sync, especially if you have
# deadlines for homework to be submitted.
#
# The default settings are ok, but you can edit /etc/ntp.conf and
# replace the default servers with your local ntp server to reduce
# traffic through your campus uplink (To replace the default servers
# with your own, comment out the default servers by adding a # before
# the lines that begin with “server” and add your server under the
# line that says “Specify one or more NTP servers” with something
# along the lines of “server xxx.xxx.xxx.xxx”)
apt-get install -qqy ntp
service ntp restart
echo "Preparing to install packages. This may take a while."
Preparing to install packages. This may take a while.
apt-get install -qqy libpam-passwdqc
# Set up apache to run with suphp in pre-fork mode since not all
# modules are thread safe (do not combine the commands or you may get
# the worker/threaded mode instead)
apt-get install -qqy ssh sshpass unzip
apt-get install -qqy postgresql-10
apt-get install -qqy apache2 apache2-suexec-custom libapache2-mod-authnz-external libapache2-mod-authz-unixgroup libapache2-mod-wsgi-py3
apt-get install -qqy php php-cli php-fpm php-curl php-pgsql php-zip php-mbstring php-xml
if [ ${VAGRANT} == 1 ]; then
apt-get install -qqy php-xdebug
fi
#Add the scrot screenshotting program
apt-get install -qqy scrot
# Add additional packages for compiling, authentication, and security,
# and program support
# DOCUMENTATION FIXME: Go through this list and categorize purpose of
# these packages (as appropriate.. )
apt-get install -qqy clang autoconf automake autotools-dev diffstat finger gdb git git-man \
p7zip-full patchutils libpq-dev unzip valgrind zip libmagic-ocaml-dev common-lisp-controller \
libboost-all-dev javascript-common libfile-mmagic-perl libgnupg-interface-perl libbsd-resource-perl \
libarchive-zip-perl gcc g++ g++-multilib jq libseccomp-dev libseccomp2 seccomp junit flex bison spim \
poppler-utils
apt-get install -qqy ninja-build
#CMAKE
echo "installing cmake"
installing cmake
apt-get install -qqy cmake
# for Lichen (Plagiarism Detection)
apt-get install -qqy python-clang-6.0
# Install OpenJDK8 Non-Interactively
echo "installing java8"
installing java8
apt-get install -qqy openjdk-8-jdk
update-java-alternatives --set java-1.8.0-openjdk-amd64
update-alternatives: error: no alternatives for jaotc
update-alternatives: error: no alternatives for jdeprscan
update-alternatives: error: no alternatives for jhsdb
update-alternatives: error: no alternatives for jimage
update-alternatives: error: no alternatives for jlink
update-alternatives: error: no alternatives for jmod
update-alternatives: error: no alternatives for jshell
update-alternatives: error: no alternatives for mozilla-javaplugin.so
update-java-alternatives: plugin alternative does not exist: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so
# Install Image Magick for image comparison, etc.
apt-get install -qqy imagemagick
# miscellaneous usability
apt-get install -qqy emacs
# fix networking on vagrants
# https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1768560
# When the vagrant box comes with netplan.io 0.40+ we can remove this
if [ ${VAGRANT} == 1 ]; then
# In case they upgrade before we notice, don't run this fix
NETPLANIO_VERSION=$(apt-cache policy netplan.io | grep 'Installed' | sed -E 's/^.*: (.*)$/\1/')
NPIO_MAJOR=$(echo "$NETPLANIO_VERSION" | cut -d "." -f1)
NPIO_MINOR=$(echo "$NETPLANIO_VERSION" | cut -d "." -f2)
if [ "$NPIO_MAJOR" -eq 0 -a "$NPIO_MINOR" -lt 40 ]; then
# Update netplan.io
echo "Detected old version of netplan.io (${NETPLANIO_VERSION})... updating it automatically"
apt-get install -y netplan.io=0.40.1~18.04.4
fi
fi
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
apt-key fingerprint 0EBFCD88
Warning: apt-key output should not be parsed (stdout is not a terminal)
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <[email protected]>
sub rsa4096 2017-02-22 [S]
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Fetched 252 kB in 1s (213 kB/s)
Reading package lists...
apt-get update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Fetched 252 kB in 1s (217 kB/s)
Reading package lists...
apt-get install -qqy docker-ce
systemctl status docker | head -n 100
● docker.service - Docker Application Container Engine
Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2019-03-04 05:17:57 EST; 48s ago
Docs: https://docs.docker.com
Main PID: 17526 (dockerd)
Tasks: 10
CGroup: /system.slice/docker.service
└─17526 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Mar 04 05:17:57 vagrant dockerd[17526]: time="2019-03-04T05:17:57.402424570-05:00" level=warning msg="Your kernel does not support swap memory limit"
Mar 04 05:17:57 vagrant dockerd[17526]: time="2019-03-04T05:17:57.402460412-05:00" level=warning msg="Your kernel does not support cgroup rt period"
Mar 04 05:17:57 vagrant dockerd[17526]: time="2019-03-04T05:17:57.402468024-05:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Mar 04 05:17:57 vagrant dockerd[17526]: time="2019-03-04T05:17:57.402970281-05:00" level=info msg="Loading containers: start."
Mar 04 05:17:57 vagrant dockerd[17526]: time="2019-03-04T05:17:57.570164781-05:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Mar 04 05:17:57 vagrant dockerd[17526]: time="2019-03-04T05:17:57.681640538-05:00" level=info msg="Loading containers: done."
Mar 04 05:17:57 vagrant dockerd[17526]: time="2019-03-04T05:17:57.977858645-05:00" level=info msg="Docker daemon" commit=774a1f4 graphdriver(s)=overlay2 version=18.09.3
Mar 04 05:17:57 vagrant dockerd[17526]: time="2019-03-04T05:17:57.982040679-05:00" level=info msg="Daemon has completed initialization"
Mar 04 05:17:57 vagrant dockerd[17526]: time="2019-03-04T05:17:57.988525656-05:00" level=info msg="API listen on /var/run/docker.sock"
Mar 04 05:17:57 vagrant systemd[1]: Started Docker Application Container Engine.
apt-get -qqy autoremove
# Install pip after we've installed python within the setup_distro.sh
if [ ! -x "$(command -v pip2)" ] || [ ! -x "$(command -v pip3)" ]; then
wget --tries=5 https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py
fi
if [ ! -x "$(command -v pip2)" ]; then
python2 /tmp/get-pip.py
else
pip2 install -U pip
fi
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages (19.0.3)
if [ ! -x "$(command -v pip3)" ]; then
python3 /tmp/get-pip.py
else
pip3 install -U pip
fi
Requirement already up-to-date: pip in /usr/local/lib/python3.6/dist-packages (19.0.3)
if [ -f /tmp/get-pip.py ]; then
rm -f /tmp/get-pip.py
fi
# Read through our arguments to get "extra" packages to install for our distro
# ${@} are populated by whatever calls install_system.sh which then sources this
# script.
IFS=',' read -ra ADDR <<< "${@}"
if [ ${#ADDR[@]} ]; then
echo "Installing extra packages..."
for i in "${ADDR[@]}"; do
if [ -f ${CURRENT_DIR}/${DISTRO}/${VERSION}/${i}.sh ]; then
echo "Running ${CURRENT_DIR}/${DISTRO}/${VERSION}/${i}.sh"
source ${CURRENT_DIR}/${DISTRO}/${VERSION}/${i}.sh
else
echo "Could not find ${i}.sh for ${DISTRO} ${VERSION}"
fi
done
fi
Installing extra packages...
# check if set, else use default /etc/motd
# we expect that SUBMISSION_URL and GIT_URL to be set above
if [ ${VAGRANT} == 1 ]; then
# Ubuntu/Debian share this stuff, CentOS does not
if [ -d /etc/update-motd.d ]; then
chmod -x /etc/update-motd.d/*
chmod +x /etc/update-motd.d/00-header
fi
if [ -f /usr/share/landscape/landscape-sysinfo.wrapper ]; then
chmod -x /usr/share/landscape/landscape-sysinfo.wrapper
fi
# ${x^^} gives capitalized string
DISTRO_LINE=$(printf "## RUNNING: %-44s ##" "${DISTRO^^} ${VERSION^^}")
# set our cool MOTD here, we expect
echo -e "
_______ __ __ _______ __ __ ___ _______ _______ __ __
| || | | || _ || |_| || | | || || | | |
| _____|| | | || |_| || || | |_ _||_ _|| |_| |
| |_____ | |_| || || || | | | | | | |
|_____ || || _ | | || | | | | | |_ _|
_____| || || |_| || ||_|| || | | | | | | |
|_______||_______||_______||_| |_||___| |___| |___| |___|
############################################################
${DISTRO_LINE}
## ##
## All user accounts have same password unless otherwise ##
## noted below. The following user accounts exist: ##
## vagrant/vagrant, root/vagrant, submitty_dbuser, ##
## submitty_php, submitty_cgi, submitty_daemon, ta, ##
## instructor, developer, postgres ##
## ##
## The following accounts have database accounts ##
## with same password as above: ##
## submitty_dbuser, postgres, root, vagrant ##
## ##
## The VM can be accessed with the following urls: ##
## ${SUBMISSION_URL} (submission) ##
## ${SUBMISSION_URL}/cgi-bin (cgi-bin scripts) ##
## ${SUBMISSION_URL}/git (git) ##
## ##
## The database can be accessed on the host machine at ##
## localhost:15432 ##
## ##
## Happy developing! ##
############################################################
" > /etc/motd
chmod +rx /etc/motd
fi
chmod: /etc/update-motd.d/00-header: new permissions are rw-r--r-x, not rw-r--r--
err_message
#####################################################################
INSTALLATION FAILURE
Something has gone wrong in the installation process. If you feel
that this is in error, please create an issue on our issue tracker at
https://github.com/Submitty/Submitty including an output of the build
log to better help us diagnose what has gone wrong.
#####################################################################
For whatever reason, Vagrant has failed to build. If reporting
an error to the developers, please be sure to also send the
build log of Vagrant located at:
.vagrant/ubuntu/bionic/logs/vagrant.log.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment