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