Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[server][Action] Reexecute action mechanism. #2472

Merged
merged 2 commits into from
Dec 28, 2016

Conversation

kz0817
Copy link
Member

@kz0817 kz0817 commented Dec 22, 2016

This is a revised version of #2471

This patch adds a feature that executes unfinished actions
when Hatohol server restarts.

Currently, when the Hatohol server craashes or quits forcely,
running and queued actions aren't taken care on the restart of
Hatohol server.

This patch adds a feature that executes unfinished actions
when Hatohol server restarts.

Currently, when the Hatohol server craashes or quits forcely,
running and queued actions aren't taken care on the restart of
Hatohol server.
eventOption.setTargetServerId(actionLog.serverId);
eventOption.setEventIds({actionLog.eventId});
dbMonitoring.getEventInfoList(eventList, eventOption);
if (eventList.empty())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to show warning in this condition ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to show logs

actionOption.setActionIdList(actionIdList);
dbAction.getActionList(actionList, actionOption);

if (actionList.empty())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too


// Re execute unfinished action
ActionManager actionManager;
actionManager.reExecuteUnfinishedAction();
Copy link
Contributor

@cosmo0920 cosmo0920 Dec 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memo: I've noticed that Hatohol server blocks in this line when bunch of unfinished actions are remained.
But for now, this implementation is no problem to re-execute unfinished actions.

This patch logs an error messages when the event or
action is not found and should be merged into the
following commit.

commit 512ecdc
Author: Kazuhiro Yamato <[email protected]>
Date:   Wed Dec 21 19:39:44 2016 +0900

    [server][Action] Reexecute action mechanism.
@kz0817
Copy link
Member Author

kz0817 commented Dec 27, 2016

I added an error messages.
Please merge the PR if there's no problem.

@cosmo0920 cosmo0920 merged commit 67cde5f into work-for-splitting-#2370 Dec 28, 2016
@cosmo0920 cosmo0920 deleted the work-for-splitting-#2370-reexec3 branch December 28, 2016 01:02
@ashie ashie removed the in progress label Dec 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants