You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/06/11 19:47:47 UTC

[GitHub] [trafficcontrol] mitchell852 commented on issue #2156: When renaming a host in TC, the hashId retains the value of the previous hostname

mitchell852 commented on issue #2156:
URL: https://github.com/apache/trafficcontrol/issues/2156#issuecomment-642892915


   Just to add some more details to this:
   
   How to reproduce:
   
   1. Perform a snapshot of your cdn so the diff is clean: https://tp.domain.com/#!/cdns/{id}/config/changes
   2. Find an existing Edge server in that cdn (because only edge servers show up in a snapshot) to update. i.e. https://tp.domain.com/#!/servers/{id}
   3. change the hostname of the server and save.
   4. go back to the cdn snapshot and observe the changes that are being made to the contentServers portion of the snapshot. notice that the hashId did not change with the hostname change.
   
   The point is if you create a server with hostname = foo, it ends up with hashId = foo. when you change hostname to bar, hashId stays foo.
   
   This means you can come along and create another server with hostname=foo (because you renamed the other one to bar) and you end up with 2 servers with hashId=foo which means TR could get confused with it's consistent hashing algo and never send traffic to one of the servers.
   
   So, I would suggest that simply making hostname immutable on a server would prevent this scenario from every happening.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org