This is an automated email from the ASF dual-hosted git repository.
dmeden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 89e733a6f9 Clean up some leftovers from the alarms removal. (#10145)
89e733a6f9 is described below
commit 89e733a6f9148788bbf9c61eb67bfb8db4acb411
Author: Damian Meden <[email protected]>
AuthorDate: Mon Aug 7 12:59:17 2023 +0200
Clean up some leftovers from the alarms removal. (#10145)
Removes some unused records and their respective documentation.
---
doc/admin-guide/files/records.yaml.en.rst | 16 -----
proxy/example_alarm_bin.sh | 71 ----------------------
src/records/RecordsConfig.cc | 15 -----
tests/gold_tests/records/gold/full_records.yaml | 4 --
.../records/legacy_config/full_records.config | 3 -
5 files changed, 109 deletions(-)
diff --git a/doc/admin-guide/files/records.yaml.en.rst
b/doc/admin-guide/files/records.yaml.en.rst
index 78fbecb565..12e9916cbe 100644
--- a/doc/admin-guide/files/records.yaml.en.rst
+++ b/doc/admin-guide/files/records.yaml.en.rst
@@ -659,22 +659,6 @@ Management
This is now deprecated, please refer to :ref:`admin-jsonrpc-configuration`
to find
out about the new admin API mechanism.
-Alarm Configuration
-===================
-
-.. ts:cv:: CONFIG proxy.config.alarm.abs_path STRING NULL
- :reloadable:
-
- The absolute path to the directory containing the alarm script.
- If this is not set, the script will be located relative to
- :ts:cv:`proxy.config.bin_path`.
-
-.. ts:cv:: CONFIG proxy.config.alarm.script_runtime INT 5
- :reloadable:
-
- The number of seconds that |TS| allows the alarm script
- to run before aborting it.
-
HTTP Engine
===========
diff --git a/proxy/example_alarm_bin.sh b/proxy/example_alarm_bin.sh
deleted file mode 100644
index b22a6d4408..0000000000
--- a/proxy/example_alarm_bin.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-#
-# Example alarm bin program. Proxy manager execs this script with
-# a brief message as its argument. This program sends mail to the
-# e-mail address passed in by the caller. The subject of the
-# e-mail is the passed in message, and a 'date' stamp is added
-# as the body.
-#
-ostype=`(uname -s) 2>/dev/null`
-if [ "$ostype" = "Linux" ]; then
-SENDMAIL="/usr/sbin/sendmail"
-else
- SENDMAIL="/usr/lib/sendmail"
-fi
-
-if [ ! -x $SENDMAIL ]; then
- echo "$0: Could not find $SENDMAIL program"
- exit 1
-fi
-
-if [ $# -eq 1 ]; then
- # if only one parameter, then no email information was provided
- msg="`hostname` $1"
- echo
- echo "[example_alarm_bin.sh] no e-mail sent: $msg"
- echo
- exit 0
-
-elif [ $# -eq 4 ]; then
- # if four parameters, the caller specified email information
- msg="`hostname` $1"
- email_from_name=$2
- email_from_addr=$3
- email_to_addr=$4
-
- result=`(echo "From: $email_from_name <$email_from_addr>"; echo "To:
$email_to_addr"; echo "Subject: $msg"; echo; date) | $SENDMAIL -bm
$email_to_addr`
- if [ "$result" = "" ]; then
- echo
- echo "[example_alarm_bin.sh] sent alarm: $msg";
- echo
- exit 0
- else
- echo
- echo "[example_alarm_bin.sh] sendmail failed"
- echo
- exit 1
- fi
-
-else
- # give a little help
- echo "Usage: example_alarm_bin.sh <message> [<email_from_name>
<email_from_addr> <email_to_addr>]"
- exit
-
-fi
diff --git a/src/records/RecordsConfig.cc b/src/records/RecordsConfig.cc
index 65a00a6b02..e4ba16f3cd 100644
--- a/src/records/RecordsConfig.cc
+++ b/src/records/RecordsConfig.cc
@@ -262,21 +262,6 @@ static const RecordElement RecordsConfig[] =
,
{RECT_CONFIG, "proxy.config.udp.enable_gro", RECD_INT, "1", RECU_NULL,
RR_NULL, RECC_NULL, nullptr, RECA_NULL}
,
-
//##############################################################################
- //#
- //# Alarm Configuration
- //#
-
//##############################################################################
- // #################################################################
- // # execute alarm as "<abs_path>/<bin> "<MSG_STRING_FROM_PROXY>"" #
- // #################################################################
- {RECT_CONFIG, "proxy.config.alarm.bin", RECD_STRING, "example_alarm_bin.sh",
RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.alarm.abs_path", RECD_STRING, nullptr,
RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
- {RECT_CONFIG, "proxy.config.alarm.script_runtime", RECD_INT, "5",
RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-300]", RECA_NULL}
- ,
-
// ###########
// # Parsing #
// ###########
diff --git a/tests/gold_tests/records/gold/full_records.yaml
b/tests/gold_tests/records/gold/full_records.yaml
index fea30087db..99ca0dfe93 100644
--- a/tests/gold_tests/records/gold/full_records.yaml
+++ b/tests/gold_tests/records/gold/full_records.yaml
@@ -1,9 +1,5 @@
ts:
accept_threads: 1
- alarm:
- abs_path: nullpt
- bin: example_alarm_bin.sh
- script_runtime: 5
allocator:
dontdump_iobuffers: 1
hugepages: 0
diff --git a/tests/gold_tests/records/legacy_config/full_records.config
b/tests/gold_tests/records/legacy_config/full_records.config
index fe80a459e1..c2e467f740 100644
--- a/tests/gold_tests/records/legacy_config/full_records.config
+++ b/tests/gold_tests/records/legacy_config/full_records.config
@@ -65,9 +65,6 @@ CONFIG proxy.config.udp.periodic_cleanup INT 10
CONFIG proxy.config.udp.send_retries INT 0
CONFIG proxy.config.udp.threads INT 0
CONFIG proxy.config.udp.enable_gso INT 0
-CONFIG proxy.config.alarm.bin STRING example_alarm_bin.sh
-CONFIG proxy.config.alarm.abs_path STRING nullpt
-CONFIG proxy.config.alarm.script_runtime INT 5
CONFIG proxy.config.http.allow_half_open INT 1
CONFIG proxy.config.http.enabled INT 1
CONFIG proxy.config.http.server_ports STRING 80