Load logfile.conf first to help debugging
Conf files in $COLLECTD_CONF_DIR are loaded in alphabetical order. If there is an error loading the python plugin, the logfile plugin is not loaded. To help debugging, the logfile should be loaded first. Changing logfile.conf to 01-logfile.conf should fix this issue by making collectd load the logfile.conf first Closes-Bug: #1657859 Change-Id: I1f748d61d6d9a291bcc32476ac17bb0d60fdc573
This commit is contained in:
parent
7231032cba
commit
5bfb438f1c
@ -62,10 +62,10 @@ function adapt_collectd_conf {
|
||||
touch $COLLECTD_LOG_FILE
|
||||
fi
|
||||
|
||||
sudo cp $COLLECTD_CEILOMETER_DIR/etc/collectd.conf.d/logfile.conf $COLLECTD_CONF_DIR/
|
||||
sudo cp $COLLECTD_CEILOMETER_DIR/etc/collectd.conf.d/logfile.conf $COLLECTD_CONF_DIR/01-logfile.conf
|
||||
|
||||
sudo sed -i 's|LogLevel.*$|LogLevel "'$COLLECTD_LOG_LEVEL'"|g' $COLLECTD_CONF_DIR/logfile.conf
|
||||
sudo sed -i 's|File.*$|File "'$COLLECTD_LOG_FILE'"|g' $COLLECTD_CONF_DIR/logfile.conf
|
||||
sudo sed -i 's|LogLevel.*$|LogLevel "'$COLLECTD_LOG_LEVEL'"|g' $COLLECTD_CONF_DIR/01-logfile.conf
|
||||
sudo sed -i 's|File.*$|File "'$COLLECTD_LOG_FILE'"|g' $COLLECTD_CONF_DIR/01-logfile.conf
|
||||
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ function restore_collectd_conf {
|
||||
|
||||
if [ -f '$COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf' ]; then
|
||||
sudo rm -f $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
|
||||
sudo rm -f $COLLECTD_CONF_DIR/logfile.conf
|
||||
sudo rm -f $COLLECTD_CONF_DIR/01-logfile.conf
|
||||
fi
|
||||
|
||||
}
|
||||
|
6
releasenotes/notes/bug-1657859-9c4b0cd0c149a414.yaml
Normal file
6
releasenotes/notes/bug-1657859-9c4b0cd0c149a414.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes 'bug 1657859 https://bugs.launchpad.net/collectd-ceilometer-plugin/+bug/1657859'.
|
||||
Changed logfile.conf to 01-logfile.conf so it loads before the python
|
||||
plugins, so debugging is easier.
|
Loading…
x
Reference in New Issue
Block a user