CloudHealth / agent-install-helpers

6 stars 3 forks source link

Installer hangs forever #5

Open jniedrauer opened 6 years ago

jniedrauer commented 6 years ago

install_cht_perfmon.sh hangs forever in an unbounded while loop.

The failure is at line of 240 of install_cht_perfmon.sh:

if [ $counter -gt $user_defined_frequency ]; then

$user_defined_frequency is null here. Since this occurs in an unbounded while loop, the script never completes.

$user_defined_frequency is defined with the line:

user_defined_frequency=$(grep -A 1 "LoadPlugin cpu" /etc/chtcollectd/collectd.conf | grep Int | awk '{print $2}')

Which does not return anything. This is due to the fact that collectd uses the default interval instead of defining it explicitly.

collectd is installed in this script with a custom RPM that does not respect the preexistence of the configuration file.

/etc/chtcollectd/collectd.conf:

<LoadPlugin cpu>
  Interval

What this means is that I can't even put the file in place with an interval defined before running the script. The installer is unusable in its current form due to collectd.conf not defining an interval for the cpu plugin.

vpillai commented 6 years ago

Jason, Thanks for your diagnosis. Let us take a look at this and we can update this thread.

/v

jniedrauer commented 6 years ago

I am no longer able to reproduce this issue. Was this fixed in the collectd RPM?