You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "Hank Beatty (JIRA)" <ji...@apache.org> on 2017/08/14 18:06:01 UTC
[jira] [Commented] (TC-308) hdr_rw_* gets inserted in profiles, but
they don't get removed...
[ https://issues.apache.org/jira/browse/TC-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16126110#comment-16126110 ]
Hank Beatty commented on TC-308:
--------------------------------
[~smalenfant] Is this still an issue? If so, do we want to fix it in 2.1?
Also, this was classified as an enhancement in the GH issue. Should this be re-classified as an "improvement?"
> hdr_rw_* gets inserted in profiles, but they don't get removed...
> -----------------------------------------------------------------
>
> Key: TC-308
> URL: https://issues.apache.org/jira/browse/TC-308
> Project: Traffic Control
> Issue Type: Bug
> Components: Traffic Ops
> Reporter: Jeremy Mitchell
> Priority: Minor
> Labels: profile_parameters
>
> Moved from https://github.com/Comcast/traffic_control/issues/714
> Spend lots of time troubleshooting an config file generation issue which referred to a delivery service that was deleted or renamed.
> If you look at the Profile Parameters, you'll notice there is entries you probably never created yourselves. During configuration file generation, looks like it looks for "^hdr_rw_mid" to see if needs to generate a file.
> If the parameter still exists and the delivery service doesn't, it throws an error on either line 1210 or 1216 (looks like edge_header_rewrite is causing a problem too).
> Removing the parameter does fix the problem. Do we really need to insert those "locations" in the database?
> sub header_rewrite_dot_config {
> my $self = shift;
> my $id = shift;
> my $file = shift;
> my $server = $self->server_data($id);
> my $text = $self->header_comment( $server->host_name );
> my $ds_xml_id = undef;
> if ( $file =~ /^hdr_rw_mid_(.*)\.config$/ ) {
> $ds_xml_id = $1;
> my $ds = $self->db->resultset('Deliveryservice')->search( { xml_id => $ds_xml_id }, { prefetch => [ 'type', 'profile' ] } )->single();
> my $actions = $ds->mid_header_rewrite;
> $text .= $actions . "\n";
> }
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)