This is an automated email from the ASF dual-hosted git repository.

rob pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 3c67eb3  Fix TO Go CRConfig generation to ignore active ANY_MAP DSes
3c67eb3 is described below

commit 3c67eb3741a96d0525af5c0761b4e4b4ce760026
Author: Rawlin Peters <rawlin_pet...@comcast.com>
AuthorDate: Wed Jun 20 13:50:19 2018 -0600

    Fix TO Go CRConfig generation to ignore active ANY_MAP DSes
    
    This is a regression from the Perl version of the CRConfig generation
    which ignores active ANY_MAP DSes.
    
    Fixes #1121
---
 traffic_ops/traffic_ops_golang/crconfig/deliveryservice.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/traffic_ops/traffic_ops_golang/crconfig/deliveryservice.go 
b/traffic_ops/traffic_ops_golang/crconfig/deliveryservice.go
index d9b2e55..5ec1e66 100644
--- a/traffic_ops/traffic_ops_golang/crconfig/deliveryservice.go
+++ b/traffic_ops/traffic_ops_golang/crconfig/deliveryservice.go
@@ -22,6 +22,7 @@ package crconfig
 import (
        "database/sql"
        "errors"
+       "fmt"
        "strconv"
        "strings"
        "time"
@@ -77,6 +78,7 @@ left outer join profile as p on p.id = d.profile
 where d.cdn_id = (select id from cdn where name = $1)
 and d.active = true
 `
+       q += fmt.Sprintf(" and t.name != '%s'", tc.DSTypeAnyMap)
        rows, err := db.Query(q, cdn)
        if err != nil {
                return nil, errors.New("querying deliveryservices: " + 
err.Error())

Reply via email to