You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2017/12/19 23:14:38 UTC
[08/12] mesos git commit: Updated logging for storage local resource
provider.
Updated logging for storage local resource provider.
Review: https://reviews.apache.org/r/64664/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a36e2ec0
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a36e2ec0
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a36e2ec0
Branch: refs/heads/master
Commit: a36e2ec0d968b5ab48d14a9260151eeb8ade1c26
Parents: 6965084
Author: Chun-Hung Hsiao <ch...@mesosphere.io>
Authored: Tue Dec 19 11:25:21 2017 -0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Tue Dec 19 15:14:22 2017 -0800
----------------------------------------------------------------------
src/resource_provider/manager.cpp | 4 ++-
src/resource_provider/storage/provider.cpp | 40 ++++++++++++++-----------
2 files changed, 25 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/a36e2ec0/src/resource_provider/manager.cpp
----------------------------------------------------------------------
diff --git a/src/resource_provider/manager.cpp b/src/resource_provider/manager.cpp
index 2a167aa..e3fcb64 100644
--- a/src/resource_provider/manager.cpp
+++ b/src/resource_provider/manager.cpp
@@ -671,7 +671,9 @@ void ResourceProviderManagerProcess::updateState(
LOG(INFO)
<< "Received UPDATE_STATE call with resources '" << update.resources()
- << "' from resource provider " << resourceProvider->info.id();
+ << "' and " << offerOperations.size()
+ << " offer operations from resource provider "
+ << resourceProvider->info.id();
ResourceProviderMessage::UpdateState updateState{
resourceProvider->info,
http://git-wip-us.apache.org/repos/asf/mesos/blob/a36e2ec0/src/resource_provider/storage/provider.cpp
----------------------------------------------------------------------
diff --git a/src/resource_provider/storage/provider.cpp b/src/resource_provider/storage/provider.cpp
index a6e4a0f..ab8c711 100644
--- a/src/resource_provider/storage/provider.cpp
+++ b/src/resource_provider/storage/provider.cpp
@@ -1132,8 +1132,8 @@ Future<Nothing> StorageLocalResourceProviderProcess::reconcileStatusUpdates()
auto die = [=](const string& message) {
LOG(ERROR)
- << "Failed to update status of offer operation with UUID " << uuid
- << ": " << message;
+ << "Failed to update status of offer operation (uuid: " << uuid
+ << "): " << message;
fatal();
};
@@ -1157,7 +1157,7 @@ Future<Nothing> StorageLocalResourceProviderProcess::reconcileStatusUpdates()
auto err = [](const id::UUID& uuid, const string& message) {
LOG(ERROR)
- << "Falied to apply offer operation with UUID " << uuid << ": "
+ << "Falied to apply offer operation (uuid: " << uuid << "): "
<< message;
};
@@ -1356,8 +1356,8 @@ void StorageLocalResourceProviderProcess::applyOfferOperation(
CHECK_SOME(uuid);
LOG(INFO)
- << "Received " << operation.info().type() << " operation with UUID "
- << uuid.get();
+ << "Received " << operation.info().type() << " operation '"
+ << operation.info().id() << "' (uuid: " << uuid.get() << ")";
CHECK(!offerOperations.contains(uuid.get()));
offerOperations[uuid.get()] = protobuf::createOfferOperation(
@@ -1396,8 +1396,7 @@ void StorageLocalResourceProviderProcess::applyOfferOperation(
auto err = [](const id::UUID& uuid, const string& message) {
LOG(ERROR)
- << "Failed to apply offer operation with UUID " << uuid << ": "
- << message;
+ << "Failed to apply offer operation (uuid: " << uuid << "): " << message;
};
result
@@ -1559,8 +1558,8 @@ void StorageLocalResourceProviderProcess::acknowledgeOfferOperation(
auto err = [](const id::UUID& uuid, const string& message) {
LOG(ERROR)
- << "Failed to acknowledge status update for offer operation with UUID "
- << uuid << ": " << message;
+ << "Failed to acknowledge status update for offer operation (uuid: "
+ << uuid << "): " << message;
};
// NOTE: It is possible that an incoming acknowledgement races with an
@@ -1628,8 +1627,8 @@ void StorageLocalResourceProviderProcess::reconcileOfferOperations(
auto die = [=](const string& message) {
LOG(ERROR)
- << "Failed to update status of offer operation with UUID " << uuid.get()
- << ": " << message;
+ << "Failed to update status of offer operation (uuid: " << uuid.get()
+ << "): " << message;
fatal();
};
@@ -2636,11 +2635,11 @@ Future<Nothing> StorageLocalResourceProviderProcess::_applyOfferOperation(
LOG(INFO)
<< "Applying conversion from '" << conversions->at(0).consumed
<< "' to '" << conversions->at(0).converted
- << "' for offer operation with UUID " << operationUuid;
+ << "' for offer operation (uuid: " << operationUuid << ")";
} else {
LOG(ERROR)
- << "Failed to apply offer operation with UUID " << operationUuid
- << ": " << conversions.error();
+ << "Failed to apply offer operation (uuid: " << operationUuid
+ << "): " << conversions.error();
}
promise->associate(
@@ -2949,8 +2948,8 @@ Try<Nothing> StorageLocalResourceProviderProcess::updateOfferOperationStatus(
auto die = [=](const string& message) {
LOG(ERROR)
- << "Failed to update status of offer operation with UUID "
- << operationUuid << ": " << message;
+ << "Failed to update status of offer operation (uuid: " << operationUuid
+ << "): " << message;
fatal();
};
@@ -3027,6 +3026,11 @@ void StorageLocalResourceProviderProcess::sendResourceProviderStateUpdate()
update->add_operations()->CopyFrom(operation);
}
+ LOG(INFO)
+ << "Sending UPDATE_STATE call with resources '" << totalResources
+ << "' and " << update->operations_size()
+ << " offer operations to agent " << slaveId;
+
auto err = [](const ResourceProviderID& id, const string& message) {
LOG(ERROR)
<< "Failed to update state for resource provider " << id << ": "
@@ -3061,8 +3065,8 @@ void StorageLocalResourceProviderProcess::sendOfferOperationStatusUpdate(
auto err = [](const id::UUID& uuid, const string& message) {
LOG(ERROR)
- << "Failed to send status update for offer operation with UUID " << uuid
- << ": " << message;
+ << "Failed to send status update for offer operation (uuid: " << uuid
+ << "): " << message;
};
Try<id::UUID> uuid =