You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2018/12/05 17:51:20 UTC
[1/4] vcl git commit: doap_vcl.rdf: changed repo from subversion to
git
Repository: vcl
Updated Branches:
refs/heads/VCL-1082_lastcheckin_db_epoch ce1e6d7fd -> 273018a52
doap_vcl.rdf: changed repo from subversion to git
Project: http://git-wip-us.apache.org/repos/asf/vcl/repo
Commit: http://git-wip-us.apache.org/repos/asf/vcl/commit/01b9a6e7
Tree: http://git-wip-us.apache.org/repos/asf/vcl/tree/01b9a6e7
Diff: http://git-wip-us.apache.org/repos/asf/vcl/diff/01b9a6e7
Branch: refs/heads/VCL-1082_lastcheckin_db_epoch
Commit: 01b9a6e77e20b3daaa191f37b968a526d6be909a
Parents: 2fb5c2d
Author: Josh Thompson <jf...@ncsu.edu>
Authored: Thu Jun 21 12:25:52 2018 -0400
Committer: Josh Thompson <jf...@ncsu.edu>
Committed: Thu Jun 21 12:33:38 2018 -0400
----------------------------------------------------------------------
doap_vcl.rdf | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/vcl/blob/01b9a6e7/doap_vcl.rdf
----------------------------------------------------------------------
diff --git a/doap_vcl.rdf b/doap_vcl.rdf
index c2da7b6..427cafa 100644
--- a/doap_vcl.rdf
+++ b/doap_vcl.rdf
@@ -95,10 +95,10 @@
</Version>
</release>
<repository>
- <SVNRepository>
- <location rdf:resource="https://svn.apache.org/repos/asf/vcl"/>
- <browse rdf:resource="http://svn.apache.org/viewvc/vcl/"/>
- </SVNRepository>
+ <GitRepository>
+ <location rdf:resource="https://git-wip-us.apache.org/repos/asf/vcl"/>
+ <browse rdf:resource="https://git-wip-us.apache.org/repos/asf/vcl"/>
+ </GitRepository>
</repository>
</Project>
</rdf:RDF>
[4/4] vcl git commit: VCL-1082 - This closes #8 - managementnode
lastcheckin conversion to db epoch
Posted by jf...@apache.org.
VCL-1082 - This closes #8 - managementnode lastcheckin conversion to db epoch
Project: http://git-wip-us.apache.org/repos/asf/vcl/repo
Commit: http://git-wip-us.apache.org/repos/asf/vcl/commit/273018a5
Tree: http://git-wip-us.apache.org/repos/asf/vcl/tree/273018a5
Diff: http://git-wip-us.apache.org/repos/asf/vcl/diff/273018a5
Branch: refs/heads/VCL-1082_lastcheckin_db_epoch
Commit: 273018a529e7c81881e468cd806b8e9a4b1d6fb9
Parents: ce1e6d7 558403d
Author: Josh Thompson <jf...@ncsu.edu>
Authored: Wed Dec 5 12:49:17 2018 -0500
Committer: Josh Thompson <jf...@ncsu.edu>
Committed: Wed Dec 5 12:49:17 2018 -0500
----------------------------------------------------------------------
managementnode/bin/monitor_vcld.pl | 22 +++++++++++++++++-----
managementnode/lib/VCL/utils.pm | 31 ++++++++++++++++++++++++++++---
2 files changed, 45 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/vcl/blob/273018a5/managementnode/lib/VCL/utils.pm
----------------------------------------------------------------------
[3/4] vcl git commit: VCL-1082 Added code to get epoc time from the
database when the monitoring function is being called. This will prevent
issues durring daylights saving time.
Posted by jf...@apache.org.
VCL-1082 Added code to get epoc time from the database when the monitoring function is being called. This will prevent issues durring daylights saving time.
Project: http://git-wip-us.apache.org/repos/asf/vcl/repo
Commit: http://git-wip-us.apache.org/repos/asf/vcl/commit/558403d6
Tree: http://git-wip-us.apache.org/repos/asf/vcl/tree/558403d6
Diff: http://git-wip-us.apache.org/repos/asf/vcl/diff/558403d6
Branch: refs/heads/VCL-1082_lastcheckin_db_epoch
Commit: 558403d6f9d757655f903e1c4528932aba93a22f
Parents: 5a4735f
Author: Mike Jennings <gm...@ncsu.edu>
Authored: Tue Nov 27 14:40:01 2018 -0500
Committer: Mike Jennings <gm...@ncsu.edu>
Committed: Tue Nov 27 14:40:01 2018 -0500
----------------------------------------------------------------------
managementnode/bin/monitor_vcld.pl | 22 +++++++++++++++++-----
managementnode/lib/VCL/utils.pm | 31 ++++++++++++++++++++++++++++---
2 files changed, 45 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/vcl/blob/558403d6/managementnode/bin/monitor_vcld.pl
----------------------------------------------------------------------
diff --git a/managementnode/bin/monitor_vcld.pl b/managementnode/bin/monitor_vcld.pl
index fa0b796..503df93 100755
--- a/managementnode/bin/monitor_vcld.pl
+++ b/managementnode/bin/monitor_vcld.pl
@@ -170,27 +170,39 @@ if (!defined($lastcheckin_timestamp)) {
}
my $current_epoch_seconds = convert_to_epoch_seconds();
-my $lastcheckin_epoch_seconds = convert_to_epoch_seconds($lastcheckin_timestamp);
+my $current_timestamp = makedatestring();
+my $lastcheckin_epoch_seconds = $management_node_info->{lastcheckin_epoch};
my $lastcheckin_seconds_ago = ($current_epoch_seconds - $lastcheckin_epoch_seconds);
+# This message displays the timestamp information from the management node and the database
+my $detailed_ts_message = <<"END_MESSAGE";
+ Current Time = $current_timestamp
+ Current epoch = $current_epoch_seconds
+ Last Checkin Time = $lastcheckin_timestamp
+ Last Checkin epoch = $lastcheckin_epoch_seconds
+END_MESSAGE
+
if ($lastcheckin_seconds_ago < 0) {
- print_warning("$management_node_name last checkin time is in the future: $lastcheckin_timestamp, exiting");
+ print_warning("$management_node_name last checkin time is in the future: $lastcheckin_timestamp($lastcheckin_epoch_seconds), exiting");
}
elsif ($lastcheckin_seconds_ago < $lastcheckin_warning_seconds) {
- print_message("$management_node_name last checked in $lastcheckin_seconds_ago seconds ago at $lastcheckin_timestamp");
+ print_message("$management_node_name last checked in $lastcheckin_seconds_ago seconds ago at $lastcheckin_timestamp($lastcheckin_epoch_seconds)");
}
elsif ($lastcheckin_seconds_ago >= $lastcheckin_critical_seconds) {
- my $critical_message = "critical threshold exceeded, $management_node_name last checked in $lastcheckin_seconds_ago seconds ago at $lastcheckin_timestamp";
+ my $critical_message = "critical threshold exceeded, $management_node_name last checked in $lastcheckin_seconds_ago seconds ago at $lastcheckin_timestamp($lastcheckin_epoch_seconds)";
# Attempt to restart the vcld service
if ($mn_os->restart_service($vcld_service_name)) {
print_critical("$critical_message, $vcld_service_name service restarted");
+ print_critical($detailed_ts_message);
}
else {
print_critical("$critical_message, failed to restart $vcld_service_name service");
+ print_critical($detailed_ts_message);
}
}
else {
- print_critical("last checkin warning threshold exceeded, $management_node_name last checked in $lastcheckin_seconds_ago seconds ago at $lastcheckin_timestamp");
+ print_critical("last checkin warning threshold exceeded, $management_node_name last checked in $lastcheckin_seconds_ago seconds ago at $lastcheckin_timestamp($lastcheckin_epoch_seconds)");
+ print_critical($detailed_ts_message);
}
print_message('done');
http://git-wip-us.apache.org/repos/asf/vcl/blob/558403d6/managementnode/lib/VCL/utils.pm
----------------------------------------------------------------------
diff --git a/managementnode/lib/VCL/utils.pm b/managementnode/lib/VCL/utils.pm
index 0e9a4ea..d33ea26 100644
--- a/managementnode/lib/VCL/utils.pm
+++ b/managementnode/lib/VCL/utils.pm
@@ -4623,6 +4623,7 @@ sub get_management_node_info {
my $select_statement = "
SELECT
managementnode.*,
+UNIX_TIMESTAMP(managementnode.lastcheckin) as lastcheckin_epoch,
resource.id AS resource_id,
state.name AS statename
FROM
@@ -4962,22 +4963,46 @@ sub update_lastcheckin {
}
# Get current timestamp
- my $timestamp = makedatestring();
+ my $timestamp;
# Construct the update statement
my $update_statement = "
UPDATE
managementnode
SET
- lastcheckin = \'$timestamp\'
+ lastcheckin = NOW()
WHERE
id = $management_node_id
";
+ my $get_unix_timestamp = "
+ SELECT
+ UNIX_TIMESTAMP() as EPOC_TIMESTAMP
+ ";
+
# Call the database execute subroutine
if (database_execute($update_statement)) {
# Update successful, return timestamp
- return $timestamp;
+ my @selected_rows = database_select($get_unix_timestamp);
+
+ # Check to make sure 1 row was returned
+ if (scalar @selected_rows == 0) {
+ notify($ERRORS{'WARNING'}, 0, "zero rows were returned from database select");
+ return 0;
+ }
+ elsif (scalar @selected_rows > 1) {
+ notify($ERRORS{'WARNING'}, 0, "" . scalar @selected_rows . " rows were returned from database select");
+ return 0;
+ }
+
+ # Make sure we return undef if the column wasn't found
+ if (defined $selected_rows[0]{EPOC_TIMESTAMP}) {
+ $timestamp = $selected_rows[0]{EPOC_TIMESTAMP};
+ return $timestamp;
+ } else {
+ notify($ERRORS{'CRITICAL'}, 0, "unable to get EPOC_TIMESTAMP from database");
+ return 0;
+ }
}
else {
notify($ERRORS{'CRITICAL'}, 0, "unable to update database, management node id $management_node_id");
[2/4] vcl git commit: Merge pull request #1 from apache/master
Posted by jf...@apache.org.
Merge pull request #1 from apache/master
doap_vcl.rdf: changed repo from subversion to git
Project: http://git-wip-us.apache.org/repos/asf/vcl/repo
Commit: http://git-wip-us.apache.org/repos/asf/vcl/commit/5a4735ff
Tree: http://git-wip-us.apache.org/repos/asf/vcl/tree/5a4735ff
Diff: http://git-wip-us.apache.org/repos/asf/vcl/diff/5a4735ff
Branch: refs/heads/VCL-1082_lastcheckin_db_epoch
Commit: 5a4735ff947e73822a9b418859c49a2a23706803
Parents: 2fb5c2d 01b9a6e
Author: gjenning <gj...@gmjjavadesigns.com>
Authored: Mon Oct 15 14:50:26 2018 -0400
Committer: GitHub <no...@github.com>
Committed: Mon Oct 15 14:50:26 2018 -0400
----------------------------------------------------------------------
doap_vcl.rdf | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------