You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/09/23 21:52:15 UTC
[01/20] git commit: TS-2207: CentOS5 out of tree perl module build
fails
Updated Branches:
refs/heads/5.0.x d27749429 -> 4ab334d3a
TS-2207: CentOS5 out of tree perl module build fails
The older version of automake on CentOS5 doesn't supply the $(builddir)
variable, possibly because it's implicitly the current working
directory. It also doesn't supply various $abs_ variables that later
versions do. Rewrite the copy using more fundamental automake
variables.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/632b3a40
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/632b3a40
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/632b3a40
Branch: refs/heads/5.0.x
Commit: 632b3a40241fc4459fc8126d5a0961ba08151021
Parents: cb9b0ff
Author: James Peach <jp...@apache.org>
Authored: Tue Sep 10 09:04:42 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Tue Sep 10 09:04:42 2013 -0700
----------------------------------------------------------------------
CHANGES | 1 +
lib/perl/Makefile.am | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/632b3a40/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 868829d..20e1ef9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 4.1.0
+ *) [TS-2207] CentOS5 out of tree perl module build fails.
*) [TS-1637] Fix nodes as idle/dead if we have not heard from them in awhile
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/632b3a40/lib/perl/Makefile.am
----------------------------------------------------------------------
diff --git a/lib/perl/Makefile.am b/lib/perl/Makefile.am
index 0622e51..496f217 100644
--- a/lib/perl/Makefile.am
+++ b/lib/perl/Makefile.am
@@ -22,8 +22,10 @@ all-local: Makefile-pl
install-exec-local: Makefile-pl
$(MAKE) -f Makefile-pl INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix) DESTDIR=$(DESTDIR) install
+# The perl build needs to have the source files in the current working directory, so we need to
+# copy them to the build directory if we are building out of tree.
Makefile-pl: Makefile.PL
- -[ $(srcdir) != $(builddir) ] && cp -rf $(abs_srcdir)/. $(builddir)/.
+ -[ "$(srcdir)" != "$(top_builddir)/$(subdir)" ] && cp -rf "$(srcdir)/." "$(top_builddir)/$(subdir)"
$(PERL) Makefile.PL INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix)
distclean-local:
[19/20] git commit: New Ubuntu release is on the doorstep
Posted by zw...@apache.org.
New Ubuntu release is on the doorstep
Ubuntu Saucy (13.10) will be out of beta soon and comes with many
goodies: Most prominently: clang 3.4 (and also clang-format).
Right now we're still throwing a bunch of warnings when compiling with
clang 3.4, so I'm adding support now that we can work on it asap.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/27246a53
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/27246a53
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/27246a53
Branch: refs/heads/5.0.x
Commit: 27246a53b8a3e8b516cca11bf0184522248a28dc
Parents: 1ec3990
Author: Igor Galić <i....@brainsware.org>
Authored: Mon Sep 23 21:02:27 2013 +0200
Committer: Igor Galić <i....@brainsware.org>
Committed: Mon Sep 23 21:02:27 2013 +0200
----------------------------------------------------------------------
Vagrantfile | 7 +++++--
contrib/manifests/debian.pp | 9 +++++++++
2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/27246a53/Vagrantfile
----------------------------------------------------------------------
diff --git a/Vagrantfile b/Vagrantfile
index 09588d5..d36dea0 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -35,6 +35,9 @@ $network = {
"debian7" => "192.168.200.18",
"sles11" => "192.168.200.19",
"oel63" => "192.168.200.20",
+
+ "saucy64" => "192.168.100.21",
+ "saucy32" => "192.168.100.22",
}
$vmspec = {
@@ -61,7 +64,7 @@ $vmspec = {
],
"oel63" => [
"http://ats.boot.org/vagrant/vagrant-oel63-x64.box", "redhat.pp",
- ]
+ ],
}
Vagrant.configure("2") do |config|
@@ -79,7 +82,7 @@ Vagrant.configure("2") do |config|
# Ubuntu 12.10 (Quantal Quetzal)
# Ubuntu 12.04 LTS (Precise Pangolin)
["i386", "amd64"].each { |arch|
- ['raring', 'quantal', 'precise'].each { |release|
+ ['saucy', 'raring', 'quantal', 'precise'].each { |release|
n = { "i386" => "32", "amd64" => "64" }[arch]
config.vm.define "#{release}#{n}" do | config |
config.vm.box = "#{release}#{n}"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/27246a53/contrib/manifests/debian.pp
----------------------------------------------------------------------
diff --git a/contrib/manifests/debian.pp b/contrib/manifests/debian.pp
index 150eb08..dcf9452 100644
--- a/contrib/manifests/debian.pp
+++ b/contrib/manifests/debian.pp
@@ -32,3 +32,12 @@ package {[
]:
ensure => latest
}
+
+# if there is clang-3.4 available, install it:
+if $::lsbdistcodename == 'saucy' {
+ package {[
+ 'clang-3.4', 'clang-format-3.4'
+ ]:
+ ensure => latest,
+ }
+}
[18/20] git commit: TS-2232: log level should be change from Status
to Debug
Posted by zw...@apache.org.
TS-2232: log level should be change from Status to Debug
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/1ec3990b
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/1ec3990b
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/1ec3990b
Branch: refs/heads/5.0.x
Commit: 1ec3990bf7c30b8a50764dce16d819ba76180a0d
Parents: 8409434
Author: Yu Qing <zh...@taobao.com>
Authored: Mon Sep 16 10:26:27 2013 +0800
Committer: Yunkai Zhang <qi...@taobao.com>
Committed: Wed Sep 18 10:57:47 2013 +0800
----------------------------------------------------------------------
CHANGES | 3 +++
proxy/logging/LogConfig.cc | 2 +-
proxy/logging/LogFile.cc | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1ec3990b/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index f2e9fd4..510dc08 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 4.1.0
+ *) TS-2232: log level should be change from Status to Debug.
+ Author: Yu Qing <zh...@taobao.com>
+
*) [TS-2201] split drainIncomingChannel two thread, one handle Broadcast message and other handle Reliable(TCP)
request for supporing large cluster.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1ec3990b/proxy/logging/LogConfig.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogConfig.cc b/proxy/logging/LogConfig.cc
index d04fd48..8fc0ece 100644
--- a/proxy/logging/LogConfig.cc
+++ b/proxy/logging/LogConfig.cc
@@ -1608,7 +1608,7 @@ LogConfig::update_space_used()
Note("Traffic Server was Unable to auto-delete rolled "
"logfile %s: %s.", candidates[victim].name, strerror(errno));
} else {
- Status("The rolled logfile, %s, was auto-deleted; "
+ Debug("logspace", "The rolled logfile, %s, was auto-deleted; "
"%" PRId64 " bytes were reclaimed.", candidates[victim].name, candidates[victim].size);
m_space_used -= candidates[victim].size;
m_partition_space_left += candidates[victim].size;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1ec3990b/proxy/logging/LogFile.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogFile.cc b/proxy/logging/LogFile.cc
index 68aa90c..4bbfefa 100644
--- a/proxy/logging/LogFile.cc
+++ b/proxy/logging/LogFile.cc
@@ -459,7 +459,7 @@ LogFile::roll(long interval_start, long interval_end)
m_start_time = 0;
m_bytes_written = 0;
- Status("The logfile %s was rolled to %s.", m_name, roll_name);
+ Debug("log-file", "The logfile %s was rolled to %s.", m_name, roll_name);
return 1;
}
[14/20] git commit: comment on the units for TSContScheduleEvery()
Posted by zw...@apache.org.
comment on the units for TSContScheduleEvery()
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/93184bbf
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/93184bbf
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/93184bbf
Branch: refs/heads/5.0.x
Commit: 93184bbfa20a3c3eab0aaee17da0343ed3743b9a
Parents: 4fab19a
Author: James Peach <jp...@apache.org>
Authored: Fri Sep 13 21:47:54 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Fri Sep 13 21:47:54 2013 -0700
----------------------------------------------------------------------
proxy/api/ts/ts.h.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/93184bbf/proxy/api/ts/ts.h.in
----------------------------------------------------------------------
diff --git a/proxy/api/ts/ts.h.in b/proxy/api/ts/ts.h.in
index 286e499..ff025d5 100644
--- a/proxy/api/ts/ts.h.in
+++ b/proxy/api/ts/ts.h.in
@@ -2246,7 +2246,7 @@ extern "C"
tsapi void TSContDataSet(TSCont contp, void* data);
tsapi void* TSContDataGet(TSCont contp);
tsapi TSAction TSContSchedule(TSCont contp, TSHRTime timeout, TSThreadPool tp);
- tsapi TSAction TSContScheduleEvery(TSCont contp, TSHRTime every, TSThreadPool tp);
+ tsapi TSAction TSContScheduleEvery(TSCont contp, TSHRTime every /* millisecs */, TSThreadPool tp);
tsapi TSAction TSHttpSchedule(TSCont contp, TSHttpTxn txnp, TSHRTime timeout);
tsapi int TSContCall(TSCont contp, TSEvent event, void* edata);
tsapi TSMutex TSContMutexGet(TSCont contp);
[11/20] git commit: TS-2144 Avoid race on e.g. -Cclear which would
crash the process
Posted by zw...@apache.org.
TS-2144 Avoid race on e.g. -Cclear which would crash the process
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/b5edc06a
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/b5edc06a
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/b5edc06a
Branch: refs/heads/5.0.x
Commit: b5edc06aaf1395429100e3f548d3c0c1fbc2a2e0
Parents: cb9e4b5
Author: Leif Hedstrom <zw...@apache.org>
Authored: Fri Sep 13 10:45:04 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Fri Sep 13 10:45:11 2013 -0600
----------------------------------------------------------------------
proxy/Main.cc | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b5edc06a/proxy/Main.cc
----------------------------------------------------------------------
diff --git a/proxy/Main.cc b/proxy/Main.cc
index 4a32593..3c063ad 100644
--- a/proxy/Main.cc
+++ b/proxy/Main.cc
@@ -1516,17 +1516,13 @@ main(int /* argc ATS_UNUSED */, char **argv)
Note("using the new remap processor system with %d threads", num_remap_threads);
remapProcessor.setUseSeparateThread();
}
- remapProcessor.start(num_remap_threads, stacksize);
-
- RecProcessStart(stacksize);
init_signals2();
// log initialization moved down
if (command_flag) {
- // pmgmt initialization moved up, needed by RecProcessInit
- //pmgmt->start();
int cmd_ret = cmd_mode();
+
if (cmd_ret != CMD_IN_PROGRESS) {
if (cmd_ret >= 0)
_exit(0); // everything is OK
@@ -1534,6 +1530,8 @@ main(int /* argc ATS_UNUSED */, char **argv)
_exit(1); // in error
}
} else {
+ remapProcessor.start(num_remap_threads, stacksize);
+ RecProcessStart(stacksize);
initCacheControl();
initCongestionControl();
IpAllow::startup();
[09/20] git commit: udpated release notes
Posted by zw...@apache.org.
udpated release notes
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/9e9569f3
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/9e9569f3
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/9e9569f3
Branch: refs/heads/5.0.x
Commit: 9e9569f3ca8a01a2f03998d099262d78e31f6f7d
Parents: 2c0ea4e
Author: Bryan Call <bc...@apache.org>
Authored: Wed Sep 11 16:37:27 2013 -0700
Committer: Bryan Call <bc...@apache.org>
Committed: Wed Sep 11 16:37:27 2013 -0700
----------------------------------------------------------------------
CHANGES | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9e9569f3/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index adeb534..fa97bfc 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 4.1.0
+ *) [TS-2209] add support for lowercasing all substitutions in regex_remap
+
*) [TS-2187] failed assert `nr == sizeof(uint64_t)` in EventNotify::signal()
*) [TS-2206] The trafficserver RC script does not use absolute path to
[17/20] git commit: Fix typo in the hook used
Posted by zw...@apache.org.
Fix typo in the hook used
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/84094349
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/84094349
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/84094349
Branch: refs/heads/5.0.x
Commit: 84094349f8bde7d8a9d1457486d0a875a51f9790
Parents: 3a903f2
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Sep 17 14:35:14 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Sep 17 14:35:14 2013 -0600
----------------------------------------------------------------------
plugins/header_rewrite/Examples/Force-close | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/84094349/plugins/header_rewrite/Examples/Force-close
----------------------------------------------------------------------
diff --git a/plugins/header_rewrite/Examples/Force-close b/plugins/header_rewrite/Examples/Force-close
index cd8fbaf..79c30ed 100644
--- a/plugins/header_rewrite/Examples/Force-close
+++ b/plugins/header_rewrite/Examples/Force-close
@@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cond %{READ_REQUEST_HDR_HOOK} [AND]
+cond %{SEND_RESPONSE_HDR_HOOK}
cond %{ACCESS:/url/local/www/html/status.html} [NOT,OR]
cond %{RANDOM:1000} =42
add-header Connection "close"
[06/20] git commit: TS-2187: use nonblock eventfd in EventNotify
Posted by zw...@apache.org.
TS-2187: use nonblock eventfd in EventNotify
1) Use nonblock eventfd, so that we can tolerate write() failed with
errno EAGANIN – which is acceptable as the signal receiver will be
notified eventually in this case.
2) After using nonblock eventfd, read() will not block in wait(). So
I use epoll_wait() to implement block behavior, just like timedwait().
3) nonblock eventfd can fix a potential problem: if receiver didn't
read() data immediately, senders might block in write().
Signed-off-by: Yunkai Zhang <qi...@taobao.com>
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/9a6fc2ab
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/9a6fc2ab
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/9a6fc2ab
Branch: refs/heads/5.0.x
Commit: 9a6fc2ab6b3147e82dfc229a7158083371d5545e
Parents: 40212d2
Author: Yunkai Zhang <qi...@taobao.com>
Authored: Sun Sep 8 23:35:39 2013 +0800
Committer: Yunkai Zhang <qi...@taobao.com>
Committed: Wed Sep 11 15:18:18 2013 +0800
----------------------------------------------------------------------
CHANGES | 2 ++
lib/ts/EventNotify.cc | 42 +++++++++++++++++++++++++++++++-----------
lib/ts/EventNotify.h | 2 +-
3 files changed, 34 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9a6fc2ab/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index d042183..adeb534 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 4.1.0
+ *) [TS-2187] failed assert `nr == sizeof(uint64_t)` in EventNotify::signal()
+
*) [TS-2206] The trafficserver RC script does not use absolute path to
traffic_line binary.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9a6fc2ab/lib/ts/EventNotify.cc
----------------------------------------------------------------------
diff --git a/lib/ts/EventNotify.cc b/lib/ts/EventNotify.cc
index 3a499b6..feb9ad8 100644
--- a/lib/ts/EventNotify.cc
+++ b/lib/ts/EventNotify.cc
@@ -32,6 +32,7 @@
#ifdef HAVE_EVENTFD
#include <sys/eventfd.h>
+#include <sys/fcntl.h>
#include <sys/epoll.h>
#endif
@@ -41,11 +42,13 @@ EventNotify::EventNotify()
int ret;
struct epoll_event ev;
- // Don't use noblock here!
- m_event_fd = eventfd(0, EFD_CLOEXEC);
+ m_event_fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
if (m_event_fd < 0) {
- // EFD_CLOEXEC invalid in <= Linux 2.6.27
+ // EFD_NONBLOCK/EFD_CLOEXEC invalid in <= Linux 2.6.27
m_event_fd = eventfd(0, 0);
+
+ fcntl(m_event_fd, F_SETFD, FD_CLOEXEC);
+ fcntl(m_event_fd, F_SETFL, O_NONBLOCK);
}
ink_release_assert(m_event_fd != -1);
@@ -69,23 +72,39 @@ EventNotify::signal(void)
#ifdef HAVE_EVENTFD
ssize_t nr;
uint64_t value = 1;
+ //
+ // If the addition would cause the counter’s value of eventfd
+ // to exceed the maximum, write() will fail with the errno EAGAIN,
+ // which is acceptable as the receiver will be notified eventually.
+ //
nr = write(m_event_fd, &value, sizeof(uint64_t));
- ink_release_assert(nr == sizeof(uint64_t));
#else
ink_cond_signal(&m_cond);
#endif
}
-void
+int
EventNotify::wait(void)
{
#ifdef HAVE_EVENTFD
- ssize_t nr;
+ ssize_t nr, nr_fd;
uint64_t value = 0;
+ struct epoll_event ev;
+
+ do {
+ nr_fd = epoll_wait(m_epoll_fd, &ev, 1, -1);
+ } while (nr_fd == -1 && errno == EINTR);
+
+ if (nr_fd == -1)
+ return errno;
+
nr = read(m_event_fd, &value, sizeof(uint64_t));
- ink_release_assert(nr == sizeof(uint64_t));
+ if (nr == sizeof(uint64_t))
+ return 0;
+ else
+ return errno;
#else
- ink_cond_wait(&m_cond, &m_mutex);
+ return ink_cond_wait(&m_cond, &m_mutex);
#endif
}
@@ -115,9 +134,10 @@ EventNotify::timedwait(int timeout) // milliseconds
return errno;
nr = read(m_event_fd, &value, sizeof(uint64_t));
- ink_release_assert(nr == sizeof(uint64_t));
-
- return 0;
+ if (nr == sizeof(uint64_t))
+ return 0;
+ else
+ return errno;
#else
ink_timestruc abstime;
ink_hrtime curtime;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9a6fc2ab/lib/ts/EventNotify.h
----------------------------------------------------------------------
diff --git a/lib/ts/EventNotify.h b/lib/ts/EventNotify.h
index b74e3af..7223e6d 100644
--- a/lib/ts/EventNotify.h
+++ b/lib/ts/EventNotify.h
@@ -38,7 +38,7 @@ class EventNotify
public:
EventNotify();
void signal(void);
- void wait(void);
+ int wait(void);
int timedwait(int timeout); // milliseconds
void lock(void);
bool trylock(void);
[16/20] git commit: TS-2201: split drainIncomingChannel two thread,
one handle Broadcast message and other handle Reliable(TCP) request.
Posted by zw...@apache.org.
TS-2201: split drainIncomingChannel two thread, one handle Broadcast message and other handle Reliable(TCP) request.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/3a903f2b
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/3a903f2b
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/3a903f2b
Branch: refs/heads/5.0.x
Commit: 3a903f2bc69c0fb5623fa212f2f1ef64b5455c8b
Parents: f47c6be
Author: Chen Bin <ku...@taobao.com>
Authored: Tue Sep 17 11:51:11 2013 +0800
Committer: Chen Bin <ku...@taobao.com>
Committed: Tue Sep 17 11:51:11 2013 +0800
----------------------------------------------------------------------
CHANGES | 3 ++
mgmt/cluster/ClusterCom.cc | 109 +++++++++++++++++++++++++++-------------
2 files changed, 77 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3a903f2b/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index e9c056d..f2e9fd4 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 4.1.0
+ *) [TS-2201] split drainIncomingChannel two thread, one handle Broadcast message and other handle Reliable(TCP)
+ request for supporing large cluster.
+
*) [TS-2144] Avoid race on e.g. "traffic_server -Cclear" which would crash
the process intermittently.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3a903f2b/mgmt/cluster/ClusterCom.cc
----------------------------------------------------------------------
diff --git a/mgmt/cluster/ClusterCom.cc b/mgmt/cluster/ClusterCom.cc
index 430e01b..fa173cc 100644
--- a/mgmt/cluster/ClusterCom.cc
+++ b/mgmt/cluster/ClusterCom.cc
@@ -48,6 +48,76 @@
int MultiCastMessages = 0;
long LastHighestDelta = -1L;
+
+void *
+drainIncomingChannel_broadcast(void *arg)
+{
+ char message[61440];
+ fd_set fdlist;
+ void *ret = arg;
+
+ time_t t;
+ time_t last_multicast_receive_time = time(NULL);
+ struct timeval tv;
+
+ /* Avert race condition, thread spun during constructor */
+ while (!lmgmt->ccom || !lmgmt->ccom->init) {
+ mgmt_sleep_sec(1);
+ }
+
+ lmgmt->syslogThrInit();
+
+ for (;;) { /* Loop draining mgmt network channels */
+ // linux: set tv.tv_set in select() loop, since linux's select()
+ // will update tv with the amount of time not slept (most other
+ // implementations do not do this)
+ tv.tv_sec = lmgmt->ccom->mc_poll_timeout; // interface not-responding timeout
+ tv.tv_usec = 0;
+
+ memset(message, 0, 61440);
+ FD_ZERO(&fdlist);
+
+ if (lmgmt->ccom->cluster_type != NO_CLUSTER) {
+ if (lmgmt->ccom->receive_fd > 0) {
+ FD_SET(lmgmt->ccom->receive_fd, &fdlist); /* Multicast fd */
+ }
+ }
+
+ mgmt_select(FD_SETSIZE, &fdlist, NULL, NULL, &tv);
+
+ if (lmgmt->ccom->cluster_type != NO_CLUSTER) {
+ // Multicast timeout considerations
+ if ((lmgmt->ccom->receive_fd < 0) || !FD_ISSET(lmgmt->ccom->receive_fd, &fdlist)) {
+ t = time(NULL);
+ if ((t - last_multicast_receive_time) > (tv.tv_sec - 1)) {
+ // Timeout on multicast receive channel, reset channel.
+ if (lmgmt->ccom->receive_fd > 0) {
+ close(lmgmt->ccom->receive_fd);
+ }
+ lmgmt->ccom->receive_fd = -1;
+ Debug("ccom", "Timeout, resetting multicast receive channel");
+ if (lmgmt->ccom->establishReceiveChannel(0)) {
+ Debug("ccom", "establishReceiveChannel failed");
+ lmgmt->ccom->receive_fd = -1;
+ }
+ last_multicast_receive_time = t; // next action at next interval
+ }
+ } else {
+ last_multicast_receive_time = time(NULL); // valid multicast msg
+ }
+ }
+
+ /* Broadcast message */
+ if (lmgmt->ccom->cluster_type != NO_CLUSTER &&
+ lmgmt->ccom->receive_fd > 0 &&
+ FD_ISSET(lmgmt->ccom->receive_fd, &fdlist) &&
+ (lmgmt->ccom->receiveIncomingMessage(message, 61440) > 0)) {
+ lmgmt->ccom->handleMultiCastMessage(message);
+ }
+ }
+ return ret;
+} /* End drainIncomingChannel */
+
/*
* drainIncomingChannel
* This function is blocking, it never returns. It is meant to allow for
@@ -89,8 +159,6 @@ drainIncomingChannel(void *arg)
// to reopen the channel (e.g. opening the socket would fail if the
// interface was down). In this case, the ccom->receive_fd is set
// to '-1' and the open is retried until it succeeds.
- time_t t;
- time_t last_multicast_receive_time = time(NULL);
struct timeval tv;
/* Avert race condition, thread spun during constructor */
@@ -111,43 +179,12 @@ drainIncomingChannel(void *arg)
FD_ZERO(&fdlist);
if (lmgmt->ccom->cluster_type != NO_CLUSTER) {
- if (lmgmt->ccom->receive_fd > 0) {
- FD_SET(lmgmt->ccom->receive_fd, &fdlist); /* Multicast fd */
- }
FD_SET(lmgmt->ccom->reliable_server_fd, &fdlist); /* TCP Server fd */
}
mgmt_select(FD_SETSIZE, &fdlist, NULL, NULL, &tv);
- if (lmgmt->ccom->cluster_type != NO_CLUSTER) {
- // Multicast timeout considerations
- if ((lmgmt->ccom->receive_fd < 0) || !FD_ISSET(lmgmt->ccom->receive_fd, &fdlist)) {
- t = time(NULL);
- if ((t - last_multicast_receive_time) > (tv.tv_sec - 1)) {
- // Timeout on multicast receive channel, reset channel.
- if (lmgmt->ccom->receive_fd > 0) {
- close(lmgmt->ccom->receive_fd);
- }
- lmgmt->ccom->receive_fd = -1;
- Debug("ccom", "Timeout, resetting multicast receive channel");
- if (lmgmt->ccom->establishReceiveChannel(0)) {
- Debug("ccom", "establishReceiveChannel failed");
- lmgmt->ccom->receive_fd = -1;
- }
- last_multicast_receive_time = t; // next action at next interval
- }
- } else {
- last_multicast_receive_time = time(NULL); // valid multicast msg
- }
- }
-
- /* Broadcast message */
- if (lmgmt->ccom->cluster_type != NO_CLUSTER &&
- lmgmt->ccom->receive_fd > 0 &&
- FD_ISSET(lmgmt->ccom->receive_fd, &fdlist) &&
- (lmgmt->ccom->receiveIncomingMessage(message, 61440) > 0)) {
- lmgmt->ccom->handleMultiCastMessage(message);
- } else if (FD_ISSET(lmgmt->ccom->reliable_server_fd, &fdlist)) {
+ if (FD_ISSET(lmgmt->ccom->reliable_server_fd, &fdlist)) {
/* Reliable(TCP) request */
int clilen = sizeof(cli_addr);
int req_fd = mgmt_accept(lmgmt->ccom->reliable_server_fd, (struct sockaddr *) &cli_addr, &clilen);
@@ -442,8 +479,10 @@ ClusterCom::ClusterCom(unsigned long oip, char *host, int mcport, char *group, i
peers = ink_hash_table_create(InkHashTableKeyType_String);
mismatchLog = ink_hash_table_create(InkHashTableKeyType_String);
- if (cluster_type != NO_CLUSTER)
+ if (cluster_type != NO_CLUSTER) {
+ ink_thread_create(drainIncomingChannel_broadcast, 0); /* Spin drainer thread */
ink_thread_create(drainIncomingChannel, 0); /* Spin drainer thread */
+ }
return;
} /* End ClusterCom::ClusterCom */
[12/20] git commit: Added TS-2144.
Posted by zw...@apache.org.
Added TS-2144.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f3fa606a
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f3fa606a
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f3fa606a
Branch: refs/heads/5.0.x
Commit: f3fa606a0801d22357edfc724152aab60e7d7d07
Parents: b5edc06
Author: Leif Hedstrom <zw...@apache.org>
Authored: Fri Sep 13 10:45:50 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Fri Sep 13 10:45:50 2013 -0600
----------------------------------------------------------------------
CHANGES | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f3fa606a/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 5887a64..e9c056d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 4.1.0
+ *) [TS-2144] Avoid race on e.g. "traffic_server -Cclear" which would crash
+ the process intermittently.
+
*) [TS-2217] remove the option to turn off body factory - setting it to 0 will
result in empty responses
[07/20] git commit: TS-2187: Fix return in EventNotify::wait()
Posted by zw...@apache.org.
TS-2187: Fix return in EventNotify::wait()
Signed-off-by: Yunkai Zhang <qi...@taobao.com>
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/2e4ee7be
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/2e4ee7be
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/2e4ee7be
Branch: refs/heads/5.0.x
Commit: 2e4ee7be37a06c5c005c0eac5533088319457d95
Parents: 9a6fc2a
Author: Yunkai Zhang <qi...@taobao.com>
Authored: Wed Sep 11 15:28:03 2013 +0800
Committer: Yunkai Zhang <qi...@taobao.com>
Committed: Wed Sep 11 15:29:02 2013 +0800
----------------------------------------------------------------------
lib/ts/EventNotify.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2e4ee7be/lib/ts/EventNotify.cc
----------------------------------------------------------------------
diff --git a/lib/ts/EventNotify.cc b/lib/ts/EventNotify.cc
index feb9ad8..c838f9b 100644
--- a/lib/ts/EventNotify.cc
+++ b/lib/ts/EventNotify.cc
@@ -104,7 +104,8 @@ EventNotify::wait(void)
else
return errno;
#else
- return ink_cond_wait(&m_cond, &m_mutex);
+ ink_cond_wait(&m_cond, &m_mutex);
+ return 0;
#endif
}
[08/20] git commit: TS-2209 add support for lowercasing all
substitutions in regex_remap
Posted by zw...@apache.org.
TS-2209 add support for lowercasing all substitutions in regex_remap
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/2c0ea4e4
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/2c0ea4e4
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/2c0ea4e4
Branch: refs/heads/5.0.x
Commit: 2c0ea4e4805343c06b61ccec224e0b0d671ac260
Parents: 2e4ee7b
Author: Bryan Call <bc...@apache.org>
Authored: Wed Sep 11 16:35:33 2013 -0700
Committer: Bryan Call <bc...@apache.org>
Committed: Wed Sep 11 16:35:33 2013 -0700
----------------------------------------------------------------------
plugins/regex_remap/README | 11 ++++++-----
plugins/regex_remap/regex_remap.cc | 35 +++++++++++++++++++++------------
2 files changed, 28 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2c0ea4e4/plugins/regex_remap/README
----------------------------------------------------------------------
diff --git a/plugins/regex_remap/README b/plugins/regex_remap/README
index d2e0c3c..2a98102 100644
--- a/plugins/regex_remap/README
+++ b/plugins/regex_remap/README
@@ -100,11 +100,12 @@ on the right hand side:
You can also provide options, similar to how you configure your
remap.config. The following options are available
- @status=<nnn> - Force the response code to <nnn>
- @active_timeout=<nnn> - Active timeout (in ms)
- @no_activity_timeout=<nnn> - No activity timeout (in ms)
- @connect_timeout=<nnn> - Connect timeouts (in ms)
- @dns_timeout=<nnn> - Connect timeouts (in ms)
+ @status=<nnn> - Force the response code to <nnn>
+ @active_timeout=<nnn> - Active timeout (in ms)
+ @no_activity_timeout=<nnn> - No activity timeout (in ms)
+ @connect_timeout=<nnn> - Connect timeouts (in ms)
+ @dns_timeout=<nnn> - Connect timeouts (in ms)
+ @lowercase_substitutions=<0|1> - Turn on lowercasing all the substitutions
For example, this can be useful to force a particular response for some
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2c0ea4e4/plugins/regex_remap/regex_remap.cc
----------------------------------------------------------------------
diff --git a/plugins/regex_remap/regex_remap.cc b/plugins/regex_remap/regex_remap.cc
index 13955a1..63778d7 100644
--- a/plugins/regex_remap/regex_remap.cc
+++ b/plugins/regex_remap/regex_remap.cc
@@ -179,6 +179,9 @@ class RemapRegex
_connect_timeout = atoi(opt_val.c_str());
} else if (opt.compare(start, 11, "dns_timeout") == 0) {
_dns_timeout = atoi(opt_val.c_str());
+ } else if (opt.compare(start, 23, "lowercase_substitutions") == 0) {
+ _lowercase_substitutions = atoi(opt_val.c_str());
+ TSDebug(PLUGIN_NAME, "lowercasing %d", _lowercase_substitutions);
} else {
TSError("Unknown options: %s", opt.c_str());
}
@@ -379,7 +382,7 @@ class RemapRegex
// length of the string as written to dest (not including the trailing '0').
int
substitute(char dest[], const char *src, const int ovector[], const int lengths[],
- TSRemapRequestInfo *rri, UrlComponents *req_url)
+ TSRemapRequestInfo *rri, UrlComponents *req_url, bool lowercase_substitutions)
{
if (_num_subs > 0) {
char* p1 = dest;
@@ -387,6 +390,7 @@ class RemapRegex
int prev = 0;
for (int i=0; i < _num_subs; i++) {
+ char *start = p1;
int ix = _sub_ix[i];
memcpy(p1, p2, _sub_pos[i] - prev);
@@ -441,22 +445,20 @@ class RemapRegex
// If one of the rules fetched a read-only string, copy it in.
if (str && len > 0) {
memcpy(p1, str, len);
- if (ix == SUB_LOWER_PATH) {
- TSDebug(PLUGIN_NAME, "lowercasing url: %.*s", len, str);
- char *end = p1 + len;
- while (p1 <= end) {
- *p1 = tolower(*p1);
- p1++;
- }
- p1 = end;
- } else {
- p1 += len;
- }
+ p1 += len;
}
}
p2 += (_sub_pos[i] - prev + 2);
prev = _sub_pos[i] + 2;
+
+ if (lowercase_substitutions == true || ix == SUB_LOWER_PATH) {
+ while (start < p1) {
+ *start = tolower(*start);
+ start++;
+ }
+ }
}
+
memcpy(p1, p2, _subst_len - (p2 - _subst));
p1 += _subst_len - (p2 - _subst);
*p1 = 0; // Make sure it's NULL terminated (for safety).
@@ -489,6 +491,7 @@ class RemapRegex
inline int no_activity_timeout_option() const { return _no_activity_timeout; };
inline int connect_timeout_option() const { return _connect_timeout; };
inline int dns_timeout_option() const { return _dns_timeout; };
+ inline bool lowercase_substitutions_option() const { return _lowercase_substitutions; };
private:
char* _rex_string;
@@ -505,6 +508,7 @@ class RemapRegex
int _order;
TSHttpStatus _status;
bool _simple;
+ bool _lowercase_substitutions;
int _active_timeout;
int _no_activity_timeout;
int _connect_timeout;
@@ -838,6 +842,11 @@ TSRemapDoRemap(void* ih, TSHttpTxn txnp, TSRemapRequestInfo *rri)
TSDebug(PLUGIN_NAME, "Setting DNS timeout to %d", re->dns_timeout_option());
TSHttpTxnDNSTimeoutSet(txnp, re->dns_timeout_option());
}
+ bool lowercase_substitutions = false;
+ if (re->lowercase_substitutions_option() == true) {
+ TSDebug(PLUGIN_NAME, "Setting lowercasing substitutions on");
+ lowercase_substitutions = true;
+ }
// Update profiling if requested
if (ri->profile) {
@@ -849,7 +858,7 @@ TSRemapDoRemap(void* ih, TSHttpTxn txnp, TSRemapRequestInfo *rri)
char* dest;
dest = (char*)alloca(new_len+8);
- dest_len = re->substitute(dest, match_buf, ovector, lengths, rri, &req_url);
+ dest_len = re->substitute(dest, match_buf, ovector, lengths, rri, &req_url, lowercase_substitutions);
TSDebug(PLUGIN_NAME, "New URL is estimated to be %d bytes long, or less", new_len);
TSDebug(PLUGIN_NAME, "New URL is %s (length %d)", dest, dest_len);
[03/20] git commit: TS-2207: stop using $(builddir) in automake
Posted by zw...@apache.org.
TS-2207: stop using $(builddir) in automake
Older automake (< 1.9?) doesn't emit $(builddir), but it's always
"." anyway, so let's use that instead.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/00b88565
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/00b88565
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/00b88565
Branch: refs/heads/5.0.x
Commit: 00b8856578ec733ae7dea76ade43efe44b6a8e69
Parents: a6067e1
Author: James Peach <jp...@apache.org>
Authored: Tue Sep 10 09:20:27 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Tue Sep 10 09:21:42 2013 -0700
----------------------------------------------------------------------
lib/tsconfig/Makefile.am | 2 +-
proxy/Makefile.am | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/00b88565/lib/tsconfig/Makefile.am
----------------------------------------------------------------------
diff --git a/lib/tsconfig/Makefile.am b/lib/tsconfig/Makefile.am
index dde552f..4e33c6c 100644
--- a/lib/tsconfig/Makefile.am
+++ b/lib/tsconfig/Makefile.am
@@ -53,4 +53,4 @@ test_tsconfig_LDADD = libtsconfig.la ../ts/libtsutil.la
# Strip to just the enum in the ts::config namespace so we can use
# it more easily in C++.
TsConfigGrammar.hpp: TsConfigGrammar.h BisonHeaderToC++.sed
- $(SED) -f $(srcdir)/BisonHeaderToC++.sed $(builddir)/TsConfigGrammar.h > $@
+ $(SED) -f $(srcdir)/BisonHeaderToC++.sed TsConfigGrammar.h > $@
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/00b88565/proxy/Makefile.am
----------------------------------------------------------------------
diff --git a/proxy/Makefile.am b/proxy/Makefile.am
index d26227e..2565100 100644
--- a/proxy/Makefile.am
+++ b/proxy/Makefile.am
@@ -50,8 +50,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/mgmt/preparse \
-I$(top_srcdir)/mgmt/utils \
-I$(srcdir)/api/ts \
- -I$(builddir) \
- -I$(builddir)/api/ts \
+ -I. \
+ -I./api/ts \
-I$(top_srcdir)/lib
noinst_HEADERS = \
[13/20] git commit: Update docs for the header_rewrite plugin
Posted by zw...@apache.org.
Update docs for the header_rewrite plugin
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4fab19a1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4fab19a1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4fab19a1
Branch: refs/heads/5.0.x
Commit: 4fab19a1ad865e231849e1417f32177b853f9332
Parents: f3fa606
Author: Leif Hedstrom <le...@ogre.com>
Authored: Fri Sep 13 17:38:29 2013 -0600
Committer: Leif Hedstrom <le...@ogre.com>
Committed: Fri Sep 13 17:38:29 2013 -0600
----------------------------------------------------------------------
plugins/header_rewrite/README | 88 +++++++++++++++------
plugins/header_rewrite/header_rewrite.config | 94 -----------------------
2 files changed, 66 insertions(+), 116 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4fab19a1/plugins/header_rewrite/README
----------------------------------------------------------------------
diff --git a/plugins/header_rewrite/README b/plugins/header_rewrite/README
index df8165f..ed6eeb0 100644
--- a/plugins/header_rewrite/README
+++ b/plugins/header_rewrite/README
@@ -8,16 +8,16 @@ Note that currently only static string "values" are supported. We'll add
advanced features to allow for expansions in a future release.
-Operations
-----------
+Operators
+---------
+The following operators are available:
rm-header header-name [flags]
- add-header header "string" [flags]
- set-status status-code [flags]
- set-status-reason reason-string [flags]
+ add-header header <value> [flags]
+ set-status <status-code> [flags]
+ set-status-reason <value> [flags]
no-op [flags]
-
The following operator(s) currently only works when instantiating the
plugin as a remap plugin:
@@ -36,24 +36,41 @@ For example (as a remap rule):
set-destination HOST foo.mobile.bar.com [L]
-
-Operation flags
----------------
+Operator flags
+--------------
[L] Last rule, do not continue
Conditions
----------
-
- cond %{STATUS} operand [flags]
- cond %{RANDOM:nn} operand [flags]
- cond %{ACCESS:file} [flags]
- cond %{TRUE} [flags]
- cond %{FALSE} [flags]
- cond %{HEADER:header-name} [flags]
-
-
-These conditions have to be first in a ruleset, and you can only have one:
+The conditions are used as qualifiers: The operators specified will
+only be evaluated if the condition(s) are met.
+
+ cond %{STATUS} operand [flags]
+ cond %{RANDOM:nn} operand [flags]
+ cond %{ACCESS:file} [flags]
+ cond %{TRUE} [flags]
+ cond %{FALSE} [flags]
+ cond %{HEADER:header-name} operand [flags]
+ cond %{CLIENT-HEADER:header-name} operand [flags]
+ cond %{METHOD} operand [flags]
+ cond %{PROTOCOL} operand [flags]
+ cond %{PORT} operand [flags]
+ cond %{HOST} operand [flags]
+ cond %{TOHOST} operand [false]
+ cond %{FROMHOST} operand [false]
+ cond %{PATH} operand [false]
+ cond %{PARAMS} operand [false]
+ cond %{QUERY} operand [false]
+
+
+The difference between HEADER and CLIENT-HEADER is that HEADER adapts to the
+hook it's running in, whereas CLIENT-HEADER always applies to the client
+request header. The %{TRUE} condition is also the default condition if no
+other conditions are specified.
+
+These conditions have to be first in a ruleset, and you can only have one in
+each rule. This implies that a new hook condition starts a new rule as well.
cond %{READ_RESPONSE_HDR_HOOK} (this is the default hook)
cond %{READ_REQUEST_HDR_HOOK}
@@ -63,6 +80,7 @@ These conditions have to be first in a ruleset, and you can only have one:
Condition flags
---------------
+ [NC] Not ase sensitive condition (when applicable)
[AND] AND with next condition (default)
[OR] OR with next condition
[NOT] Invert this condition
@@ -70,9 +88,35 @@ Condition flags
Operands to conditions
----------------------
- =val Lexically equal
- <val Lexically less then
- >val Lexically greater then
+ /string/ # regular expression
+ <string # lexically lower
+ >string # lexically greater
+ =string # lexically equal
+
+The absense of a "matcher" means value exists).
+
+
+Values
+------
+Setting e.g. a header with a value can take the following formats:
+
+ - Any of the cond definitions, that extracts a value from the request
+ - $N 0 <= N <= 9, as grouped in a regular expression
+ - string (which can contain the above)
+ - null
+
+
+Examples
+--------
+
+cond %{HEADER:X-Y-Foobar}
+cond %{METHOD} =GET [OR]
+cond %{METHOD} =POST
+set-header X-Y-Fiefum %{HEADER:X-Y-Foobar}
+rm-header X-Y-Foobar
+rm-header Set-Cookie
+
+cond %{HEADER:X-Y-Foobar} "Some string" [AND,NC]
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4fab19a1/plugins/header_rewrite/header_rewrite.config
----------------------------------------------------------------------
diff --git a/plugins/header_rewrite/header_rewrite.config b/plugins/header_rewrite/header_rewrite.config
deleted file mode 100644
index 2b83d1a..0000000
--- a/plugins/header_rewrite/header_rewrite.config
+++ /dev/null
@@ -1,94 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-Operators
----------
-rm-header Header matcher
-add-header Header value
-set-header Header value
-
-set-status value
-set-status-reason value
-
-
-Conditions
------------
-%{TRUE} # Default condition if none specified
-%{FALSE}
-%{HEADER:string}
-%{YCOOKIE:id}
-%{METHOD}
-%{PROTOCOL}
-%{PORT}
-%{HOST}
-%{TOHOST}
-%{FROMHOST}
-%{PATH}
-%{PARAMS}
-%{QUERY}
-%{STATUS}
-
-# These can only be used as the first condition of a new ruleset,
-# and have no run-time evaluation effects (only config parse time).
-%{READ_RESPONSE_HDR_HOOK} # Default
-%{READ_REQUEST_HDR_HOOK}
-
-
-Operator Flags
---------------
-L # Last rule (stop evaluations)
-
-
-Cond Flags
-----------
-NC # Not case sensitive condition (when applicable)
-NOT # Negate the cond
-OR # Local OR between conds
-AND # Logical AND betwen conds
-
-
-Matcher
---------
-
-/string/ # regular expression
-<string # lexically lower
->string # lexically greater
-=string # lexically equal
-
-(The absense of a "matcher" means value exists).
-
-
-Values
-------
-
-Any of the cond definitions, that extracts a value from the request
-$N 0 <= N <= 9, as grouped in a regular expression
-string (which can contain the above)
-null
-
-
-Examples
---------
-
-cond %{HEADER:X-Y-Foobar}
-cond %{METHOD} =GET [OR]
-cond %{METHOD} =POST
-set-header X-Y-Fiefum %{HEADER:X-Y-Foobar}
-rm-header X-Y-Foobar
-rm-header Set-Cookie
-
-cond %{HEADER:X-Y-Foobar} "Some string" [AND,NC]
[05/20] git commit: ci: all centos versions have redhat-lsb
Posted by zw...@apache.org.
ci: all centos versions have redhat-lsb
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/40212d2d
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/40212d2d
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/40212d2d
Branch: refs/heads/5.0.x
Commit: 40212d2d1f13e9082807a6b4535083093ce36be4
Parents: b6e2132
Author: James Peach <jp...@apache.org>
Authored: Tue Sep 10 13:40:40 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Tue Sep 10 13:40:47 2013 -0700
----------------------------------------------------------------------
contrib/manifests/redhat.pp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/40212d2d/contrib/manifests/redhat.pp
----------------------------------------------------------------------
diff --git a/contrib/manifests/redhat.pp b/contrib/manifests/redhat.pp
index f1c1bfd..b80374b 100644
--- a/contrib/manifests/redhat.pp
+++ b/contrib/manifests/redhat.pp
@@ -15,7 +15,7 @@
# limitations under the License.
# These packages really need to be installed before anything happens.
-package {['nfs-utils', 'redhat-lsb-core']:
+package {['nfs-utils', 'redhat-lsb']:
ensure =>latest
}
[02/20] git commit: TS-2206 The trafficserver RC script does not use
absolute path to traffic_line binary.
Posted by zw...@apache.org.
TS-2206 The trafficserver RC script does not use absolute path to
traffic_line binary.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a6067e19
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a6067e19
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a6067e19
Branch: refs/heads/5.0.x
Commit: a6067e19b3f2fe8daa5f8f9509ec11f243c4c60c
Parents: 632b3a4
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Sep 10 10:08:14 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Sep 10 10:08:14 2013 -0600
----------------------------------------------------------------------
CHANGES | 3 +++
rc/trafficserver.in | 12 ++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a6067e19/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 20e1ef9..d042183 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 4.1.0
+ *) [TS-2206] The trafficserver RC script does not use absolute path to
+ traffic_line binary.
+
*) [TS-2207] CentOS5 out of tree perl module build fails.
*) [TS-1637] Fix nodes as idle/dead if we have not heard from them in awhile
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a6067e19/rc/trafficserver.in
----------------------------------------------------------------------
diff --git a/rc/trafficserver.in b/rc/trafficserver.in
index 597c7a9..5e1d0a4 100644
--- a/rc/trafficserver.in
+++ b/rc/trafficserver.in
@@ -103,13 +103,13 @@ eval TS_BASE="`echo $TS_ROOT | ${ESED} -e 's;@prefix@$;;'`"
TC_NAME=${TC_NAME:-traffic_cop}
TM_NAME=${TM_NAME:-traffic_manager}
TS_NAME=${TS_NAME:-traffic_server}
-TL_NAME=${TL_NAME:-traffic_line}
TC_DAEMON=${TC_DAEMON:-$TS_BASE@exp_bindir@/traffic_cop}
TC_DAEMON_ARGS=""
TM_DAEMON=${TM_DAEMON:-$TS_BASE@exp_bindir@/traffic_manager}
TM_DAEMON_ARGS=""
TS_DAEMON=${TS_DAEMON:-$TS_BASE@exp_bindir@/traffic_server}
TS_DAEMON_ARGS=""
+TL_BINARY=${TL_BINARY:-$TS_BASE@exp_bindir@/traffic_line}
TC_PIDFILE=${TC_PIDFILE:-$TS_BASE@exp_runtimedir@/cop.lock}
TM_PIDFILE=${TM_PIDFILE:-$TS_BASE@exp_runtimedir@/manager.lock}
TS_PIDFILE=${TS_PIDFILE:-$TS_BASE@exp_runtimedir@/server.lock}
@@ -346,22 +346,22 @@ case "$1" in
if [ "$DISTRIB_ID" = "ubuntu" -o "$DISTRIB_ID" = "debian" ] ; then
test "x$VERBOSE" != "xno" && log_daemon_msg "Reloading ${NAME}:"
retval=0
- $TL_NAME -x
+ $TL_BINARY -x
test "$?" -ne 0 -a "$?" -ne 1 && retval=1
test "x$VERBOSE" != "xno" && log_daemon_msg "$retval"
exit "$retval"
elif [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then
- action "Reloading ${NAME}:" $TL_NAME -x
+ action "Reloading ${NAME}:" $TL_BINARY -x
elif [ "$DISTRIB_ID" = "suse" ]; then
echo -n "Reloading ${NAME}"
- $TL_NAME -x
+ $TL_BINARY -x
rc_status -v
elif [ "$DISTRIB_ID" = "Darwin" ]; then
echo "Reloading ${NAME}"
- $TL_NAME -x
+ $TL_BINARY -x
elif [ "$DISTRIB_ID" = "FreeBSD" ]; then
echo "Reloading ${NAME}"
- $TL_NAME -x
+ $TL_BINARY -x
else
echo "This script needs to be ported to this OS"
exit 1
[04/20] git commit: Fixed indentation
Posted by zw...@apache.org.
Fixed indentation
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/b6e21320
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/b6e21320
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/b6e21320
Branch: refs/heads/5.0.x
Commit: b6e21320a4ab8466f4ac3c959dcd5bf03ab4bd0a
Parents: 00b8856
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Sep 10 14:19:30 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Sep 10 14:19:30 2013 -0600
----------------------------------------------------------------------
proxy/logging/LogFilter.cc | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b6e21320/proxy/logging/LogFilter.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogFilter.cc b/proxy/logging/LogFilter.cc
index 359ed0b..aada40a 100644
--- a/proxy/logging/LogFilter.cc
+++ b/proxy/logging/LogFilter.cc
@@ -565,10 +565,9 @@ LogFilterList::~LogFilterList()
bool LogFilterList::operator==(LogFilterList & rhs)
{
if (m_does_conjunction == rhs.does_conjunction()) {
- LogFilter *
- f = first();
- LogFilter *
- rhsf = rhs.first();
+ LogFilter *f = first();
+ LogFilter *rhsf = rhs.first();
+
while (true) {
if (!(f || rhsf)) {
return true;
[15/20] git commit: TS-2187: 'nr' set but not used in
EventNotify::signal()
Posted by zw...@apache.org.
TS-2187: 'nr' set but not used in EventNotify::signal()
Signed-off-by: Yunkai Zhang <qi...@taobao.com>
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f47c6be3
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f47c6be3
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f47c6be3
Branch: refs/heads/5.0.x
Commit: f47c6be30ee7217ec74943d1cd78b3ef84aedce4
Parents: 93184bb
Author: Yunkai Zhang <qi...@taobao.com>
Authored: Sun Sep 15 16:16:46 2013 +0800
Committer: Yunkai Zhang <qi...@taobao.com>
Committed: Sun Sep 15 16:21:59 2013 +0800
----------------------------------------------------------------------
lib/ts/EventNotify.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f47c6be3/lib/ts/EventNotify.cc
----------------------------------------------------------------------
diff --git a/lib/ts/EventNotify.cc b/lib/ts/EventNotify.cc
index c838f9b..9ee0592 100644
--- a/lib/ts/EventNotify.cc
+++ b/lib/ts/EventNotify.cc
@@ -70,14 +70,13 @@ void
EventNotify::signal(void)
{
#ifdef HAVE_EVENTFD
- ssize_t nr;
uint64_t value = 1;
//
// If the addition would cause the counter’s value of eventfd
// to exceed the maximum, write() will fail with the errno EAGAIN,
// which is acceptable as the receiver will be notified eventually.
//
- nr = write(m_event_fd, &value, sizeof(uint64_t));
+ write(m_event_fd, &value, sizeof(uint64_t));
#else
ink_cond_signal(&m_cond);
#endif
[10/20] git commit: TS-2217: remove the option to turn off body
factory - setting it to 0 will result in empty responses
Posted by zw...@apache.org.
TS-2217: remove the option to turn off body factory - setting it to 0
will result in empty responses
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/cb9e4b51
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/cb9e4b51
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/cb9e4b51
Branch: refs/heads/5.0.x
Commit: cb9e4b517679f925c661bb995dcdcdb274fb44bb
Parents: 9e9569f
Author: Bryan Call <bc...@apache.org>
Authored: Thu Sep 12 17:03:07 2013 -0700
Committer: Bryan Call <bc...@apache.org>
Committed: Thu Sep 12 17:03:07 2013 -0700
----------------------------------------------------------------------
CHANGES | 3 +++
mgmt/RecordsConfig.cc | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb9e4b51/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index fa97bfc..5887a64 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 4.1.0
+ *) [TS-2217] remove the option to turn off body factory - setting it to 0 will
+ result in empty responses
+
*) [TS-2209] add support for lowercasing all substitutions in regex_remap
*) [TS-2187] failed assert `nr == sizeof(uint64_t)` in EventNotify::signal()
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb9e4b51/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 201216d..4a73f19 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -706,10 +706,10 @@ RecordElement RecordsConfig[] = {
//# Customizable User Response Pages
//#
//##############################################################################
- //# 0 - turn off customizable user response pages
//# 1 - enable customizable user response pages in only the "default" directory
//# 2 - enable language-targeted user response pages
- {RECT_CONFIG, "proxy.config.body_factory.enable_customizations", RECD_INT, "1", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-2]", RECA_NULL}
+ {RECT_CONFIG, "proxy.config.body_factory.enable_customizations", RECD_INT, "1", RECU_RESTART_TS, RR_NULL, RECC_INT,
+ "[1-2]", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.body_factory.enable_logging", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
,
[20/20] git commit: Merge remote-tracking branch 'origin/master' into
5.0.x
Posted by zw...@apache.org.
Merge remote-tracking branch 'origin/master' into 5.0.x
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4ab334d3
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4ab334d3
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4ab334d3
Branch: refs/heads/5.0.x
Commit: 4ab334d3a360d722c1e9561832c1b16b7b90764a
Parents: d277494 27246a5
Author: Leif Hedstrom <zw...@apache.org>
Authored: Mon Sep 23 13:51:59 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Sep 23 13:51:59 2013 -0600
----------------------------------------------------------------------
CHANGES | 20 ++++
Vagrantfile | 7 +-
contrib/manifests/debian.pp | 9 ++
contrib/manifests/redhat.pp | 2 +-
lib/perl/Makefile.am | 4 +-
lib/ts/EventNotify.cc | 44 ++++++---
lib/ts/EventNotify.h | 2 +-
lib/tsconfig/Makefile.am | 2 +-
mgmt/RecordsConfig.cc | 4 +-
mgmt/cluster/ClusterCom.cc | 109 +++++++++++++++-------
plugins/header_rewrite/Examples/Force-close | 2 +-
plugins/header_rewrite/README | 88 ++++++++++++-----
plugins/header_rewrite/header_rewrite.config | 94 -------------------
plugins/regex_remap/README | 11 ++-
plugins/regex_remap/regex_remap.cc | 35 ++++---
proxy/Main.cc | 8 +-
proxy/Makefile.am | 4 +-
proxy/api/ts/ts.h.in | 2 +-
proxy/logging/LogConfig.cc | 2 +-
proxy/logging/LogFile.cc | 2 +-
proxy/logging/LogFilter.cc | 7 +-
rc/trafficserver.in | 12 +--
22 files changed, 260 insertions(+), 210 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4ab334d3/CHANGES
----------------------------------------------------------------------
diff --cc CHANGES
index 3d1f7a7,510dc08..85e5487
--- a/CHANGES
+++ b/CHANGES
@@@ -1,12 -1,26 +1,32 @@@
-*- coding: utf-8 -*-
+Changes with Apache Traffic Server 5.0.0
+
+ *) [TS-1919] Eliminate CacheLookupHttpConfig. This breaks cluster
+ compatibility, so all cluster nodes should be upgraded simultaneously.
+
+
Changes with Apache Traffic Server 4.1.0
+ *) TS-2232: log level should be change from Status to Debug.
+ Author: Yu Qing <zh...@taobao.com>
+
+ *) [TS-2201] split drainIncomingChannel two thread, one handle Broadcast message and other handle Reliable(TCP)
+ request for supporing large cluster.
+
+ *) [TS-2144] Avoid race on e.g. "traffic_server -Cclear" which would crash
+ the process intermittently.
+
+ *) [TS-2217] remove the option to turn off body factory - setting it to 0 will
+ result in empty responses
+
+ *) [TS-2209] add support for lowercasing all substitutions in regex_remap
+
+ *) [TS-2187] failed assert `nr == sizeof(uint64_t)` in EventNotify::signal()
+
+ *) [TS-2206] The trafficserver RC script does not use absolute path to
+ traffic_line binary.
+
+ *) [TS-2207] CentOS5 out of tree perl module build fails.
*) [TS-1637] Fix nodes as idle/dead if we have not heard from them in awhile