trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [trafficserver] 03/03: Renumbers all the alarm codes / defines
Date Thu, 16 May 2019 02:03:04 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 5400e5aa02dd5e0315aa348c260a8ea0f57b5f21
Author: Leif Hedstrom <zwoop@apache.org>
AuthorDate: Mon May 13 15:58:22 2019 -0600

    Renumbers all the alarm codes / defines
---
 lib/records/I_RecAlarms.h  | 22 +++++++---------------
 lib/records/I_RecSignals.h | 27 ++++++++++++---------------
 mgmt/Alarms.cc             | 24 +++++++++---------------
 mgmt/Alarms.h              | 21 +++++++--------------
 mgmt/BaseManager.h         | 30 +++++++++++++-----------------
 mgmt/api/CoreAPIShared.cc  |  3 ---
 mgmt/api/CoreAPIShared.h   | 22 +++++++---------------
 7 files changed, 55 insertions(+), 94 deletions(-)

diff --git a/lib/records/I_RecAlarms.h b/lib/records/I_RecAlarms.h
index a3dc5b8..f4843c9 100644
--- a/lib/records/I_RecAlarms.h
+++ b/lib/records/I_RecAlarms.h
@@ -28,18 +28,10 @@
 
 #define REC_ALARM_PROXY_PROCESS_DIED 1
 #define REC_ALARM_PROXY_PROCESS_BORN 2
-// Currently unused: 3
-// Currently unused: 4
-#define REC_ALARM_PROXY_CONFIG_ERROR 5
-#define REC_ALARM_PROXY_SYSTEM_ERROR 6
-// Currently unused: 7
-#define REC_ALARM_PROXY_CACHE_ERROR 8
-#define REC_ALARM_PROXY_CACHE_WARNING 9
-#define REC_ALARM_PROXY_LOGGING_ERROR 10
-#define REC_ALARM_PROXY_LOGGING_WARNING 11
-// Currently unused: 12
-// Currently unused: 13
-#define REC_ALARM_CONFIG_UPDATE_FAILED 14
-// Currently unused: 15
-// Currently unused: 16
-#define REC_ALARM_REC_CONFIG_ERROR 17
+#define REC_ALARM_PROXY_CONFIG_ERROR 3
+#define REC_ALARM_PROXY_SYSTEM_ERROR 4
+#define REC_ALARM_PROXY_CACHE_ERROR 5
+#define REC_ALARM_PROXY_CACHE_WARNING 6
+#define REC_ALARM_PROXY_LOGGING_ERROR 7
+#define REC_ALARM_PROXY_LOGGING_WARNING 8
+#define REC_ALARM_CONFIG_UPDATE_FAILED 9
diff --git a/lib/records/I_RecSignals.h b/lib/records/I_RecSignals.h
index 69d72bb..2f1d5ab 100644
--- a/lib/records/I_RecSignals.h
+++ b/lib/records/I_RecSignals.h
@@ -24,21 +24,18 @@
 #pragma once
 
 // copy from mgmt/BaseManager.h
-
 #define REC_SIGNAL_PID 0
-// Currently unused: 1
-// Currently unused: 2
+
+#define REC_SIGNAL_PROXY_PROCESS_DIED 1
+#define REC_SIGNAL_PROXY_PROCESS_BORN 2
 #define REC_SIGNAL_CONFIG_ERROR 3
 #define REC_SIGNAL_SYSTEM_ERROR 4
-// Currently unused: 5
-// Currently unused: 6
-#define REC_SIGNAL_CACHE_ERROR 7
-#define REC_SIGNAL_CACHE_WARNING 8
-#define REC_SIGNAL_LOGGING_ERROR 9
-#define REC_SIGNAL_LOGGING_WARNING 10
-// Currently unused: 11 - 13
-#define REC_SIGNAL_PLUGIN_SET_CONFIG 14
-// Currently unused: 15
-#define REC_SIGNAL_LIBRECORDS 16
-// Currently unused: 17 - 21
-#define REC_SIGNAL_CONFIG_FILE_CHILD 22
+#define REC_SIGNAL_CACHE_ERROR 5
+#define REC_SIGNAL_CACHE_WARNING 6
+#define REC_SIGNAL_LOGGING_ERROR 7
+#define REC_SIGNAL_LOGGING_WARNING 8
+#define REC_SIGNAL_PLUGIN_SET_CONFIG 9
+
+// This are additional on top of the ones defined in Alarms.h. Que?
+#define REC_SIGNAL_LIBRECORDS 10
+#define REC_SIGNAL_CONFIG_FILE_CHILD 11
diff --git a/mgmt/Alarms.cc b/mgmt/Alarms.cc
index 839d1fd..0d9752c 100644
--- a/mgmt/Alarms.cc
+++ b/mgmt/Alarms.cc
@@ -34,21 +34,15 @@ const char *alarmText[] = {
   "Unknown Alarm",                                        // 0
   "[TrafficManager] Traffic Server process was reset.",   // 1
   "[TrafficManager] Traffic Server process established.", // 2
-  "",                                                     // 3
-  "",                                                     // 4
-  "Invalid Configuration",                                // 5
-  "System Error",                                         // 6
-  "",                                                     // 7
-  "Cache Error",                                          // 8
-  "Cache Warning",                                        // 9
-  "Logging Error",                                        // 10
-  "Logging Warning",                                      // 11
-  "",                                                     // 12
-  "",                                                     // 13
-  "Alarms configuration update failed",                   // 14
-  "Ping Failure",                                         // 15
-  "",                                                     // 16
-  "Alarms configuration error",                           // 17
+  "Invalid Configuration",                                // 3
+  "System Error",                                         // 4
+  "Cache Error",                                          // 5
+  "Cache Warning",                                        // 6
+  "Logging Error",                                        // 7
+  "Logging Warning",                                      // 8
+  "Alarms configuration update failed",                   // 9
+  "Librecords",                                           // 10 (unclear if needed / used)
+  "Plugin set configuration",                             // 11 (unclear if needed / used)
 };
 
 const int alarmTextNum = sizeof(alarmText) / sizeof(char *);
diff --git a/mgmt/Alarms.h b/mgmt/Alarms.h
index e861a45..6e65e71 100644
--- a/mgmt/Alarms.h
+++ b/mgmt/Alarms.h
@@ -44,20 +44,13 @@ class AppVersionInfo;
 
 #define MGMT_ALARM_PROXY_PROCESS_DIED 1
 #define MGMT_ALARM_PROXY_PROCESS_BORN 2
-// Currently unused: 3
-// Currently unused: 4
-#define MGMT_ALARM_PROXY_CONFIG_ERROR 5 /* Data is descriptive string */
-#define MGMT_ALARM_PROXY_SYSTEM_ERROR 6
-// Currently unused: 7
-#define MGMT_ALARM_PROXY_CACHE_ERROR 8
-#define MGMT_ALARM_PROXY_CACHE_WARNING 9
-#define MGMT_ALARM_PROXY_LOGGING_ERROR 10
-#define MGMT_ALARM_PROXY_LOGGING_WARNING 11
-// Currently unused: 13
-#define MGMT_ALARM_CONFIG_UPDATE_FAILED 14
-// Currently unused: 15
-// Currently unused: 16
-#define MGMT_ALARM_MGMT_CONFIG_ERROR 17
+#define MGMT_ALARM_PROXY_CONFIG_ERROR 3
+#define MGMT_ALARM_PROXY_SYSTEM_ERROR 4
+#define MGMT_ALARM_PROXY_CACHE_ERROR 5
+#define MGMT_ALARM_PROXY_CACHE_WARNING 6
+#define MGMT_ALARM_PROXY_LOGGING_ERROR 7
+#define MGMT_ALARM_PROXY_LOGGING_WARNING 8
+#define MGMT_ALARM_CONFIG_UPDATE_FAILED 9
 
 extern const char *alarmText[];
 extern const int alarmTextNum;
diff --git a/mgmt/BaseManager.h b/mgmt/BaseManager.h
index 6cfd57e..853acee 100644
--- a/mgmt/BaseManager.h
+++ b/mgmt/BaseManager.h
@@ -70,24 +70,20 @@
 
 // Signal flows: traffic server -> traffic manager
 #define MGMT_SIGNAL_PID 0
-// Currently unused: 1
-// Currently unused: 2
-#define MGMT_SIGNAL_CONFIG_ERROR 3 /* Data is descriptive string */
+
+#define MGMT_SIGNAL_PROXY_PROCESS_DIED 1
+#define MGMT_SIGNAL_PROXY_PROCESS_BORN 2
+#define MGMT_SIGNAL_CONFIG_ERROR 3
 #define MGMT_SIGNAL_SYSTEM_ERROR 4
-// Currently unused: 5
-// Currently unused: 6
-#define MGMT_SIGNAL_CACHE_ERROR 7
-#define MGMT_SIGNAL_CACHE_WARNING 8
-#define MGMT_SIGNAL_LOGGING_ERROR 9
-#define MGMT_SIGNAL_LOGGING_WARNING 10
-// Currently unused: 11
-// Currently unused: 12
-// Currently unused: 13
-#define MGMT_SIGNAL_PLUGIN_SET_CONFIG 14
-// Currently unused: 15
-#define MGMT_SIGNAL_LIBRECORDS 16
-// Currently unused: 17 - 21
-#define MGMT_SIGNAL_CONFIG_FILE_CHILD 22
+#define MGMT_SIGNAL_CACHE_ERROR 5
+#define MGMT_SIGNAL_CACHE_WARNING 6
+#define MGMT_SIGNAL_LOGGING_ERROR 7
+#define MGMT_SIGNAL_LOGGING_WARNING 8
+#define MGMT_SIGNAL_PLUGIN_SET_CONFIG 9
+
+// This are additional on top of the ones defined in Alarms.h. Que?
+#define MGMT_SIGNAL_LIBRECORDS 10
+#define MGMT_SIGNAL_CONFIG_FILE_CHILD 11
 
 struct MgmtMessageHdr {
   int msg_id;
diff --git a/mgmt/api/CoreAPIShared.cc b/mgmt/api/CoreAPIShared.cc
index 3c1eb0e..25e9b34 100644
--- a/mgmt/api/CoreAPIShared.cc
+++ b/mgmt/api/CoreAPIShared.cc
@@ -359,9 +359,6 @@ get_event_name(int id)
   case MGMT_ALARM_CONFIG_UPDATE_FAILED:
     ink_strlcpy(name, "MGMT_ALARM_CONFIG_UPDATE_FAILED", sizeof(name));
     break;
-  case MGMT_ALARM_MGMT_CONFIG_ERROR:
-    ink_strlcpy(name, "MGMT_ALARM_MGMT_CONFIG_ERROR", sizeof(name));
-    break;
   default:
     return nullptr;
   }
diff --git a/mgmt/api/CoreAPIShared.h b/mgmt/api/CoreAPIShared.h
index 310ba35..6718f8a 100644
--- a/mgmt/api/CoreAPIShared.h
+++ b/mgmt/api/CoreAPIShared.h
@@ -47,21 +47,13 @@
 
 #define MGMT_ALARM_PROXY_PROCESS_DIED 1
 #define MGMT_ALARM_PROXY_PROCESS_BORN 2
-// Currently unused: 3
-// Currently unused: 4
-#define MGMT_ALARM_PROXY_CONFIG_ERROR 5
-#define MGMT_ALARM_PROXY_SYSTEM_ERROR 6
-// Currently unused: 7
-#define MGMT_ALARM_PROXY_CACHE_ERROR 8
-#define MGMT_ALARM_PROXY_CACHE_WARNING 9
-#define MGMT_ALARM_PROXY_LOGGING_ERROR 10
-#define MGMT_ALARM_PROXY_LOGGING_WARNING 11
-// Currently unused: 12
-// Currently unused: 13
-#define MGMT_ALARM_CONFIG_UPDATE_FAILED 14
-// Currently unused: 15
-// Currently unused: 16
-#define MGMT_ALARM_MGMT_CONFIG_ERROR 17
+#define MGMT_ALARM_PROXY_CONFIG_ERROR 3
+#define MGMT_ALARM_PROXY_SYSTEM_ERROR 4
+#define MGMT_ALARM_PROXY_CACHE_ERROR 5
+#define MGMT_ALARM_PROXY_CACHE_WARNING 6
+#define MGMT_ALARM_PROXY_LOGGING_ERROR 7
+#define MGMT_ALARM_PROXY_LOGGING_WARNING 8
+#define MGMT_ALARM_CONFIG_UPDATE_FAILED 9
 
 // used by TSReadFromUrl
 #define HTTP_DIVIDER "\r\n\r\n"


Mime
View raw message