Description:
We've just cloned an existing db server to a new box.
The agent install is automatic and we see the following error message
2008-11-13 10:50:41: (critical) agent_mysqld.c:524: [mysql] the hostid from mysql.inventory doesn't match our agent's host-id (ssh:{eb:a7:0a:cb:f5:7d:98:5c:6a:cc:6b:57:
2d:1d:0c:c9} != ssh:{98:8c:16:28:e5:ee:f4:fc:a6:54:45:5a:1d:10:b8:be})
We assume that this is a cloned host and shutdown now.
Please TRUNCATE TABLE mysql.inventory on this mysql-instance and restart the agent.
Please make life for the administrators of multiple db servers as simple as possible.
The agent's task is to report data to the merlin2 instance. merlin2's task is to worry about clones but it shouldn't get in the way of recording data which in the end is what it's there for.
How to repeat:
Clone an existing db server monitored by a 2.0 agent to another server.
Install a new agent and start it.
Suggested fix:
I don't like this behaviour of stopping the agent and requiring manual changes on the db server.
I'd prefer the agent to continue logging to merlin (as a separate instance).
I'd like the web ui to indicate that this is a clone and:
- provide the option to treat it as a new instance.
- provide the option of merging the data from this clone into the original instance
- provide the option to be able to indicate to the agent to shutdown (due to misconfiguration)
The best thing is that the data comes in so that nothing is lost (if it is needed)
Also provide an alert/notification to the web ui and by email that an action needs to be taken, or that a new clone has been detected.
Note: in our case we had deliberately copied the db instance to a new server and installed a NEW agent instance. This clone was intentional.
Note2: This only happens if you copy a db instance where the agent2 has created this special table in the mysql database.