File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
.circleci/packages/influxdb/fs/usr/lib/influxdb/scripts Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -155,11 +155,12 @@ function start() {
155155 WAL_DIR=" $( influxd_config data wal-dir ) "
156156 if [[ ( -d " ${DATA_DIR} " ) && ( -d " ${WAL_DIR} " ) ]]
157157 then
158- # If this daemon is configured to run as root, influx_inspect hangs
159- # waiting for confirmation before executing. Supplying "yes" allows
160- # the service to continue without interruption.
161- yes | /usr/bin/influx_inspect buildtsi -compact-series-file \
162- -datadir " ${DATA_DIR} " \
158+ # buildtsi prompts with a warning if it is run as root as the files it creates will be owned by root which
159+ # influxd won't be able to read. Best to run it as the influxdb user instead. sudo and su are options but
160+ # difficult to use; setpriv is more direct and available in the util-linux package
161+ echo " Building tsi with influxd_inspect buildtsi."
162+ setpriv --reuid influxdb --regid influxdb --clear-groups /usr/bin/influx_inspect buildtsi -compact-series-file \
163+ -datadir " ${DATA_DIR} " \
163164 -waldir " ${WAL_DIR} "
164165 fi
165166
You can’t perform that action at this time.
0 commit comments