cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"Group already exists" thrown by TopologyBuilder.create_group in V.159

satit_auputtin1
Participant


Hi,

I have created ActiveGate plugin to perform SSH and execute command to gather metrics from remote server.

The plugin run smoothly until it cannot connect to remote server for some reason.

After that, the plugin will not work anymore with the error "Group <device group name> already exists"

Looking into TopologyBuilder.create_group, I notice the different between RemotePluginModule V.157 and V.159.

The create_group in V.159 will throw Error and there is no getting back from it.

Log file here => ruxitagent-remotepluginagent-89440.log

V.157

===================

if group_id in self._groups:

return self._groups[group_id]

else:

group = Group(group_id, group_name, self._technology, self._results_builder)

V.159

===================

if group_id in self._groups:

raise ValueError("Group " + group_name + " already exist, id: " + str(group_id))

else:

group = Group(group_id, group_name, self._technology, self._results_builder)

Regards,

Satit


2 REPLIES 2

satit_auputtin1
Participant

Restart RemotePluginModule put the plugin back to function. But it should have a better way than this.


satit_auputtin1
Participant

Found it. Just make sure to catch all exceptions in the query method.