rackerlabs / otter

Rackspace Auto Scale
http://www.rackspace.com/cloud/auto-scale/
Other
53 stars 27 forks source link

Nicely formatted convergence messages for logging and Cloud Feeds #1109

Open manishtomar opened 9 years ago

manishtomar commented 9 years ago

Forked from #884. This ticket is to decide the kind of messages that will be logged by convergence. Unfortunately, the discussion has been in different places. My suggestion copied from https://github.com/rackerlabs/otter/issues/838#issuecomment-69071481:

manishtomar commented 9 years ago

Original ask from @cyli:

Should logs be synthesized by the steps provided?

Also, what happens if we want to log a step not taken? For instance, not adding a server to a CLB because that server does not have a ServiceNet address? Possibly we want to produce reporting objects/steps/structures so that they can also be optimized later. For instance, instead of the following messages:

Server 1 not added to CLB 1 because Server 1 does not have ServiceNet configured.
Server 2 not added to CLB 1 because Server 2 does not have ServiceNet configured.
Server 3 not added to CLB 1 because Server 3 does not have ServiceNet configured.
Server 1 not added to CLB 2 because Server 1 does not have ServiceNet configured.
Server 2 not added to CLB 2 because Server 2 does not have ServiceNet configured.
Server 3 not added to CLB 2 because Server 3 does not have ServiceNet configured.

Maybe we just want:

Servers 1, 2, and 3, cannot be added to CLBs 1 and 2 because Servers 1, 2, and 3, do not have ServiceNet configured.

Alternately, just 3 separate messages, 1 for each server. Alternately, 2 separate messages, 1 for each CLB. But that can be up to the optimizer.

manishtomar commented 9 years ago

@radix suggestion: I think whatever we do, we should probably log based on a bag of steps, instead of sprinkling log statements throughout our convergence functions. And I guess it should be done post-optimization. What would be really nice is if we also logged the inputs to convergence, so if we need to debug something, we can reproduce those inputs and call the functions to get the same outputs.