Statistics
| Branch: | Revision:

root / shared-filer / attach.wrap @ master

History | View | Annotate | Download (708 Bytes)

1 bd924ffd Dimitris Aragiorgis
#!/bin/bash
2 bd924ffd Dimitris Aragiorgis
3 bd924ffd Dimitris Aragiorgis
# This file can be used to log all error output of the attach script,
4 bd924ffd Dimitris Aragiorgis
# which is currently not being logged under /var/log/ganeti/extstorage/
5 bd924ffd Dimitris Aragiorgis
# due to the way Ganeti handles stdout and logfiles (RunResult).
6 bd924ffd Dimitris Aragiorgis
# All other scripts (create, detach, remove) are logged under that dir.
7 bd924ffd Dimitris Aragiorgis
#
8 bd924ffd Dimitris Aragiorgis
# To do so, do the following:
9 bd924ffd Dimitris Aragiorgis
# 
10 bd924ffd Dimitris Aragiorgis
#  * rename the `attach' script to `attach.py'
11 bd924ffd Dimitris Aragiorgis
#  * rename the `attach.wrap' script to `attach'
12 bd924ffd Dimitris Aragiorgis
#  * set LOGFILE to point to a logfile of your choise
13 bd924ffd Dimitris Aragiorgis
#    (by default this logs under the same dir as all other scripts)
14 bd924ffd Dimitris Aragiorgis
15 bd924ffd Dimitris Aragiorgis
ATTACH_SCRIPT=/usr/share/ganeti/extstorage/shared-filer/attach.py
16 bd924ffd Dimitris Aragiorgis
LOGFILE=/tmp/attach-shared-filer-$(date +%Y%M%d%H:%m:%S.%N)
17 bd924ffd Dimitris Aragiorgis
18 bd924ffd Dimitris Aragiorgis
exec "$ATTACH_SCRIPT" 2>"$LOGFILE"