HomeClusterLabs Projects
Diffusion Booth 3b0bc3ae5939

Feature: make log contain source address of unknown site

Description

Feature: make log contain source address of unknown site

So far, log would contain just the (reasonably unique) identifier
of the astray originator, but it's hard or downright impossible
to unambiguously recover the original address just with this piece
of knowledge. Hence to allow for convenient tracking such cases
down, log also the source address if possible.

Technically, we are abusing the fact that said identifiers are supposed
to be non-negative (most significant bit set to zero) while the proper
OK state is indicated with zero and proper error condition mostly with
negative integers. So these identifiers fit nicely into the positive
integer area, except for:

  • zero identifier <-- we flip all the bits but MSB to 1 in this case
  • malformed identifiers with MSB=1 <-- we flip MSB to 0

Also, we make sure that remaining error conditions not following the
rule and being indicated with positive integers are now indicated
with negative ones.

This convention is also mentioned in the function declaration's comment.

Details

Provenance
Jan Pokorný <jpokorny@redhat.com>Authored on Jun 16 2016, 4:31 PM
Parents
rB0a3f300985b4: Low: remove redundant check after find_site_by_id
Branches
Unknown
Tags
Unknown

Event Timeline