Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of linked daemons is increasing on each received configuration #768

Closed
mohierf opened this issue Mar 28, 2017 · 5 comments
Closed

List of linked daemons is increasing on each received configuration #768

mohierf opened this issue Mar 28, 2017 · 5 comments
Labels
Milestone

Comments

@mohierf
Copy link
Contributor

mohierf commented Mar 28, 2017

On the Alignak demo server:

[2017-03-28 12:18:28 CEST] WARNING: [alignak.daemons.brokerdaemon] Connection problem to the receiver receiver-master: Request error to http://127.0.0.1:7773/get_running_id: HTTPConnectionPool(host='127.0.0.1', port=7773): Read timed out. (read timeout=3)

==> /usr/local/var/log/alignak/brokerd-south.log <==
[2017-03-28 12:18:35 CEST] INFO: [alignak.stats] Sending broker/broker-south daemon statistics to: 10.0.0.10:8125, prefix: alignak-demo
[2017-03-28 12:18:35 CEST] INFO: [alignak.stats] Trying to contact StatsD server...
[2017-03-28 12:18:35 CEST] INFO: [alignak.stats] StatsD server contacted
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] [broker-south] Sending us a configuration
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] [broker-south] schedulers: {u'74047bf1b9e44c699720c4ceb32f5e30': {u'data_timeout': 120, u'name': u'scheduler-south', u'hard_ssl_name_check': False, u'instance_id': u'e1f7300a4d3a43b9bfb813a4ea599125', u'hosts': [u'charnay', u'm2m-asso.fr'], u'timeout': 3, u'address': u'127.0.0.1', u'active': True, u'use_ssl': False, u'push_flavor': 537834, u'port': 27768}}
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] [broker-south] We already got the conf ebe811b1b4114310b01a1874dbecf7bc (broker-south)
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] We have our schedulers:
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - scheduler-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] [broker-south] arbiters: {}
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] We have our arbiters:
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] [broker-south] pollers: {u'4da9d25be4924e46bc7a4bfda30b7905': {u'passive': False, u'name': u'poller-south', u'poller_tags': [u'None'], u'hard_ssl_name_check': False, u'instance_id': u'4da9d25be4924e46bc7a4bfda30b7905', u'reactionner_tags': [], u'address': u'127.0.0.1', u'active': True, u'use_ssl': False, u'port': 27771}}
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] We have our pollers:
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] [broker-south] reactionners: {}
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] We have our reactionners:
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] [broker-south] receivers: {u'f04f58ae5e95435689835a95e83da533': {u'passive': False, u'name': u'receiver-master', u'poller_tags': [], u'hard_ssl_name_check': False, u'instance_id': u'f04f58ae5e95435689835a95e83da533', u'reactionner_tags': [], u'address': u'127.0.0.1', u'active': True, u'use_ssl': False, u'port': 7773}}
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] We have our receivers:
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon]  - receiver-master
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] Connection OK to the scheduler scheduler-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] Connection OK to the poller poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] Connection OK to the poller poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] Connection OK to the poller poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] Connection OK to the poller poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] Connection OK to the poller poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] Connection OK to the poller poller-south
[2017-03-28 12:18:35 CEST] INFO: [alignak.daemons.brokerdaemon] Connection OK to the poller poller-south

Note the number of receivers and pollers that this daemon is linked with!

Whereas in the process list:

root 62702  0.0  0.3 212196  53012 12  Ss+J  9:51AM 0:53.06 python: alignak-poller poller-north (python2.7)
root 62760  0.0  0.3 194700  46356 12  S+J   9:51AM 0:03.61 python: alignak-poller (python2.7)
root 62867  0.0  0.3 211624  47508 12  S+J   9:51AM 0:00.51 python: alignak-poller-north worker (python2.7)
root 62874  0.0  0.3 211636  47532 12  S+J   9:51AM 0:00.52 python: alignak-poller-north worker (python2.7)
root 62878  0.0  0.3 211648  47564 12  S+J   9:51AM 0:00.51 python: alignak-poller-north worker (python2.7)
root 62886  0.0  0.3 211660  47656 12  S+J   9:51AM 0:00.51 python: alignak-poller-north worker (python2.7)
root 62736  0.0  0.3 211940  53024 16  Ss+J  9:51AM 0:35.78 python: alignak-poller poller-south (python2.7)
root 62762  0.0  0.3 194700  46952 16  S+J   9:51AM 0:03.71 python: alignak-poller (python2.7)
root 62869  0.0  0.3 211624  47700 16  S+J   9:51AM 0:00.63 python: alignak-poller-south worker (python2.7)
root 62875  0.0  0.3 211636  47756 16  S+J   9:51AM 0:00.63 python: alignak-poller-south worker (python2.7)
root 62879  0.0  0.3 211648  47748 16  S+J   9:51AM 0:00.64 python: alignak-poller-south worker (python2.7)
root 62887  0.0  0.3 211660  47860 16  S+J   9:51AM 0:00.63 python: alignak-poller-south worker (python2.7)
root 62773  0.0  0.3 216036  53244 19  Ss+J  9:51AM 0:36.81 python: alignak-poller poller-south-east (python2.7)
root 62792  0.0  0.3 194700  47104 19  S+J   9:51AM 0:04.13 python: alignak-poller (python2.7)
root 62864  0.0  0.3 211624  47564 19  S+J   9:51AM 0:00.94 python: alignak-poller-south-east worker (python2.7)
root 62870  0.0  0.3 211636  47596 19  S+J   9:51AM 0:00.93 python: alignak-poller-south-east worker (python2.7)
root 62876  0.0  0.3 211648  47624 19  S+J   9:51AM 0:00.97 python: alignak-poller-south-east worker (python2.7)
root 62885  0.0  0.3 211664  47952 19  S+J   9:51AM 0:00.97 python: alignak-poller-south-east worker (python2.7)
root 62801  0.0  0.3 211940  53896 23  Is+J  9:51AM 0:31.89 python: alignak-poller poller-master (python2.7)
root 62834  0.0  0.3 194956  48476 23  S+J   9:51AM 0:06.48 python: alignak-poller (python2.7)
root 62871  0.0  0.3 211620  47860 23  S+J   9:51AM 0:04.03 python: alignak-poller-master worker (python2.7)
root 62877  0.0  0.3 211632  48048 23  S+J   9:51AM 0:04.08 python: alignak-poller-master worker (python2.7)
root 62880  0.0  0.3 211644  47964 23  S+J   9:51AM 0:04.07 python: alignak-poller-master worker (python2.7)
root 62888  0.0  0.3 211656  48196 23  S+J   9:51AM 0:04.08 python: alignak-poller-master worker (python2.7)
@mohierf mohierf added the bug label Mar 28, 2017
@mohierf
Copy link
Contributor Author

mohierf commented Mar 28, 2017

Perharps related with #673 ?
And almost surely related with #767 ...

@mohierf
Copy link
Contributor Author

mohierf commented Mar 28, 2017

The list of daemons received in the configuration is a dictionary indexed with an identifier that is modifed each time the configuration is reloaded ! This is why each daemon has an increasing satellites list ... @ddurieux last dispatcher modifications are the main cause of this problem!

@ddurieux
Copy link
Contributor

I planned to rewrite it for v2, perhaps I can try fix it...

@ddurieux
Copy link
Contributor

ddurieux commented Apr 4, 2017

I think it's because not reinitialize the self.pollers ... in function setup_new_conf of the satellites

@ddurieux ddurieux added this to the 1.0 milestone Apr 4, 2017
@mohierf
Copy link
Contributor Author

mohierf commented Apr 4, 2017

Have a look to the clean_previous_run function that is intended to be called by each daemon when it receives a new configuration ... this function should clear all the stuff!

@mohierf mohierf closed this as completed in a9fe9b4 Apr 5, 2017
mohierf added a commit that referenced this issue Apr 5, 2017
Fix clean satellites when receive new conf and use it. closes #768
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants