[devel] [PATCH 1/1] dtm: Document update for transportd.conf and osaflog options [#2820]

2018-03-27 Thread syam-talluri
modified:   00-README.conf
modified:   src/dtm/README
---
 00-README.conf | 15 +++
 src/dtm/README | 23 +++
 2 files changed, 38 insertions(+)

diff --git a/00-README.conf b/00-README.conf
index 94cb3d3..5f3927b 100644
--- a/00-README.conf
+++ b/00-README.conf
@@ -102,6 +102,21 @@ DTM_MCAST_ADDR=file:/var/lib/peer_ip_addresses.txt
 DTM_MCAST_ADDR=dns:peers.opensaf.org
 
 ***
+transportd.conf
+
+This file contains the configuration for transportd Service. This file
+has to be modified in the following cases:
+
+(a) To override the default max log file size (5242880 bytes) and
+default number of log backups (9 log backups).
+(b) To override the default max log file size, enable the option
+TRANSPORT_MAX_LOG_FILESIZE by removing # in the starting of
+the line and update its value to the required number of bytes.
+(c) To override the default number of log backups, enable the option
+TRANSPORT_NO_OF_BACKUP_LOG_FILES by removing # in the starting of
+the line and update its value to the required number of backups.
+
+***
 nid.conf
 
 This file contains global configuration for OpenSAF. This file
diff --git a/src/dtm/README b/src/dtm/README
index bccd8fe..814e49a 100644
--- a/src/dtm/README
+++ b/src/dtm/README
@@ -168,3 +168,26 @@ in dtmd.conf (see CONFIGURATION above) and restart the 
cluster.
  
 For fatal errors, syslog is used.
 
+Command Line Tool:
+
+Use the osaflog command line tool to change the log server configuration.
+osaflog tool supports the below options.
+
+Usage: osaflog [OPTION] [LOGSTREAM]
+
+print the messages stored on disk for the specified
+LOGSTREAM. When a LOGSTREAM argument is specified, the option
+--flush is implied.
+
+Opions:
+
+--flush  Flush all buffered messages in the log server to
+ disk even when no LOGSTREAM is specified
+--print  print the messages stored on disk for the
+ specified LOGSTREAM.This option is default
+ when no option is specified.
+--max-file-size  Set the maximum size (in bytes) of the log file
+ before the log is rotated.
+--max-backupsSet the maximum number of backup files to keep
+ when rotating the log.
+
-- 
1.9.1


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 0/1] Review Request for dtm: Documentation update for transportd.conf and osaflog options [#2820]

2018-03-27 Thread syam-talluri
Summary: dtm: Document update for transportd.conf and osaflog options [#2820]
Review request for Ticket(s): 2820
Peer Reviewer(s): anders.wid...@ericsson.com
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop
Development branch: ticket-2820
Base revision: 2e1b1228d0bb8f7aa66773f11ff915d5a39b0748
Personal repository: git://git.code.sf.net/u/syam-talluri/review


Impacted area   Impact y/n

 Docsy
 Build systemn
 RPM/packaging   n
 Configuration files n
 Startup scripts n
 SAF servicesn
 OpenSAF servicesn
 Core libraries  n
 Samples n
 Tests   n
 Other   n


Comments (indicate scope for each "y" above):
-
dtm: Document update for transportd.conf and osaflog options [#2820]

revision ed9978f6e30bf52e0af22e753b896b81e8678bd2
Author: syam-talluri <syam.tall...@oracle.com>
Date:   Tue, 27 Mar 2018 17:36:16 +0530

dtm: Document update for transportd.conf and osaflog options [#2820]

modified:   00-README.conf
modified:   src/dtm/README



Complete diffstat:
--
 00-README.conf | 15 +++
 src/dtm/README | 23 +++
 2 files changed, 38 insertions(+)


Testing Commands:
-
*** LIST THE COMMAND LINE TOOLS/STEPS TO TEST YOUR CHANGES ***


Testing, Expected Results:
--
*** PASTE COMMAND OUTPUTS / TEST RESULTS ***


Conditions of Submission:
-
Ack from Reviewer


Arch  Built StartedLinux distro
---
mipsn  n
mips64  n  n
x86 y  y
x86_64  n  n
powerpc n  n
powerpc64   n  n


Reviewer Checklist:
---
[Submitters: make sure that your review doesn't trigger any checkmarks!]


Your checkin has not passed review because (see checked entries):

___ Your RR template is generally incomplete; it has too many blank entries
that need proper data filled in.

___ You have failed to nominate the proper persons for review and push.

___ Your patches do not have proper short+long header

___ You have grammar/spelling in your header that is unacceptable.

___ You have exceeded a sensible line length in your headers/comments/text.

___ You have failed to put in a proper Trac Ticket # into your commits.

___ You have incorrectly put/left internal data in your comments/files
(i.e. internal bug tracking tool IDs, product names etc)

___ You have not given any evidence of testing beyond basic build tests.
Demonstrate some level of runtime or other sanity testing.

___ You have ^M present in some of your files. These have to be removed.

___ You have needlessly changed whitespace or added whitespace crimes
like trailing spaces, or spaces before tabs.

___ You have mixed real technical changes with whitespace and other
cosmetic code cleanup changes. These have to be separate commits.

___ You need to refactor your submission into logical chunks; there is
too much content into a single commit.

___ You have extraneous garbage in your review (merge commits etc)

___ You have giant attachments which should never have been sent;
Instead you should place your content in a public tree to be pulled.

___ You have too many commits attached to an e-mail; resend as threaded
commits, or place in a public tree for a pull.

___ You have resent this content multiple times without a clear indication
of what has changed between each re-send.

___ You have failed to adequately and individually address all of the
comments and change requests that were proposed in the initial review.

___ You have a misconfigured ~/.gitconfig file (i.e. user.name, user.email etc)

___ Your computer have a badly configured date and time; confusing the
the threaded patch review.

___ Your changes affect IPC mechanism, and you don't present any results
for in-service upgradability test.

___ Your changes affect user manual and documentation, your patch series
do not contain the patch that updates the Doxygen manual.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 1/2] dtm: configure trace file size and no of backups in transportd.conf [#2731]

2018-03-09 Thread syam-talluri
---
 opensaf.spec.in|  2 +
 src/dtm/Makefile.am|  3 +
 src/dtm/transport/log_server.cc| 95 --
 src/dtm/transport/log_server.h | 10 +++-
 src/dtm/transport/log_writer.cc|  6 +-
 src/dtm/transport/log_writer.h |  4 +-
 src/dtm/transport/main.cc  |  4 ++
 src/dtm/transport/osaf-transport.in|  1 +
 src/dtm/transport/tests/log_writer_test.cc |  2 +-
 src/dtm/transport/transportd.conf  | 13 
 10 files changed, 129 insertions(+), 11 deletions(-)
 create mode 100644 src/dtm/transport/transportd.conf

diff --git a/opensaf.spec.in b/opensaf.spec.in
index 187e20e..ac92174 100644
--- a/opensaf.spec.in
+++ b/opensaf.spec.in
@@ -1400,6 +1400,7 @@ fi
 %config(noreplace) %{_pkgsysconfdir}/nodeinit.conf.controller
 %config(noreplace) %{_pkgsysconfdir}/nodeinit.conf.payload
 %config(noreplace) %{_pkgsysconfdir}/dtmd.conf
+%config(noreplace) %{_pkgsysconfdir}/transportd.conf
 %{_pkglibdir}/osafrded
 %{_pkgclcclidir}/osaf-rded
 %{_pkglibdir}/osaffmd
@@ -1426,6 +1427,7 @@ fi
 %dir %{_pkgsysconfdir}
 %config(noreplace) %{_pkgsysconfdir}/nodeinit.conf.payload
 %config(noreplace) %{_pkgsysconfdir}/dtmd.conf
+%config(noreplace) %{_pkgsysconfdir}/transportd.conf
 %{_pkglibdir}/osafdtmd
 %{_pkglibdir}/osaftransportd
 %{_pkgclcclidir}/osaf-dtm
diff --git a/src/dtm/Makefile.am b/src/dtm/Makefile.am
index f3ba720..822249c 100644
--- a/src/dtm/Makefile.am
+++ b/src/dtm/Makefile.am
@@ -57,6 +57,9 @@ nodist_pkgclccli_SCRIPTS += \
 dist_pkgsysconf_DATA += \
src/dtm/dtmnd/dtmd.conf
 
+dist_pkgsysconf_DATA += \
+   src/dtm/transport/transportd.conf
+
 bin_osaftransportd_CXXFLAGS = $(AM_CXXFLAGS)
 
 bin_osaftransportd_CPPFLAGS = \
diff --git a/src/dtm/transport/log_server.cc b/src/dtm/transport/log_server.cc
index 2d6c961..780feb1 100644
--- a/src/dtm/transport/log_server.cc
+++ b/src/dtm/transport/log_server.cc
@@ -18,21 +18,28 @@
 
 #include "dtm/transport/log_server.h"
 #include 
+#include 
+#include 
 #include "base/osaf_poll.h"
 #include "base/time.h"
 #include "dtm/common/osaflog_protocol.h"
 #include "osaf/configmake.h"
 
+#define TRANSPORTD_CONFIG_FILE PKGSYSCONFDIR "/transportd.conf"
+
+size_t LogServer::no_of_backups = 9;
+size_t LogServer::kmax_file_size = 5000 * 1024;
+
 const Osaflog::ClientAddressConstantPrefix LogServer::address_header_{};
 
 LogServer::LogServer(int term_fd)
 : term_fd_{term_fd},
   log_socket_{Osaflog::kServerSocketPath, base::UnixSocket::kNonblocking},
   log_streams_{},
-  current_stream_{new LogStream{"mds.log", 1}},
+  current_stream_{new LogStream{"mds.log", 1, LogServer::kmax_file_size}},
   no_of_log_streams_{1} {
   log_streams_["mds.log"] = current_stream_;
-}
+  }
 
 LogServer::~LogServer() {
   for (const auto& s : log_streams_) delete s.second;
@@ -40,6 +47,12 @@ LogServer::~LogServer() {
 
 void LogServer::Run() {
   struct pollfd pfd[2] = {{term_fd_, POLLIN, 0}, {log_socket_.fd(), POLLIN, 
0}};
+
+  /* Initialize a signal handler for loading new configuration from 
transportd.conf */
+  if ((signal(SIGUSR2, usr2_sig_handler)) == SIG_ERR) {
+  syslog(LOG_ERR,"signal USR2 registration failed: %s", strerror(errno));
+  }
+
   do {
 for (int i = 0; i < 256; ++i) {
   char* buffer = current_stream_->current_buffer_position();
@@ -88,6 +101,12 @@ void LogServer::Run() {
   } while ((pfd[0].revents & POLLIN) == 0);
 }
 
+void LogServer::usr2_sig_handler(int sig) {
+   syslog(LOG_ERR, "Recived the SIGUSR2 Signal");
+   ReadConfig(TRANSPORTD_CONFIG_FILE);
+   signal(SIGUSR2, usr2_sig_handler);
+}
+
 LogServer::LogStream* LogServer::GetStream(const char* msg_id,
size_t msg_id_size) {
   if (msg_id_size == current_stream_->log_name_size() &&
@@ -99,7 +118,8 @@ LogServer::LogStream* LogServer::GetStream(const char* 
msg_id,
   if (iter != log_streams_.end()) return iter->second;
   if (no_of_log_streams_ >= kMaxNoOfStreams) return nullptr;
   if (!ValidateLogName(msg_id, msg_id_size)) return nullptr;
-  LogStream* stream = new LogStream{log_name, 9};
+
+  LogStream* stream = new LogStream{log_name, LogServer::no_of_backups, 
LogServer::kmax_file_size};
   auto result = log_streams_.insert(
   std::map::value_type{log_name, stream});
   if (!result.second) osaf_abort(msg_id_size);
@@ -107,6 +127,71 @@ LogServer::LogStream* LogServer::GetStream(const char* 
msg_id,
   return stream;
 }
 
+bool LogServer::ReadConfig(const char *transport_config_file) {
+  FILE *transport_conf_file;
+  char line[256];
+  size_t maxFileSize=0;
+  size_t noOfBackupFiles=0;
+  int i, n, comment_line, tag_len = 0;
+
+  /* Open transportd.conf config file. */
+  transport_conf_file = fopen(transport_config_file, "r");
+  if (transport_conf_file == nullptr) {
+
+syslog(LOG_ERR,"Not able to read transportd.conf: %s", strerror(errno));
+return 

[devel] [PATCH 0/2] Review Request for dtm: Added following options --max-backups and --max-file-size to osaflog tool and in transportd [#2731]

2018-03-09 Thread syam-talluri
Summary: dtm: configure trace file size and no of backups in transportd.conf 
[#2731]
Review request for Ticket(s): 2731
Peer Reviewer(s): anders.wid...@ericsson.com
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop
Development branch: ticket-2731
Base revision: 30b70f4a56ab0225d3ade3cc8dda3fe403b5492c
Personal repository: git://git.code.sf.net/u/syam-talluri/review


Impacted area   Impact y/n

 Docsn
 Build systemy
 RPM/packaging   n
 Configuration files n
 Startup scripts n
 SAF servicesn
 OpenSAF servicesn
 Core libraries  y
 Samples n
 Tests   n
 Other   n


Comments (indicate scope for each "y" above):
-
Fixed the cpplint warnings, review comments incorporated

revision 6992d2a095f653efdec428447bfa7841d01c5e53
Author: syam-talluri <syam.tall...@oracle.com>
Date:   Fri, 9 Mar 2018 14:58:43 +0530

dtm: Added following options  --max-backups and --max-file-size to osaflog tool 
and in transportd [#2731]



revision 4d73f74f421743ef56ccce8c51c44996d3df6669
Author: syam-talluri <syam.tall...@oracle.com>
Date:   Fri, 9 Mar 2018 14:58:43 +0530

dtm: configure trace file size and no of backups in transportd.conf [#2731]



Added Files:

 src/dtm/transport/transportd.conf


Complete diffstat:
--
 opensaf.spec.in|   2 +
 src/dtm/Makefile.am|   3 +
 src/dtm/common/osaflog_protocol.h  |  13 +++
 src/dtm/tools/osaflog.cc   | 168 -
 src/dtm/transport/log_server.cc| 111 ---
 src/dtm/transport/log_server.h |  16 ++-
 src/dtm/transport/log_writer.cc|   9 +-
 src/dtm/transport/log_writer.h |   5 +-
 src/dtm/transport/main.cc  |   4 +
 src/dtm/transport/osaf-transport.in|   1 +
 src/dtm/transport/tests/log_writer_test.cc |   2 +-
 src/dtm/transport/transportd.conf  |  13 +++
 12 files changed, 298 insertions(+), 49 deletions(-)


Testing Commands:
-
*** LIST THE COMMAND LINE TOOLS/STEPS TO TEST YOUR CHANGES ***


Testing, Expected Results:
--
*** PASTE COMMAND OUTPUTS / TEST RESULTS ***


Conditions of Submission:
-
Ack from the Reviewer


Arch  Built StartedLinux distro
---
mipsn  n
mips64  n  n
x86 n  n
x86_64  y  y
powerpc n  n
powerpc64   n  n


Reviewer Checklist:
---
[Submitters: make sure that your review doesn't trigger any checkmarks!]


Your checkin has not passed review because (see checked entries):

___ Your RR template is generally incomplete; it has too many blank entries
that need proper data filled in.

___ You have failed to nominate the proper persons for review and push.

___ Your patches do not have proper short+long header

___ You have grammar/spelling in your header that is unacceptable.

___ You have exceeded a sensible line length in your headers/comments/text.

___ You have failed to put in a proper Trac Ticket # into your commits.

___ You have incorrectly put/left internal data in your comments/files
(i.e. internal bug tracking tool IDs, product names etc)

___ You have not given any evidence of testing beyond basic build tests.
Demonstrate some level of runtime or other sanity testing.

___ You have ^M present in some of your files. These have to be removed.

___ You have needlessly changed whitespace or added whitespace crimes
like trailing spaces, or spaces before tabs.

___ You have mixed real technical changes with whitespace and other
cosmetic code cleanup changes. These have to be separate commits.

___ You need to refactor your submission into logical chunks; there is
too much content into a single commit.

___ You have extraneous garbage in your review (merge commits etc)

___ You have giant attachments which should never have been sent;
Instead you should place your content in a public tree to be pulled.

___ You have too many commits attached to an e-mail; resend as threaded
commits, or place in a public tree for a pull.

___ You have resent this content multiple times without a clear indication
of what has changed between each re-send.

___ You have failed to adequately and individually address all of the
comments and change requests that were proposed in the initial review.

___ You have a misconfigured ~/.gitconfig file (i.e. user.name, user.email etc)

___ Your computer have a badly configured date and time; confusing the
the threaded patch review.

___ Your changes affect IPC mechanism, and you don

[devel] [PATCH 2/2] dtm: Added following options --max-backups and --max-file-size to osaflog tool and in transportd [#2731]

2018-03-09 Thread syam-talluri
---
 src/dtm/common/osaflog_protocol.h |  13 +++
 src/dtm/tools/osaflog.cc  | 168 --
 src/dtm/transport/log_server.cc   |  74 -
 src/dtm/transport/log_server.h|  14 ++--
 src/dtm/transport/log_writer.cc   |   5 +-
 src/dtm/transport/log_writer.h|   3 +-
 src/dtm/transport/main.cc |   6 +-
 src/dtm/transport/transportd.conf |   8 +-
 8 files changed, 211 insertions(+), 80 deletions(-)

diff --git a/src/dtm/common/osaflog_protocol.h 
b/src/dtm/common/osaflog_protocol.h
index 61e9f6f..54551ee 100644
--- a/src/dtm/common/osaflog_protocol.h
+++ b/src/dtm/common/osaflog_protocol.h
@@ -24,6 +24,19 @@
 
 namespace Osaflog {
 
+enum cmd { FLUSH, MAXBACKUPS, MAXFILESIZE};
+enum cmdreply { RFLUSH = 101, RMAXBACKUPS, RMAXFILESIZE, FAILURE};
+struct cmd_osaflog {
+char marker[4];
+enum cmd  m_cmd;// Command Enum
+size_t  m_value;   // Value based on the command
+};
+
+
+struct cmd_osaflog_resp {
+enum cmdreply  m_cmdreply;// Command Enum
+};
+
 static constexpr const char* kServerSocketPath =
 PKGLOCALSTATEDIR "/osaf_log.sock";
 
diff --git a/src/dtm/tools/osaflog.cc b/src/dtm/tools/osaflog.cc
index 3ce66f4..e0d135b 100644
--- a/src/dtm/tools/osaflog.cc
+++ b/src/dtm/tools/osaflog.cc
@@ -14,6 +14,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -39,6 +40,8 @@ namespace {
 
 void PrintUsage(const char* program_name);
 bool Flush();
+bool MaxTraceFileSize(size_t maxfilesize);
+bool NoOfBackupFiles(size_t nooffiles);
 base::UnixServerSocket* CreateSocket();
 uint64_t Random64Bits(uint64_t seed);
 bool PrettyPrint(const std::string& log_stream);
@@ -53,20 +56,82 @@ char buf[65 * 1024];
 }  // namespace
 
 int main(int argc, char** argv) {
-  bool flush_option = false;
-  if (argc >= 2 && strcmp(argv[1], "--flush") == 0) {
-flush_option = true;
---argc;
-++argv;
-  }
-  if ((argc != 2) && (argc != 1 || flush_option == false)) {
+  struct option long_options[] = {{"max-file-size", required_argument, 0, 'm'},
+  {"max-backups", required_argument, 0, 'b'},
+  {"flush", no_argument, 0, 'f'},
+  {"print", required_argument, 0, 'p'},
+  {0, 0, 0, 0}};
+
+  size_t maxfilesize = 0;
+  size_t maxbackups = 0;
+  char *pplog = NULL;
+  int opt = 0;
+
+  int long_index = 0;
+  bool flush_result =  true;
+  bool print_result =  true;
+  bool maxfilesize_result = true;
+  bool noof_backup_result = true;
+  bool flush_set = false;
+  bool prettyprint_set = false;
+  bool maxfilesize_set = false;
+  bool maxbackups_set = false;
+
+  if (argc == 1) {
 PrintUsage(argv[0]);
 exit(EXIT_FAILURE);
   }
-  bool flush_result = Flush();
-  bool print_result = true;
-  if (argc == 2) print_result = PrettyPrint(argv[1]);
-  exit((flush_result && print_result) ? EXIT_SUCCESS : EXIT_FAILURE);
+
+  while ((opt = getopt_long(argc, argv, "m:b:p:f",
+   long_options, _index)) != -1) {
+switch (opt) {
+ case 'p':
+   pplog = optarg;
+   prettyprint_set = true;
+   flush_set = true;
+ break;
+ case 'f':
+   flush_set = true;
+ break;
+ case 'm':
+   maxfilesize_set = true;
+   maxfilesize = atoi(optarg);
+ break;
+ case 'b':
+   maxbackups_set = true;
+   maxbackups = atoi(optarg);
+ break;
+ default: PrintUsage(argv[0]);
+ exit(EXIT_FAILURE);
+}
+}
+
+  if (argc - optind == 1) {
+  flush_result = Flush();
+  flush_set = false;
+  print_result = PrettyPrint(argv[optind]);
+  prettyprint_set = false;
+   } else if (argc - optind > 1) {
+  PrintUsage(argv[0]);
+  exit(EXIT_FAILURE);
+   }
+
+  if (flush_set == true) {
+ flush_result = Flush();
+  }
+  if (prettyprint_set == true) {
+  print_result = PrettyPrint(pplog);
+  }
+  if (maxbackups_set == true) {
+ noof_backup_result = NoOfBackupFiles(maxbackups);
+  }
+  if (maxfilesize_set == true) {
+ maxfilesize_result = MaxTraceFileSize(maxfilesize);
+  }
+  if (flush_result && print_result && maxfilesize_result &&
+noof_backup_result)
+ exit(EXIT_SUCCESS);
+  exit(EXIT_FAILURE);
 }
 
 namespace {
@@ -75,18 +140,27 @@ void PrintUsage(const char* program_name) {
   fprintf(stderr,
   "Usage: %s [OPTION] [LOGSTREAM]\n"
   "\n"
-  "Pretty-print the messages stored on disk for the specified\n"
+  "print the messages stored on disk for the specified\n"
   "LOGSTREAM. When a LOGSTREAM argument is specified, the option\n"
   "--flush is 

[devel] [PATCH 0/2] Review Request for dtm: Added following options --max-backups and --max-file-size to osaflog tool and in transportd [#2731]

2018-02-12 Thread syam-talluri
Summary: dtm: configure trace file size and no of backups in transportd.conf 
[#2731]
Review request for Ticket(s): 2731
Peer Reviewer(s):anders.wid...@ericsson.com
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop
Development branch: ticket-2731
Base revision: a2ee56579bb33a05477b151c15d17f3b12025cf8
Personal repository: git://git.code.sf.net/u/syam-talluri/review


Impacted area   Impact y/n

 Docsy
 Build systemy
 RPM/packaging   y
 Configuration files y
 Startup scripts n
 SAF servicesn
 OpenSAF servicesy
 Core libraries  y
 Samples n
 Tests   n
 Other   n

NOTE: Patch(es) contain lines longer than 80 characers

Comments (indicate scope for each "y" above):
-
dtm: Added following options  --max-backups and --max-file-size to osaflog tool 
and in implemented the
functionality in the transportd. The messaging format between osaflog and 
transportd is modified by 
introducing a structure.

revision b289abf08100596c382765c82c94763ac486731e
Author: syam-talluri <syam.tall...@oracle.com>
Date:   Mon, 12 Feb 2018 17:29:26 +0530

dtm: Added following options  --max-backups and --max-file-size to osaflog tool 
and in transportd [#2731]



revision 0723340e8f4802e82655037e8d2743dddc684180
Author: syam-talluri <syam.tall...@oracle.com>
Date:   Mon, 12 Feb 2018 17:29:26 +0530

dtm: configure trace file size and no of backups in transportd.conf [#2731]



Added Files:

 src/dtm/transport/transportd.conf


Complete diffstat:
--
 opensaf.spec.in|   2 +
 src/dtm/Makefile.am|   3 +
 src/dtm/common/osaflog_protocol.h  |  15 ++
 src/dtm/tools/osaflog.cc   | 262 ++---
 src/dtm/transport/log_server.cc| 113 +++--
 src/dtm/transport/log_server.h |  14 +-
 src/dtm/transport/log_writer.cc|   6 +-
 src/dtm/transport/log_writer.h |   4 +-
 src/dtm/transport/main.cc  |   3 +
 src/dtm/transport/osaf-transport.in|   1 +
 src/dtm/transport/tests/log_writer_test.cc |   2 +-
 src/dtm/transport/transportd.conf  |  13 ++
 12 files changed, 391 insertions(+), 47 deletions(-)


Testing Commands:
-
Run osaflog command tool and tryied the --max-file-size=8 and --max--backups=9

Testing, Expected Results:
--
*** PASTE COMMAND OUTPUTS / TEST RESULTS ***


Conditions of Submission:
-
*** HOW MANY DAYS BEFORE PUSHING, CONSENSUS ETC ***


Arch  Built StartedLinux distro
---
mipsn  n
mips64  n  n
x86 n  n
x86_64  y  y
powerpc n  n
powerpc64   n  n


Reviewer Checklist:
---
[Submitters: make sure that your review doesn't trigger any checkmarks!]


Your checkin has not passed review because (see checked entries):

___ Your RR template is generally incomplete; it has too many blank entries
that need proper data filled in.

___ You have failed to nominate the proper persons for review and push.

___ Your patches do not have proper short+long header

___ You have grammar/spelling in your header that is unacceptable.

___ You have exceeded a sensible line length in your headers/comments/text.

___ You have failed to put in a proper Trac Ticket # into your commits.

___ You have incorrectly put/left internal data in your comments/files
(i.e. internal bug tracking tool IDs, product names etc)

___ You have not given any evidence of testing beyond basic build tests.
Demonstrate some level of runtime or other sanity testing.

___ You have ^M present in some of your files. These have to be removed.

___ You have needlessly changed whitespace or added whitespace crimes
like trailing spaces, or spaces before tabs.

___ You have mixed real technical changes with whitespace and other
cosmetic code cleanup changes. These have to be separate commits.

___ You need to refactor your submission into logical chunks; there is
too much content into a single commit.

___ You have extraneous garbage in your review (merge commits etc)

___ You have giant attachments which should never have been sent;
Instead you should place your content in a public tree to be pulled.

___ You have too many commits attached to an e-mail; resend as threaded
commits, or place in a public tree for a pull.

___ You have resent this content multiple times without a clear indication
of what has changed between each re-send.

___ You have failed to adequately and individually address all of the
comments and change requests that were proposed

[devel] [PATCH 2/2] dtm: Added following options --max-backups and --max-file-size to osaflog tool and in transportd [#2731]

2018-02-12 Thread syam-talluri
---
 src/dtm/common/osaflog_protocol.h |  15 +++
 src/dtm/tools/osaflog.cc  | 262 ++
 src/dtm/transport/log_server.cc   |  60 -
 src/dtm/transport/log_server.h|  10 +-
 src/dtm/transport/main.cc |   5 +-
 src/dtm/transport/transportd.conf |   8 +-
 6 files changed, 293 insertions(+), 67 deletions(-)

diff --git a/src/dtm/common/osaflog_protocol.h 
b/src/dtm/common/osaflog_protocol.h
index 61e9f6f..9723fd5 100644
--- a/src/dtm/common/osaflog_protocol.h
+++ b/src/dtm/common/osaflog_protocol.h
@@ -24,6 +24,21 @@
 
 namespace Osaflog {
 
+enum cmd { FLUSH, MAXBACKUPS, MAXFILESIZE};
+enum cmdreply { RFLUSH = 101, RMAXBACKUPS, RMAXFILESIZE, FAILURE};
+struct cmd_osaflog
+{
+char marker[4];
+enum cmd  m_cmd;// Command Enum
+size_tm_value; // Value based on the command
+};
+
+
+struct cmd_osaflog_resp
+{
+enum cmdreply  m_cmdreply;// Command Enum
+};
+
 static constexpr const char* kServerSocketPath =
 PKGLOCALSTATEDIR "/osaf_log.sock";
 
diff --git a/src/dtm/tools/osaflog.cc b/src/dtm/tools/osaflog.cc
index 3ce66f4..aefff81 100644
--- a/src/dtm/tools/osaflog.cc
+++ b/src/dtm/tools/osaflog.cc
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -38,7 +39,9 @@
 namespace {
 
 void PrintUsage(const char* program_name);
-bool Flush();
+bool Flush(bool flush_done);
+bool MaxTraceFileSize(size_t maxfilesize);
+bool NoOfBackupFiles(size_t nooffiles);
 base::UnixServerSocket* CreateSocket();
 uint64_t Random64Bits(uint64_t seed);
 bool PrettyPrint(const std::string& log_stream);
@@ -53,20 +56,73 @@ char buf[65 * 1024];
 }  // namespace
 
 int main(int argc, char** argv) {
-  bool flush_option = false;
-  if (argc >= 2 && strcmp(argv[1], "--flush") == 0) {
-flush_option = true;
---argc;
-++argv;
-  }
-  if ((argc != 2) && (argc != 1 || flush_option == false)) {
+  struct option long_options[] = {{"max-file-size", required_argument, 0, 'm'},
+  {"max-backups", required_argument, 0, 'b'},
+  {"flush", no_argument, 0, 'f'},
+  {"pretty-print", required_argument, 0, 'p'},
+  {0, 0, 0, 0}};
+
+  size_t maxfilesize = 0;
+  size_t maxbackups = 0;
+  char *pplog = NULL;
+  int opt= 0;
+
+  int long_index =0;
+  bool flush_result =  true;
+  bool print_result =  true;
+  bool maxfilesize_result = true;
+  bool noof_backup_result = true;
+  bool flush_set = false;
+  bool prettyprint_set = false;
+
+  if (argc == 1) {
 PrintUsage(argv[0]);
 exit(EXIT_FAILURE);
   }
-  bool flush_result = Flush();
-  bool print_result = true;
-  if (argc == 2) print_result = PrettyPrint(argv[1]);
-  exit((flush_result && print_result) ? EXIT_SUCCESS : EXIT_FAILURE);
+
+  while ((opt = getopt_long(argc, argv,"m:b:p:f",
+   long_options, _index )) != -1) {
+switch (opt){
+ case 'p':
+   pplog = optarg;
+   flush_result = Flush(flush_set);
+   PrettyPrint(pplog);
+   prettyprint_set = true;
+   flush_set = true;
+ break;
+ case 'f':
+   flush_result = Flush(flush_set);
+   flush_set = true;
+ break;
+ case 'm':
+   maxfilesize = atoi(optarg);
+   maxfilesize_result = MaxTraceFileSize(maxfilesize);
+ break;
+ case 'b':
+   maxbackups = atoi(optarg);
+   noof_backup_result = NoOfBackupFiles(maxbackups);
+ break;
+ default: PrintUsage(argv[0]);
+ exit(EXIT_FAILURE);
+}
+}
+
+if(prettyprint_set != true) {
+  if (argc - optind == 1) {
+  flush_result = Flush(flush_set);
+  print_result = PrettyPrint(argv[optind]);
+  prettyprint_set = false;
+   }else if(argc - optind > 1) {
+  PrintUsage(argv[0]);
+  exit(EXIT_FAILURE);
+   }
+}
+
+   if(flush_result && print_result && maxfilesize_result && noof_backup_result)
+ exit(EXIT_SUCCESS);
+
+
+   exit(EXIT_FAILURE);
 }
 
 namespace {
@@ -75,18 +131,95 @@ void PrintUsage(const char* program_name) {
   fprintf(stderr,
   "Usage: %s [OPTION] [LOGSTREAM]\n"
   "\n"
-  "Pretty-print the messages stored on disk for the specified\n"
+  "pretty-print the messages stored on disk for the specified\n"
   "LOGSTREAM. When a LOGSTREAM argument is specified, the option\n"
   "--flush is implied.\n"
   "\n"
   "Opions:\n"
   "\n"
-  "  --flush Flush all buffered messages in the log server to disk\n"
-  "  even when no LOGSTREAM is specified\n",
+  "--flush  Flush all buffered messages in the log server to 
disk\n"
+  

[devel] [PATCH 1/2] dtm: configure trace file size and no of backups in transportd.conf [#2731]

2018-02-12 Thread syam-talluri
---
 opensaf.spec.in|  2 +
 src/dtm/Makefile.am|  3 +
 src/dtm/transport/log_server.cc| 95 --
 src/dtm/transport/log_server.h | 10 +++-
 src/dtm/transport/log_writer.cc|  6 +-
 src/dtm/transport/log_writer.h |  4 +-
 src/dtm/transport/main.cc  |  4 ++
 src/dtm/transport/osaf-transport.in|  1 +
 src/dtm/transport/tests/log_writer_test.cc |  2 +-
 src/dtm/transport/transportd.conf  | 13 
 10 files changed, 129 insertions(+), 11 deletions(-)
 create mode 100644 src/dtm/transport/transportd.conf

diff --git a/opensaf.spec.in b/opensaf.spec.in
index db4b5be..452d1c8 100644
--- a/opensaf.spec.in
+++ b/opensaf.spec.in
@@ -1397,6 +1397,7 @@ fi
 %config(noreplace) %{_pkgsysconfdir}/nodeinit.conf.controller
 %config(noreplace) %{_pkgsysconfdir}/nodeinit.conf.payload
 %config(noreplace) %{_pkgsysconfdir}/dtmd.conf
+%config(noreplace) %{_pkgsysconfdir}/transportd.conf
 %{_pkglibdir}/osafrded
 %{_pkgclcclidir}/osaf-rded
 %{_pkglibdir}/osaffmd
@@ -1423,6 +1424,7 @@ fi
 %dir %{_pkgsysconfdir}
 %config(noreplace) %{_pkgsysconfdir}/nodeinit.conf.payload
 %config(noreplace) %{_pkgsysconfdir}/dtmd.conf
+%config(noreplace) %{_pkgsysconfdir}/transportd.conf
 %{_pkglibdir}/osafdtmd
 %{_pkglibdir}/osaftransportd
 %{_pkgclcclidir}/osaf-dtm
diff --git a/src/dtm/Makefile.am b/src/dtm/Makefile.am
index f3ba720..822249c 100644
--- a/src/dtm/Makefile.am
+++ b/src/dtm/Makefile.am
@@ -57,6 +57,9 @@ nodist_pkgclccli_SCRIPTS += \
 dist_pkgsysconf_DATA += \
src/dtm/dtmnd/dtmd.conf
 
+dist_pkgsysconf_DATA += \
+   src/dtm/transport/transportd.conf
+
 bin_osaftransportd_CXXFLAGS = $(AM_CXXFLAGS)
 
 bin_osaftransportd_CPPFLAGS = \
diff --git a/src/dtm/transport/log_server.cc b/src/dtm/transport/log_server.cc
index 2d6c961..780feb1 100644
--- a/src/dtm/transport/log_server.cc
+++ b/src/dtm/transport/log_server.cc
@@ -18,21 +18,28 @@
 
 #include "dtm/transport/log_server.h"
 #include 
+#include 
+#include 
 #include "base/osaf_poll.h"
 #include "base/time.h"
 #include "dtm/common/osaflog_protocol.h"
 #include "osaf/configmake.h"
 
+#define TRANSPORTD_CONFIG_FILE PKGSYSCONFDIR "/transportd.conf"
+
+size_t LogServer::no_of_backups = 9;
+size_t LogServer::kmax_file_size = 5000 * 1024;
+
 const Osaflog::ClientAddressConstantPrefix LogServer::address_header_{};
 
 LogServer::LogServer(int term_fd)
 : term_fd_{term_fd},
   log_socket_{Osaflog::kServerSocketPath, base::UnixSocket::kNonblocking},
   log_streams_{},
-  current_stream_{new LogStream{"mds.log", 1}},
+  current_stream_{new LogStream{"mds.log", 1, LogServer::kmax_file_size}},
   no_of_log_streams_{1} {
   log_streams_["mds.log"] = current_stream_;
-}
+  }
 
 LogServer::~LogServer() {
   for (const auto& s : log_streams_) delete s.second;
@@ -40,6 +47,12 @@ LogServer::~LogServer() {
 
 void LogServer::Run() {
   struct pollfd pfd[2] = {{term_fd_, POLLIN, 0}, {log_socket_.fd(), POLLIN, 
0}};
+
+  /* Initialize a signal handler for loading new configuration from 
transportd.conf */
+  if ((signal(SIGUSR2, usr2_sig_handler)) == SIG_ERR) {
+  syslog(LOG_ERR,"signal USR2 registration failed: %s", strerror(errno));
+  }
+
   do {
 for (int i = 0; i < 256; ++i) {
   char* buffer = current_stream_->current_buffer_position();
@@ -88,6 +101,12 @@ void LogServer::Run() {
   } while ((pfd[0].revents & POLLIN) == 0);
 }
 
+void LogServer::usr2_sig_handler(int sig) {
+   syslog(LOG_ERR, "Recived the SIGUSR2 Signal");
+   ReadConfig(TRANSPORTD_CONFIG_FILE);
+   signal(SIGUSR2, usr2_sig_handler);
+}
+
 LogServer::LogStream* LogServer::GetStream(const char* msg_id,
size_t msg_id_size) {
   if (msg_id_size == current_stream_->log_name_size() &&
@@ -99,7 +118,8 @@ LogServer::LogStream* LogServer::GetStream(const char* 
msg_id,
   if (iter != log_streams_.end()) return iter->second;
   if (no_of_log_streams_ >= kMaxNoOfStreams) return nullptr;
   if (!ValidateLogName(msg_id, msg_id_size)) return nullptr;
-  LogStream* stream = new LogStream{log_name, 9};
+
+  LogStream* stream = new LogStream{log_name, LogServer::no_of_backups, 
LogServer::kmax_file_size};
   auto result = log_streams_.insert(
   std::map::value_type{log_name, stream});
   if (!result.second) osaf_abort(msg_id_size);
@@ -107,6 +127,71 @@ LogServer::LogStream* LogServer::GetStream(const char* 
msg_id,
   return stream;
 }
 
+bool LogServer::ReadConfig(const char *transport_config_file) {
+  FILE *transport_conf_file;
+  char line[256];
+  size_t maxFileSize=0;
+  size_t noOfBackupFiles=0;
+  int i, n, comment_line, tag_len = 0;
+
+  /* Open transportd.conf config file. */
+  transport_conf_file = fopen(transport_config_file, "r");
+  if (transport_conf_file == nullptr) {
+
+syslog(LOG_ERR,"Not able to read transportd.conf: %s", strerror(errno));
+return 

[devel] [PATCH 1/1] dtm: configure trace file size and no of backups in transportd.conf [#2731]

2017-12-27 Thread syam-talluri
---
 opensaf.spec.in|  2 +
 src/dtm/Makefile.am|  3 +
 src/dtm/transport/log_server.cc| 95 --
 src/dtm/transport/log_server.h | 10 +++-
 src/dtm/transport/log_writer.cc|  6 +-
 src/dtm/transport/log_writer.h |  4 +-
 src/dtm/transport/main.cc  |  4 ++
 src/dtm/transport/osaf-transport.in|  1 +
 src/dtm/transport/tests/log_writer_test.cc |  2 +-
 src/dtm/transport/transportd.conf  | 13 
 10 files changed, 129 insertions(+), 11 deletions(-)
 create mode 100644 src/dtm/transport/transportd.conf

diff --git a/opensaf.spec.in b/opensaf.spec.in
index db4b5be..452d1c8 100644
--- a/opensaf.spec.in
+++ b/opensaf.spec.in
@@ -1397,6 +1397,7 @@ fi
 %config(noreplace) %{_pkgsysconfdir}/nodeinit.conf.controller
 %config(noreplace) %{_pkgsysconfdir}/nodeinit.conf.payload
 %config(noreplace) %{_pkgsysconfdir}/dtmd.conf
+%config(noreplace) %{_pkgsysconfdir}/transportd.conf
 %{_pkglibdir}/osafrded
 %{_pkgclcclidir}/osaf-rded
 %{_pkglibdir}/osaffmd
@@ -1423,6 +1424,7 @@ fi
 %dir %{_pkgsysconfdir}
 %config(noreplace) %{_pkgsysconfdir}/nodeinit.conf.payload
 %config(noreplace) %{_pkgsysconfdir}/dtmd.conf
+%config(noreplace) %{_pkgsysconfdir}/transportd.conf
 %{_pkglibdir}/osafdtmd
 %{_pkglibdir}/osaftransportd
 %{_pkgclcclidir}/osaf-dtm
diff --git a/src/dtm/Makefile.am b/src/dtm/Makefile.am
index f3ba720..822249c 100644
--- a/src/dtm/Makefile.am
+++ b/src/dtm/Makefile.am
@@ -57,6 +57,9 @@ nodist_pkgclccli_SCRIPTS += \
 dist_pkgsysconf_DATA += \
src/dtm/dtmnd/dtmd.conf
 
+dist_pkgsysconf_DATA += \
+   src/dtm/transport/transportd.conf
+
 bin_osaftransportd_CXXFLAGS = $(AM_CXXFLAGS)
 
 bin_osaftransportd_CPPFLAGS = \
diff --git a/src/dtm/transport/log_server.cc b/src/dtm/transport/log_server.cc
index 2d6c961..780feb1 100644
--- a/src/dtm/transport/log_server.cc
+++ b/src/dtm/transport/log_server.cc
@@ -18,21 +18,28 @@
 
 #include "dtm/transport/log_server.h"
 #include 
+#include 
+#include 
 #include "base/osaf_poll.h"
 #include "base/time.h"
 #include "dtm/common/osaflog_protocol.h"
 #include "osaf/configmake.h"
 
+#define TRANSPORTD_CONFIG_FILE PKGSYSCONFDIR "/transportd.conf"
+
+size_t LogServer::no_of_backups = 9;
+size_t LogServer::kmax_file_size = 5000 * 1024;
+
 const Osaflog::ClientAddressConstantPrefix LogServer::address_header_{};
 
 LogServer::LogServer(int term_fd)
 : term_fd_{term_fd},
   log_socket_{Osaflog::kServerSocketPath, base::UnixSocket::kNonblocking},
   log_streams_{},
-  current_stream_{new LogStream{"mds.log", 1}},
+  current_stream_{new LogStream{"mds.log", 1, LogServer::kmax_file_size}},
   no_of_log_streams_{1} {
   log_streams_["mds.log"] = current_stream_;
-}
+  }
 
 LogServer::~LogServer() {
   for (const auto& s : log_streams_) delete s.second;
@@ -40,6 +47,12 @@ LogServer::~LogServer() {
 
 void LogServer::Run() {
   struct pollfd pfd[2] = {{term_fd_, POLLIN, 0}, {log_socket_.fd(), POLLIN, 
0}};
+
+  /* Initialize a signal handler for loading new configuration from 
transportd.conf */
+  if ((signal(SIGUSR2, usr2_sig_handler)) == SIG_ERR) {
+  syslog(LOG_ERR,"signal USR2 registration failed: %s", strerror(errno));
+  }
+
   do {
 for (int i = 0; i < 256; ++i) {
   char* buffer = current_stream_->current_buffer_position();
@@ -88,6 +101,12 @@ void LogServer::Run() {
   } while ((pfd[0].revents & POLLIN) == 0);
 }
 
+void LogServer::usr2_sig_handler(int sig) {
+   syslog(LOG_ERR, "Recived the SIGUSR2 Signal");
+   ReadConfig(TRANSPORTD_CONFIG_FILE);
+   signal(SIGUSR2, usr2_sig_handler);
+}
+
 LogServer::LogStream* LogServer::GetStream(const char* msg_id,
size_t msg_id_size) {
   if (msg_id_size == current_stream_->log_name_size() &&
@@ -99,7 +118,8 @@ LogServer::LogStream* LogServer::GetStream(const char* 
msg_id,
   if (iter != log_streams_.end()) return iter->second;
   if (no_of_log_streams_ >= kMaxNoOfStreams) return nullptr;
   if (!ValidateLogName(msg_id, msg_id_size)) return nullptr;
-  LogStream* stream = new LogStream{log_name, 9};
+
+  LogStream* stream = new LogStream{log_name, LogServer::no_of_backups, 
LogServer::kmax_file_size};
   auto result = log_streams_.insert(
   std::map::value_type{log_name, stream});
   if (!result.second) osaf_abort(msg_id_size);
@@ -107,6 +127,71 @@ LogServer::LogStream* LogServer::GetStream(const char* 
msg_id,
   return stream;
 }
 
+bool LogServer::ReadConfig(const char *transport_config_file) {
+  FILE *transport_conf_file;
+  char line[256];
+  size_t maxFileSize=0;
+  size_t noOfBackupFiles=0;
+  int i, n, comment_line, tag_len = 0;
+
+  /* Open transportd.conf config file. */
+  transport_conf_file = fopen(transport_config_file, "r");
+  if (transport_conf_file == nullptr) {
+
+syslog(LOG_ERR,"Not able to read transportd.conf: %s", strerror(errno));
+return 

[devel] [PATCH 0/1] Review Request for dtm: configure trace file size and no of backups in transportd.conf [#2731]

2017-12-27 Thread syam-talluri
Summary: dtm: configure trace file size and no of backups in transportd.conf 
[#2731]
Review request for Ticket(s): 2731
Peer Reviewer(s):anders.widell
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop
Development branch: ticket-2731
Base revision: d231ba43f36ed056c6b83a5739d7aa166ea73317
Personal repository: git://git.code.sf.net/u/syam-talluri/review


Impacted area   Impact y/n

 Docsn
 Build systemn
 RPM/packaging   y
 Configuration files y
 Startup scripts n
 SAF servicesn
 OpenSAF servicesy
 Core libraries  n
 Samples n
 Tests   n
 Other   n

NOTE: Patch(es) contain lines longer than 80 characers

Comments (indicate scope for each "y" above):
-


revision 5043b420c8ff5dd70d8d2cbb4a40dd3f3305b08b
Author: syam-talluri <syam.tall...@oracle.com>
Date:   Wed, 27 Dec 2017 15:19:18 +0530

dtm: configure trace file size and no of backups in transportd.conf [#2731]

To make the trace file size and number of backups configurable we are 
introducing the transportd.conf.
This file was read in startup of transportd and logwriter will be configured 
with values. 
If we want to change these values dynamically the transportd.conf was read in 
SIGUSR2 handling 
and propagated to newly created streams and logwriter objects. 
Already created streams and log writer objects are not touched

Added Files:

 src/dtm/transport/transportd.conf


Complete diffstat:
--
 opensaf.spec.in|  2 +
 src/dtm/Makefile.am|  3 +
 src/dtm/transport/log_server.cc| 95 --
 src/dtm/transport/log_server.h | 10 +++-
 src/dtm/transport/log_writer.cc|  6 +-
 src/dtm/transport/log_writer.h |  4 +-
 src/dtm/transport/main.cc  |  4 ++
 src/dtm/transport/osaf-transport.in|  1 +
 src/dtm/transport/tests/log_writer_test.cc |  2 +-
 src/dtm/transport/transportd.conf  | 13 
 10 files changed, 129 insertions(+), 11 deletions(-)


Testing Commands:
-
*** LIST THE COMMAND LINE TOOLS/STEPS TO TEST YOUR CHANGES ***


Testing, Expected Results:
--
Enable the traces and check whether config file size and 
number of backups are getting effected or not 


Conditions of Submission:
-
Ack from Reviewer

Arch  Built StartedLinux distro
---
mipsn  n
mips64  n  n
x86 n  n
x86_64  y  y
powerpc n  n
powerpc64   n  n


Reviewer Checklist:
---
[Submitters: make sure that your review doesn't trigger any checkmarks!]


Your checkin has not passed review because (see checked entries):

___ Your RR template is generally incomplete; it has too many blank entries
that need proper data filled in.

___ You have failed to nominate the proper persons for review and push.

___ Your patches do not have proper short+long header

___ You have grammar/spelling in your header that is unacceptable.

___ You have exceeded a sensible line length in your headers/comments/text.

___ You have failed to put in a proper Trac Ticket # into your commits.

___ You have incorrectly put/left internal data in your comments/files
(i.e. internal bug tracking tool IDs, product names etc)

___ You have not given any evidence of testing beyond basic build tests.
Demonstrate some level of runtime or other sanity testing.

___ You have ^M present in some of your files. These have to be removed.

___ You have needlessly changed whitespace or added whitespace crimes
like trailing spaces, or spaces before tabs.

___ You have mixed real technical changes with whitespace and other
cosmetic code cleanup changes. These have to be separate commits.

___ You need to refactor your submission into logical chunks; there is
too much content into a single commit.

___ You have extraneous garbage in your review (merge commits etc)

___ You have giant attachments which should never have been sent;
Instead you should place your content in a public tree to be pulled.

___ You have too many commits attached to an e-mail; resend as threaded
commits, or place in a public tree for a pull.

___ You have resent this content multiple times without a clear indication
of what has changed between each re-send.

___ You have failed to adequately and individually address all of the
comments and change requests that were proposed in the initial review.

___ You have a misconfigured ~/.gitconfig file (i.e. user.name, user.email etc)

___ Your computer have a badly configured date and time; confusing the
th