Closed njam closed 8 years ago
@njam we have basically 2 ways to go:
binary
and log to STDOUTwdyt?
I'm not sure I follow. You mean to implement a function that tests if we have Internet connectivity? If we don't, how would that information be used?
The problem is that setup_plugin
for CopperEgg fails if there's no Internet connection. Either we can skip it and start collecting data nevertheless, or we can retry forever.
/var/lib/gems/2.1.0/gems/bipbip-0.6.22/lib/bipbip/storage/copperegg.rb:67:in `_load_metric_groups'
/var/lib/gems/2.1.0/gems/bipbip-0.6.22/lib/bipbip/storage/copperegg.rb:9:in `setup_plugin'
/var/lib/gems/2.1.0/gems/bipbip-0.6.22/lib/bipbip/agent.rb:29:in `block (2 levels) in run'
I would vote for retrying forever. This will simplify things, because we don't need to think about any invalid state if the setup could not succeed. So how about we retry all operations in Storage::Copperegg
forever, if they failed due to network problems?
Ok, I am not sure if I follow now!
I was not investigating this problem so deep! I was pretty sure by what you and Philipp said, that this issue appears only on system reboot? It means it never happens during normal operations? I guess there might be a problem with internet connection and copperegg is unreachable but it doesn't crash the bipbip then, agree?
So should we implement crash protection deep in e.g. setup_plugin
then?
As discussed:
Storage::Copperegg
: remove fatal logging and exit 1
Agent
: rescue errors from setup_plugin
, log as fatal and retry after some delay@njam wdyt?
@njam please re-review
released
Currently when starting without Internet access the program fails. Instead it should log an error and retry indefinitely.