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 2019/02/28 21:50:32 UTC

[GitHub] ocket8888 commented on issue #3075: Traffic Ops Golang parent.config

ocket8888 commented on issue #3075: Traffic Ops Golang parent.config
URL: https://github.com/apache/trafficcontrol/pull/3075#issuecomment-468452499
 
 
   So, I tested this by starting up two CiaB instances, one with this change and one without. CiaB comes with a single edge server assigned to the only DS (HTTP, qstr=USE). I added an HTTP_LIVE_NATL DS (qstr=USE) with its own, new edge-tier server pointing at the built-in origin. Then I added a DNS DS (qstr=DROP, uses cache_range_requests plugin) and assigned it to both the built-in edge and the new one I created. Then I tested the following routes using the `compare` tool:
   
   ```text
   /api/1.1/servers/edge/configfiles/ats/parent.config
   /api/1.2/servers/edge/configfiles/ats/parent.config
   /api/1.3/servers/edge/configfiles/ats/parent.config
   /api/1.4/servers/edge/configfiles/ats/parent.config
   /api/1.1/servers/mid/configfiles/ats/parent.config
   /api/1.2/servers/mid/configfiles/ats/parent.config
   /api/1.3/servers/mid/configfiles/ats/parent.config
   /api/1.4/servers/mid/configfiles/ats/parent.config
   /api/1.1/servers/test/configfiles/ats/parent.config
   /api/1.2/servers/test/configfiles/ats/parent.config
   /api/1.3/servers/test/configfiles/ats/parent.config
   /api/1.4/servers/test/configfiles/ats/parent.config
   ```
   
   For all API versions on both edges the `parent.config` file output was consistent between the Perl and Go implementations. The only thing of note is that as of APIv1.4 the Go rewrite drops character encoding in the `Content-Type` header; Perl reports it as `text/plain;charset=UTF-8`, while Go reports it as `text/plain`. This isn't a huge deal as that's neither documented nor something that affects the content of the files, and the encoding should be determinable from an examination of the response body.
   
   I'm more troubled by the fact that lower API versions than 1.4 are still being proxied to Perl. That, and a diff that appeared in the Mid-tier cache server's `parent.config`:
   
   ```diff
   1c1,2
   < # DO NOT EDIT - Generated for mid by Traffic Ops (https://trafficops.infra.ciab.test:443/) on Thu Feb 28 21:11:58 UTC 2019
   ---
   > # DO NOT EDIT - Generated for mid by Traffic Ops (https://trafficops.infra.ciab.test:443/) on Thu Feb 28 21:11:57 UTC 2019
   > dest_domain=. parent="" round_robin=consistent_hash go_direct=false
   ```
   
   `<` refers to the file generated by Perl whereas `>` refers to the file generated by Go. Seen here, the Perl-generated `parent.config` is notoriously empty, while the Go-generated file has that one line.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services