incubator-trafficcontrol git commit: This closes #268
Repository: incubator-trafficcontrol Updated Branches: refs/heads/master 525fbec0d -> 0835dc7e0 This closes #268 Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/0835dc7e Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/0835dc7e Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/0835dc7e Branch: refs/heads/master Commit: 0835dc7e0c2d29c475cccabe002e3fbf6bc5f1d3 Parents: 525fbec Author: smalenfaAuthored: Thu Feb 23 07:54:04 2017 -0500 Committer: smalenfa Committed: Thu Feb 23 07:54:04 2017 -0500 -- --
[2/2] incubator-trafficcontrol git commit: This closes 268
This closes 268 Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/525fbec0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/525fbec0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/525fbec0 Branch: refs/heads/master Commit: 525fbec0dd6548eb19a06e3b6677b4347fe47016 Parents: 9650273 Author: smalenfaAuthored: Thu Feb 23 07:48:36 2017 -0500 Committer: smalenfa Committed: Thu Feb 23 07:48:36 2017 -0500 -- --
[1/2] incubator-trafficcontrol git commit: fixed an issue where duplicated keys were being created resulting in some data not being synced
Repository: incubator-trafficcontrol Updated Branches: refs/heads/master a448960a3 -> 525fbec0d fixed an issue where duplicated keys were being created resulting in some data not being synced Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/96502735 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/96502735 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/96502735 Branch: refs/heads/master Commit: 9650273584ac783657e6869593eba827c67f47b7 Parents: a448960 Author: David NeumanAuthored: Thu Feb 9 10:10:20 2017 -0700 Committer: smalenfa Committed: Thu Feb 23 07:47:55 2017 -0500 -- .../influxdb_tools/sync/sync_ts_databases.go| 22 ++-- 1 file changed, 16 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/96502735/traffic_stats/influxdb_tools/sync/sync_ts_databases.go -- diff --git a/traffic_stats/influxdb_tools/sync/sync_ts_databases.go b/traffic_stats/influxdb_tools/sync/sync_ts_databases.go index 122ff86..a09539b 100644 --- a/traffic_stats/influxdb_tools/sync/sync_ts_databases.go +++ b/traffic_stats/influxdb_tools/sync/sync_ts_databases.go @@ -127,8 +127,8 @@ func syncCsDb(ch chan string, sourceClient influx.Client, targetClient influx.Cl //these take a long time so do them last "bandwidth.1min", "connections.1min", - // } + for _, statName := range stats { fmt.Printf("Syncing %s database with %s \n", db, statName) syncCacheStat(sourceClient, targetClient, statName, days) @@ -205,7 +205,8 @@ func syncCacheStat(sourceClient influx.Client, targetClient influx.Client, statN for ssKey := range sourceStats { ts := targetStats[ssKey] ss := sourceStats[ssKey] - if ts.value > ss.value { + + if ts.value >= ss.value { //fmt.Printf("target value %v is at least equal to source value %v\n", ts.value, ss.value) continue //target value is bigger so leave it } @@ -232,7 +233,10 @@ func syncCacheStat(sourceClient influx.Client, targetClient influx.Client, statN } bps.AddPoint(pt) } - targetClient.Write(bps) + err = targetClient.Write(bps) + if err != nil { + fmt.Println("Error writing stat - ", err) + } } func syncDeliveryServiceStat(sourceClient influx.Client, targetClient influx.Client, statName string, days int) { @@ -291,7 +295,10 @@ func syncDeliveryServiceStat(sourceClient influx.Client, targetClient influx.Cli } bps.AddPoint(pt) } - targetClient.Write(bps) + err = targetClient.Write(bps) + if err != nil { + fmt.Println("Error writing stat - ", err) + } } func syncDailyStat(sourceClient influx.Client, targetClient influx.Client, statName string, days int) { @@ -347,7 +354,10 @@ func syncDailyStat(sourceClient influx.Client, targetClient influx.Client, statN } bps.AddPoint(pt) } - targetClient.Write(bps) + err = targetClient.Write(bps) + if err != nil { + fmt.Println("Error writing stat - ", err) + } } func getCacheStats(res []influx.Result) map[string]cacheStats { @@ -374,7 +384,7 @@ func getCacheStats(res []influx.Result) map[string]cacheStats { fmt.Printf("Couldn't parse value from record %v\n", record) continue } - key := data.t + data.cdn + data.hostname + key := data.t + data.cdn + data.cacheType + data.hostname response[key] = *data } }
[2/3] incubator-trafficcontrol git commit: [TC-136] Fixes a logic bug that prevented the easy case for finding bond speed, and handle the case where the CentOS 7.3 3.10.0-514 kernel uses lower_X as a
[TC-136] Fixes a logic bug that prevented the easy case for finding bond speed, and handle the case where the CentOS 7.3 3.10.0-514 kernel uses lower_X as a pointer to enslaved interfaces, while retaining the slave_X case from earlier kernels. Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/5a6fe0e6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/5a6fe0e6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/5a6fe0e6 Branch: refs/heads/master Commit: 5a6fe0e616c3fc556e16b3fbfaa805fb55958164 Parents: 231e57b Author: Jeff ElslooAuthored: Mon Feb 6 15:07:20 2017 -0700 Committer: smalenfa Committed: Thu Feb 16 15:38:25 2017 -0500 -- .../plugins/astats_over_http/astats_over_http.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5a6fe0e6/traffic_server/plugins/astats_over_http/astats_over_http.c -- diff --git a/traffic_server/plugins/astats_over_http/astats_over_http.c b/traffic_server/plugins/astats_over_http/astats_over_http.c index 88507bd..3b792bb 100644 --- a/traffic_server/plugins/astats_over_http/astats_over_http.c +++ b/traffic_server/plugins/astats_over_http/astats_over_http.c @@ -326,6 +326,8 @@ static int getSpeed(char *interface, char *buffer, int bufferSize) { char *inf; char b[256]; int speed = 0; + int i = 0; + const char *fnames[] = {"slave_", "lower_"}; if (!interface) return 0; @@ -333,7 +335,7 @@ static int getSpeed(char *interface, char *buffer, int bufferSize) { str = getFile("/sys/class/net/bonding_masters", buffer, bufferSize); if (str) { str = strstr(str, interface); - if (!str) + if (str) return getSpeedForIF(interface, buffer, bufferSize); } @@ -342,10 +344,13 @@ static int getSpeed(char *interface, char *buffer, int bufferSize) { if (dp != NULL) { while ((ep = readdir (dp))) { - str = strstr(ep->d_name, "slave_"); - if (str) { - inf = str + strlen("slave_"); - speed += getSpeedForIF (inf, buffer, bufferSize); + for (i = 0; i < sizeof(fnames)/sizeof(fnames[0]); i++) { + str = strstr(ep->d_name, fnames[i]); + if (str) { + inf = str + strlen(fnames[i]); + speed += getSpeedForIF (inf, buffer, bufferSize); + break; // in case we happen to have slave_ and lower_ for some odd reason + } } }
[3/3] incubator-trafficcontrol git commit: This closes #256
This closes #256 Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/f047fd52 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/f047fd52 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/f047fd52 Branch: refs/heads/master Commit: f047fd52ca2c161494be195f5bbb45f6d0a12b4c Parents: 0c2fa83 Author: smalenfaAuthored: Thu Feb 16 15:41:32 2017 -0500 Committer: smalenfa Committed: Thu Feb 16 15:41:32 2017 -0500 -- --
[1/3] incubator-trafficcontrol git commit: [TC-136] Spec file updates and removed commented cruft from code.
Repository: incubator-trafficcontrol Updated Branches: refs/heads/master 231e57bbd -> f047fd52c [TC-136] Spec file updates and removed commented cruft from code. Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/0c2fa833 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/0c2fa833 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/0c2fa833 Branch: refs/heads/master Commit: 0c2fa833246708f3ff7418e73ac8cf41e56453ba Parents: 5a6fe0e Author: Jeff ElslooAuthored: Thu Feb 9 11:55:47 2017 -0700 Committer: smalenfa Committed: Thu Feb 16 15:38:25 2017 -0500 -- .../plugins/astats_over_http/astats_over_http.c | 23 .../astats_over_http/astats_over_http.spec | 6 ++--- 2 files changed, 3 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/0c2fa833/traffic_server/plugins/astats_over_http/astats_over_http.c -- diff --git a/traffic_server/plugins/astats_over_http/astats_over_http.c b/traffic_server/plugins/astats_over_http/astats_over_http.c index 3b792bb..005e49b 100644 --- a/traffic_server/plugins/astats_over_http/astats_over_http.c +++ b/traffic_server/plugins/astats_over_http/astats_over_http.c @@ -297,29 +297,6 @@ static int getSpeedForIF(char *inf, char *buffer, int bufferSize) { } static int getSpeed(char *interface, char *buffer, int bufferSize) { - // List interfaces = new ArrayList(); - // String str = getFile("/sys/class/net/bonding_masters"); - // if(str !=null && str.contains(myInterface)) { - // String base = "/sys/class/net/"+myInterface+"/"; - // File directory = new File(base); - // String[] children = directory.list(); - // for(String child : children) { - // if(child.contains("slave_")) { - // child = child.replace("slave_", ""); - // interfaces.add(child); - // } - // } - // } else { - // interfaces.add(myInterface); - // } - - // for(String ifName : interfaces) { - // str = getFile("/sys/class/net/" +ifName+ "/operstate"); - // if(str.contains("up")) { - // str = getFile("/sys/class/net/" +ifName+ "/speed"); - // result.speed += Long.parseLong(str.trim()); - // } - // } DIR *dp; struct dirent *ep; char *str; http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/0c2fa833/traffic_server/plugins/astats_over_http/astats_over_http.spec -- diff --git a/traffic_server/plugins/astats_over_http/astats_over_http.spec b/traffic_server/plugins/astats_over_http/astats_over_http.spec index 28ac853..19afdf7 100644 --- a/traffic_server/plugins/astats_over_http/astats_over_http.spec +++ b/traffic_server/plugins/astats_over_http/astats_over_http.spec @@ -19,13 +19,13 @@ %global install_prefix "/opt" Name: astats_over_http -Version: 1.1.0 +Version: 1.2 Release: 1%{?dist} Summary: Apache Traffic Server %{name} plugin Vendor:Comcast Group: Applications/Communications License: Apache License, Version 2.0 -URL: https://github.com/Comcast/traffic_control/tree/master/traffic_server/plugins/astats_over_http +URL: https://github.com/apache/incubator-trafficcontrol/tree/master/traffic_server/plugins/astats_over_http Source0: %{name}.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XX) Requires: trafficserver = 5.2.0 @@ -35,7 +35,7 @@ BuildRequires:trafficserver = 5.2.0 Apache Traffic Server plugin %prep -%setup -n %{name} +%setup -q -n %{name} %build %{install_prefix}/trafficserver/bin/tsxs -v -c %{name}.c -o %{name}.so
[1/2] incubator-trafficcontrol git commit: accounts for missing dependency that centos 7.3 doesn't provide. when centos 7.4 is available this dependency will be provided with the distro.
Repository: incubator-trafficcontrol Updated Branches: refs/heads/2.1.x 6aae6f47f -> 53345aa1b accounts for missing dependency that centos 7.3 doesn't provide. when centos 7.4 is available this dependency will be provided with the distro. (cherry picked from commit 15901255c1847800bbd871e33c757017ec23f74f) Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/fa18c96e Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/fa18c96e Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/fa18c96e Branch: refs/heads/2.1.x Commit: fa18c96ed18d4caabf743cd1ee2a02e008a7 Parents: 6aae6f4 Author: Jeremy MitchellAuthored: Tue Aug 15 10:44:56 2017 -0600 Committer: Steve Malenfant Committed: Thu Aug 17 10:13:54 2017 -0400 -- infrastructure/docker/build/Dockerfile-traffic_portal | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/fa18c96e/infrastructure/docker/build/Dockerfile-traffic_portal -- diff --git a/infrastructure/docker/build/Dockerfile-traffic_portal b/infrastructure/docker/build/Dockerfile-traffic_portal index 978d836..19e35f9 100644 --- a/infrastructure/docker/build/Dockerfile-traffic_portal +++ b/infrastructure/docker/build/Dockerfile-traffic_portal @@ -30,7 +30,8 @@ RUN yum -y install \ yum -y clean all # traffic_portal specific -RUNyum -y install \ +RUNrpm -ivh https://kojipkgs.fedoraproject.org//packages/http-parser/2.7.1/3.el7/x86_64/http-parser-2.7.1-3.el7.x86_64.rpm && \ + yum -y install \ gcc \ libffi-devel \ make \
[2/2] incubator-trafficcontrol git commit: This closes #821
This closes #821 Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/53345aa1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/53345aa1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/53345aa1 Branch: refs/heads/2.1.x Commit: 53345aa1bf09fa90938c04c2134b543cd0aff434 Parents: fa18c96 Author: Steve MalenfantAuthored: Thu Aug 17 10:14:39 2017 -0400 Committer: Steve Malenfant Committed: Thu Aug 17 10:14:39 2017 -0400 -- --
[incubator-trafficcontrol] branch master updated: uses info api to allow ORT to retain compatibility with older builds
This is an automated email from the ASF dual-hosted git repository. smalenfant pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git The following commit(s) were added to refs/heads/master by this push: new e1c0109 uses info api to allow ORT to retain compatibility with older builds e1c0109 is described below commit e1c010922f27095b670f32ab6208afb9e9f9bc94 Author: Derek Gelinas <mrdgeli...@gmail.com> AuthorDate: Mon May 7 18:39:06 2018 -0400 uses info api to allow ORT to retain compatibility with older builds --- traffic_ops/bin/traffic_ops_ort.pl | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/traffic_ops/bin/traffic_ops_ort.pl b/traffic_ops/bin/traffic_ops_ort.pl index 00ced01..f0a9af3 100755 --- a/traffic_ops/bin/traffic_ops_ort.pl +++ b/traffic_ops/bin/traffic_ops_ort.pl @@ -788,12 +788,24 @@ sub get_update_status { ##Some versions of Traffic Ops had the 1.3 API but did not have the use_reval_pending field. If this field is not present, exit. if ( !defined( $upd_json->[0]->{'use_reval_pending'} ) ) { - ( $log_level >> $ERROR ) && printf("ERROR ORT version incompatible with current version of Traffic Ops. Please upgrade to Traffic Ops 2.2.\n"); - exit 1; + my $info_uri = "/api/1.2/system/info.json"; + my $info_ref = _get($info_uri); + if ($info_ref eq '404') { + ( $log_level >> $ERROR ) && printf("ERROR Unable to get status of use_reval_pending parameter. Stopping.\n"); + exit 1; + } + if ( $info_ref =~ m/^\d{3}$/ ) { + ( $log_level >> $ERROR ) && print "ERROR Update URL: $info_uri returned $info_ref. Exiting, not sure what else to do.\n"; + exit 1; + } + my $info_json = decode_json($info_ref); + if (defined( $info_json->{'response'}->{'parameters'}->{'use_reval_pending'} ) ) { + $reval_in_use = $info_json->{'response'}->{'parameters'}->{'use_reval_pending'}; + } + } + else { + $reval_in_use = $upd_json->[0]->{'use_reval_pending'}; } - - $reval_in_use = $upd_json->[0]->{'use_reval_pending'}; - return ($upd_json, $uri); } -- To stop receiving notification emails like this one, please contact smalenf...@apache.org.