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

fix aggregation of death message of SUT in case of instance death #12260

Merged
merged 5 commits into from Jul 23, 2020

Conversation

@dothebart dothebart requested review from jsteemann and KVS85 Jul 20, 2020
@@ -1082,7 +1082,12 @@ function checkArangoAlive (arangod, options) {
const ret = res.status === 'RUNNING' && crashUtils.checkMonitorAlive(ARANGOD_BIN, arangod, options, res);

if (!ret) {
print(Date() + ' ArangoD with PID ' + arangod.pid + ' gone:');
if (!arangod.hasOwnProperty('message')) {
arangod.message = '';

This comment has been minimized.

@KVS85

KVS85 Jul 20, 2020
Contributor

What logic has message for instance info structure?

}
let msg = ' ArangoD of role [' + arangod.role + '] with PID ' + arangod.pid + ' is gone';
print(Date() + msg + ':');
arangod.message += (arangod.message.len === 0) ? '\n' : '' + msg + ' ';

This comment has been minimized.

@KVS85

KVS85 Jul 20, 2020
Contributor

That could leave a comment with the following structure:

LOG:
OTHER LOG

Will OTHER LOG be logically connected to LOG here?

msg = 'health Check Signal(' + res.signal + ') ';
analyzeServerCrash(arangod, options, msg);
serverCrashedLocal = true;
print(Date() + " checkArangoAlive: Marking crashy - " + JSON.stringify(arangod));
arangod.message += msg;
msg = " checkArangoAlive: Marking crashy";
arangod.message += msg;
print(Date() + msg + ' - ' + JSON.stringify(arangod));
Comment on lines +1104 to +1110

This comment has been minimized.

@KVS85

KVS85 Jul 20, 2020
Contributor

Why msg is reused here?

Initially we will print Date() + ' ArangoD of role [' + arangod.role + '] with PID ' + arangod.pid + ' is gone' + ':'.

arangod.message finally will be

' ArangoD of role [' + arangod.role + '] with PID ' + arangod.pid + ' is gone ' + 'health Check Signal(' + res.signal + ') ' + " checkArangoAlive: Marking crashy"

or

'\n ' + 'health Check Signal(' + res.signal + ') ' + " checkArangoAlive: Marking crashy"

Afterwards we print Date() + msg + ' - ' + JSON.stringify(arangod). arangod here will have ' ArangoD of role [' + arangod.role + '] with PID ' + arangod.pid + ' is gone ' + 'health Check Signal(' + res.signal + ') ' + " checkArangoAlive: Marking crashy".

What is the logic of interpretation?

This comment has been minimized.

@dothebart

dothebart Jul 21, 2020
Author Contributor

simply msg is re-used. But its re-assigned a value, so its content doesn't add up.

@@ -2039,6 +2052,7 @@ function startInstance (protocol, options, addArgs, testname, tmpDir) {
let rootDir = fs.join(tmpDir || fs.getTempPath(), testname);

let instanceInfo = {
message: '',

This comment has been minimized.

@KVS85

KVS85 Jul 20, 2020
Contributor

Why we didn't need it before?

This comment has been minimized.

@dothebart

dothebart Jul 21, 2020
Author Contributor

its now there so we can aggregate failure messages on it.

return previous && checkArangoAlive(arangod, options);
let ret = checkArangoAlive(arangod, options);
if (!ret) {
instanceInfo.message += arangod.message;

This comment has been minimized.

@KVS85

KVS85 Jul 20, 2020
Contributor

What's instanceInfo here? Why would it accumulate all arangods messages of each failed arangod?

This comment has been minimized.

@dothebart

dothebart Jul 21, 2020
Author Contributor

Instance is the whole instance - data of a full cluster / leader follower.
It contains an array of process instances, which are i.e. db-server.
If one (or more) fail the check, and now got error messages, its collected into the total instance.

js/client/modules/@arangodb/test-utils.js Outdated Show resolved Hide resolved
results[te] = {
status: false,
message: 'server is dead: + ' + results[te].message
message: 'server is dead: ' + msg + instanceInfo.message

This comment has been minimized.

@KVS85

KVS85 Jul 20, 2020
Contributor

How can results[te].message not have results[te].message.length > 0? Where is it set?

This comment has been minimized.

@dothebart

dothebart Jul 21, 2020
Author Contributor

If there has been a test-result with a failure, this may still be in there.

dothebart and others added 2 commits Jul 21, 2020
Co-authored-by: Jan <jsteemann@users.noreply.github.com>
@jsteemann jsteemann added this to the devel milestone Jul 23, 2020
@KVS85 KVS85 merged commit 03a60aa into devel Jul 23, 2020
@KVS85 KVS85 deleted the bug-fix/fix-test-status-sut-died branch Jul 23, 2020
dothebart added a commit that referenced this pull request Jul 23, 2020
…2260)

* fix aggregation of death message of SUT in case of instance death

* Update js/client/modules/@arangodb/process-utils.js

Co-authored-by: Jan <jsteemann@users.noreply.github.com>

* fix condition

Co-authored-by: Jan <jsteemann@users.noreply.github.com>
dothebart added a commit that referenced this pull request Jul 23, 2020
…2260)

* fix aggregation of death message of SUT in case of instance death

* Update js/client/modules/@arangodb/process-utils.js

Co-authored-by: Jan <jsteemann@users.noreply.github.com>

* fix condition

Co-authored-by: Jan <jsteemann@users.noreply.github.com>
dothebart added a commit that referenced this pull request Jul 23, 2020
…2260)

* fix aggregation of death message of SUT in case of instance death

* Update js/client/modules/@arangodb/process-utils.js

Co-authored-by: Jan <jsteemann@users.noreply.github.com>

* fix condition

Co-authored-by: Jan <jsteemann@users.noreply.github.com>
KVS85 pushed a commit that referenced this pull request Jul 23, 2020
…2260) (#12284)

* fix aggregation of death message of SUT in case of instance death

* Update js/client/modules/@arangodb/process-utils.js

Co-authored-by: Jan <jsteemann@users.noreply.github.com>

* fix condition

Co-authored-by: Jan <jsteemann@users.noreply.github.com>

Co-authored-by: Jan <jsteemann@users.noreply.github.com>
KVS85 added a commit that referenced this pull request Jul 24, 2020
…2260) (#12282)

* fix aggregation of death message of SUT in case of instance death

* Update js/client/modules/@arangodb/process-utils.js

Co-authored-by: Jan <jsteemann@users.noreply.github.com>

* fix condition

Co-authored-by: Jan <jsteemann@users.noreply.github.com>

Co-authored-by: Jan <jsteemann@users.noreply.github.com>
Co-authored-by: KVS85 <vadim@arangodb.com>
KVS85 added a commit that referenced this pull request Jul 24, 2020
…2260) (#12286)

* fix aggregation of death message of SUT in case of instance death

* Update js/client/modules/@arangodb/process-utils.js

Co-authored-by: Jan <jsteemann@users.noreply.github.com>

* fix condition

Co-authored-by: Jan <jsteemann@users.noreply.github.com>

Co-authored-by: Jan <jsteemann@users.noreply.github.com>
Co-authored-by: KVS85 <vadim@arangodb.com>
KVS85 added a commit that referenced this pull request Sep 1, 2020
* fix aggregation of death message of SUT in case of instance death (#12260)

* fix aggregation of death message of SUT in case of instance death

* Update js/client/modules/@arangodb/process-utils.js

Co-authored-by: Jan <jsteemann@users.noreply.github.com>

* fix condition

Co-authored-by: Jan <jsteemann@users.noreply.github.com>

* add an exit code that indicates that the ICU-Initialization failed (#12493)

* @dothebart

* CHANGELOG

* Update CHANGELOG

Co-authored-by: Jan <jsteemann@users.noreply.github.com>

* Update CHANGELOG

Co-authored-by: Jan <jsteemann@users.noreply.github.com>
Co-authored-by: jsteemann <jan@arangodb.com>
Co-authored-by: Vadim <vadim@arangodb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.