Persist scheduler/observer logs to /var/log/aurora/[FILE].log
`journalctl -u aurora-[executor|scheduler]` still works.
Reviewed at https://reviews.apache.org/r/65896/
diff --git a/docs/getting-started/vagrant.md b/docs/getting-started/vagrant.md
index 73d0aff..318833c 100644
--- a/docs/getting-started/vagrant.md
+++ b/docs/getting-started/vagrant.md
@@ -148,7 +148,7 @@
If that still doesn't solve your problem, make sure to inspect the log files:
-* Scheduler: `sudo journalctl -u aurora-scheduler`
-* Observer: `sudo journalctl -u aurora-executor`
+* Scheduler: `/var/log/aurora/scheduler.log` or `sudo journalctl -u aurora-scheduler`
+* Observer: `/var/log/thermos/observer.log` or `sudo journalctl -u thermos-observer`
* Mesos Master: `/var/log/mesos/mesos-master.INFO` (also see `.WARNING` and `.ERROR`)
* Mesos Agent: `/var/log/mesos/mesos-slave.INFO` (also see `.WARNING` and `.ERROR`)
diff --git a/examples/vagrant/aurorabuild.sh b/examples/vagrant/aurorabuild.sh
index 5eb1822..c39388f 100755
--- a/examples/vagrant/aurorabuild.sh
+++ b/examples/vagrant/aurorabuild.sh
@@ -71,7 +71,7 @@
./pants binary src/main/python/apache/aurora/tools:thermos_observer
./pants binary src/main/python/apache/aurora/tools:thermos
sudo ln -sf $DIST_DIR/thermos.pex /usr/local/bin/thermos
- sudo systemctl restart aurora-executor
+ sudo systemctl restart thermos
}
function build_all {
diff --git a/examples/vagrant/provision-dev-cluster.sh b/examples/vagrant/provision-dev-cluster.sh
index 4a02390..fe3281f 100755
--- a/examples/vagrant/provision-dev-cluster.sh
+++ b/examples/vagrant/provision-dev-cluster.sh
@@ -42,6 +42,18 @@
EOF
}
+function install_rsyslog_config {
+ cat >> /etc/rsyslog.d/10-aurora.conf <<EOF
+# Send scheduler logs to /var/log/aurora/scheduler.log
+:syslogtag, contains, "aurora-scheduler" /var/log/aurora/scheduler.log
+
+# Send observer logs to /var/log/thermos/observer.log
+:syslogtag, contains, "thermos-observer" /var/log/thermos/observer.log
+
+EOF
+ systemctl restart rsyslog
+}
+
function configure_netrc {
cat > /home/vagrant/.netrc <<EOF
machine $(hostname -f)
@@ -94,6 +106,7 @@
prepare_extras
install_cluster_config
install_ssh_config
+install_rsyslog_config
start_services
configure_netrc
docker_setup
diff --git a/examples/vagrant/systemd/aurora-scheduler-kerberos.service b/examples/vagrant/systemd/aurora-scheduler-kerberos.service
index 1c2cfc4..10e4f2c 100644
--- a/examples/vagrant/systemd/aurora-scheduler-kerberos.service
+++ b/examples/vagrant/systemd/aurora-scheduler-kerberos.service
@@ -21,9 +21,11 @@
Environment="LIBPROCESS_PORT=8083"
Environment="LIBPROCESS_IP=192.168.33.7"
Environment="MESOS_NATIVE_JAVA_LIBRARY=/usr/lib/libmesos.so"
-
Environment="DIST_DIR=/home/vagrant/aurora/dist"
+# Identifier for rsyslog redirect (see `install_rsyslog_config` in `provision-dev-cluster.sh`).
+SyslogIdentifier=aurora-scheduler
+
# Flags that control the behavior of the JVM.
Environment="JAVA_OPTS='-Djava.library.path=/usr/lib \
-Xdebug \
diff --git a/examples/vagrant/systemd/aurora-scheduler.service b/examples/vagrant/systemd/aurora-scheduler.service
index 524cbb3..57e4bba 100644
--- a/examples/vagrant/systemd/aurora-scheduler.service
+++ b/examples/vagrant/systemd/aurora-scheduler.service
@@ -21,9 +21,11 @@
Environment="LIBPROCESS_PORT=8083"
Environment="LIBPROCESS_IP=192.168.33.7"
Environment="MESOS_NATIVE_JAVA_LIBRARY=/usr/lib/libmesos.so"
-
Environment="DIST_DIR=/home/vagrant/aurora/dist"
+# Identifier for rsyslog redirect (see `install_rsyslog_config` in `provision-dev-cluster.sh`).
+SyslogIdentifier=aurora-scheduler
+
# Flags that control the behavior of the JVM.
Environment="JAVA_OPTS='-Djava.library.path=/usr/lib \
-Xdebug \
diff --git a/examples/vagrant/systemd/aurora-executor.service b/examples/vagrant/systemd/thermos.service
similarity index 87%
rename from examples/vagrant/systemd/aurora-executor.service
rename to examples/vagrant/systemd/thermos.service
index 5a1a908..01925bc 100644
--- a/examples/vagrant/systemd/aurora-executor.service
+++ b/examples/vagrant/systemd/thermos.service
@@ -16,6 +16,9 @@
Wants=network.target
[Service]
+# Identifier for rsyslog redirect (see `install_rsyslog_config` in `provision-dev-cluster.sh`).
+SyslogIdentifier=thermos-observer
+
ExecStart=/home/vagrant/aurora/dist/thermos_observer.pex \
--ip=192.168.33.7 \
--port=1338 \