blob: c07b42981702702df19eceb10c9f38787fec24ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Storage Node Watchdog - validate watchdog monitors --dbpath /journal
// @tags: [requires_wiredtiger,requires_journaling]
//
load("jstests/watchdog/lib/wd_test_common.js");
(function() {
'use strict';
function trimTrailingSlash(dir) {
if (dir.endsWith('/')) {
return dir.substring(0, dir.length - 1);
}
return dir;
}
let control = new CharybdefsControl("journalpath_hang");
const journalFusePath = control.getMountPath();
const dbPath = MongoRunner.toRealDir("$dataDir/mongod-journal");
const journalLinkPath = dbPath + "/journal";
resetDbpath(dbPath);
// Create a symlink from the non-fuse journal directory to the fuse mount.
const ret = run("ln", "-s", trimTrailingSlash(journalFusePath), journalLinkPath);
assert.eq(ret, 0);
// Set noCleanData so that the dbPath is not cleaned because we want to use the journal symlink.
testFuseAndMongoD(control, {dbpath: dbPath, noCleanData: true});
})();
|