Task #7590
closed
How do we plan to handle failures in etcd¶
Failures can be temporarily (leadership change) or permanent (etcd cluster dies)
We use four type of functions of etcd
1. get
2. put
3. get_prefix
4. watch_prefix
get¶
can output the following:
- EtcdEntry
- Exception (KeyError if key not found, and a pleothera of other depending on situations)
TODO: KeyError is recently introduced so would require us to handle it in all stretches of uncloud other errors are also not handled.
TODO: Handle Exception thrown by get.
put¶
can output the following:
- Response from etcd library
- Exception
TODO: See whether the response from etcd library has success/failure indication.
TODO: Handle exception in case something goes wrong.
get_prefix¶
can output/yield the following:
TODO: Handle exception in case something goes wrong.
watch_prefix¶
can output/yield the following:
- EtcdEntry
- an empty iter in case of exception
- Related to Task #7583: Handle etcd leader change or temporary unavailability gracefully in uncloud added
I am little uncertain how to handle failures in etcd. For Example, put every etcd function call in try/except block or do something else.
- Assignee deleted (
Ahmed Bilal)
- Status changed from New to Rejected
Also available in: Atom
PDF