We currently assume that the host and shard id's between the master and shard are synchronized. This works out OK because master is the source of truth for all this information, so it can enforce the uniqueness constrain on these IDs and then push them to the shard.
[This doesn't quite work as we'd like though. See issue 782797 where we didn't actually have the label ID synchronized, and this resulted in test failures because we obtained a label_id on the shard and tried to use it on the master]
In preparation for the source of truth moving to shard, we must drop this requirement, instead use DUT hostname and shard hostname as the mapping key. This way, shards can create their own DUT entries and then report them to the master (where their host_id would not be unique anymore).
For this we will:
- Scrub all AFE RPC endpoints and convert any arguments that include id to hostnames immediately before forwarding anywhere.
- Change the existing shard heartbeat to rely on hostnames instead of ids.
- finally, update the sentinel service so that it stops enforcing label consistency.
Comment 1 by pprabhu@chromium.org
, Nov 11 2017