summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2012-07-10 16:53:26 -0700
committerStephen Hemminger <shemminger@vyatta.com>2012-07-11 11:41:14 -0700
commit628e456b5fc2c11cd474546461d1458a17d4ab56 (patch)
tree2e749ec84b10f7169d56e71b4ad3abc6481fba07
parent90c8a2c42b110679ff1c601a8d332a604552e46b (diff)
downloadvyatta-cfg-628e456b5fc2c11cd474546461d1458a17d4ab56.tar.gz
vyatta-cfg-628e456b5fc2c11cd474546461d1458a17d4ab56.zip
Log node of commit failure
Bug 8192 Put message in log about failed node
-rw-r--r--src/commit/commit-algorithm.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/commit/commit-algorithm.cpp b/src/commit/commit-algorithm.cpp
index 687e2df..e6356aa 100644
--- a/src/commit/commit-algorithm.cpp
+++ b/src/commit/commit-algorithm.cpp
@@ -1236,10 +1236,13 @@ commit::doCommit(Cstore& cs, CfgNode& cfg1, CfgNode& cfg2)
DelPrioQueueT dpq;
_get_commit_prio_queue(&proot, pq, dpq);
size_t s = 0, f = 0;
+
while (!dpq.empty()) {
PrioNode *p = dpq.top();
if (!_commit_exec_prio_subtree(cs, p)) {
// prio subtree failed
+ OUTPUT_USER("delete [ %s ] failed\n",
+ p->getCommitPath().to_string().c_str());
++f;
} else {
// succeeded
@@ -1251,6 +1254,8 @@ commit::doCommit(Cstore& cs, CfgNode& cfg1, CfgNode& cfg2)
PrioNode *p = pq.top();
if (!_commit_exec_prio_subtree(cs, p)) {
// prio subtree failed
+ OUTPUT_USER("[[%s]] failed\n",
+ p->getCommitPath().to_string().c_str());
++f;
} else {
// succeeded