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

Periodical backend availability check #3

Open
mohierf opened this issue Nov 17, 2015 · 3 comments
Open

Periodical backend availability check #3

mohierf opened this issue Nov 17, 2015 · 3 comments

Comments

@mohierf
Copy link
Contributor

mohierf commented Nov 17, 2015

When the backend is not available, this exception on start should be catched and the module should wait for backend availability:

[1447741566] ERROR: [broker-master] The module alignakbackendbrok raised an exception Backend error code 1000: Backend exception: <class 'requests.exceptions.ConnectionError'> / ('Connection aborted.', error(111, 'Connection refused')), I remove it! traceback=Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/alignak/modulesmanager.py", line 211, in get_instances
    inst = module.get_instance(mod_conf)
  File "/usr/local/lib/python2.7/dist-packages/alignak_module_backend/broker/module.py", line 51, in get_instance
    instance = AlignakBackendBrok(mod_conf)
  File "/usr/local/lib/python2.7/dist-packages/alignak_module_backend/broker/module.py", line 66, in __init__
    getattr(modconf, 'allowgeneratetoken', False))
  File "/usr/local/lib/python2.7/dist-packages/alignak_module_backend/broker/module.py", line 93, in getToken
    self.backend.login(username, password, generate)
  File "/usr/local/lib/python2.7/dist-packages/alignak_backend_client/client.py", line 138, in login
    raise BackendException(1000, "Backend exception: %s / %s" % (type(e), str(e)))
BackendException: Backend error code 1000: Backend exception: <class 'requests.exceptions.ConnectionError'> / ('Connection aborted.', error(111, 'Connection refused')
@mohierf
Copy link
Contributor Author

mohierf commented Sep 12, 2016

Exception is catched but a periodical check to test backend availability is not yet implemented nor tested. Change issue name to reflect this

@mohierf mohierf changed the title Exception when backend is not available Periodical backend availability check Sep 12, 2016
@mohierf mohierf added this to the Version 0.6 milestone Oct 20, 2016
@mohierf mohierf modified the milestones: Version 2.0, Version 1.0 Jan 2, 2017
@mohierf
Copy link
Contributor Author

mohierf commented Jan 2, 2017

Fixed, but currently the missed broks are lost ... we should implement a local cache

@mohierf
Copy link
Contributor Author

mohierf commented Apr 7, 2017

A periodical backend check is implemented in the logs and ws modules ... amy be we should backport this feature in the backend modules ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant