Bug #6405
closedServer roles overwritten regularly for unknown reason
Description
Hi,
In a multiserver setup, the server roles are overwritten with data loss at some regular (?) interval.
Here's an excerpt of the script I use to init the rudderweb instance, based on the one from rudder-tools git repo:
## Inform Rudder about the various roles so installation can proceed successfully mkdir -p /var/rudder/cfengine-community/inputs cat >/var/rudder/cfengine-community/inputs/rudder-server-roles.conf <<EOF rudder-ldap:rudderldap01 rudder-inventory-endpoint:rudderldap01 rudder-db:rudderdb rudder-front:rudderrelaytop01 rudder-relay-top:rudderrelaytop01 rudder-webapp:rudderweb rudder-web:rudderweb EOF ## Install components yum install -y rudder-agent rudder-webapp rudder-techniques rsyslog rsyslog-pgsql httpd httpd-tools ## Give more RAM to jetty #<snip> ## Init DB (/opt/rudder/etc/postgresql/reportsSchema.sql from rudder-reports-3.0.2.release-1.EL.6.noarch) #<snip, this performs the init our rds instance, set the proper psql password in the conf, etc> ## Initialize the server: hostname, demodata?, ldapreset?, initialpromisesreset?, allowednet sed -i '/^Pause$/d' /opt/rudder/bin/rudder-init # ensure that it won't hang waiting for user input /opt/rudder/bin/rudder-init yes <our networks>
After that, rudder seems to work fine for some time, at least the UI. But at some point we can't get any report.
Indeed, because /etc/rsyslog.d/rudder.conf contains:
:ompgsql:localhost,rudder,rudder,password;RudderReportsFormat
localhost instead of rudderdb!
rudder.jdbc.* keys in /opt/rudder/etc/rudder-web-properties have the proper values.
Now, if I look at /var/rudder/cfengine-community/inputs/rudder-server-roles.conf, it has been overwritten by something:
# This file contains, for each role, the list of nodes that have this role # These roles are auto-detected by default, based on inventories of nodes that have role files in /opt/rudder/etc/server-roles.d/ # Format is the following # role:hostname1,hostname2,hostname3 rudder-ldap:rudderldap01 rudder-inventory-endpoint:rudderldap01 rudder-relay-top:rudderrelaytop01
rudderdb is gone!
If I put it back and run cf-agent, then the rsyslog config is ok.
However, it's somehow overwritten again at some point, because I restored the proper value yesterday evening, and this morning it's broken again.
Thanks.