Crashing with error "Index 'present' was not found on table 'stf.devices'"
FTL/reaper 28116 [reaper001] Unable to load initial state { name: 'ReqlOpFailedError',
msg: 'Index present was not found on table stf.devices.',
frames: [],
message: 'Index present was not found on table stf.devices in:\nr.table("devices").getAll(true, {index: "present"})\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^' }
FTL/util:lifecycle 28116 [reaper001] Shutting down due to fatal error
FTL/cli:local 28106 [*] Child process had an error ExitError: Exit code "1"
at ChildProcess.
Well, this is a known bug which is already fixed in master branch. Looks like you have installed stf using npm and npm latest version is pretty old compare to master branch. Refer: https://github.com/openstf/stf/issues/117
You have two choices. 1 Add 'present' index manually in devices table
- Go to rethinkdb administrative UI (http://localhost:8080)
- Open Data Explorer
- Add index using query
r.db("stf").table("devices").indexCreate('present');
- Make sure your device table should look like below, check using this query.
r.db("stf").table("devices").info();
Output
{
"db":{
"id":"7195ff75-7ddf-49b5-99e9-64cebbd75da8",
"name":"stf",
"type":"DB"
},
"doc_count_estimates":[
0
],
"id":"e4363c74-eaa3-42b6-b4d7-f019caed0bf6",
"indexes":[
"owner",
"present",
"providerChannel"
],
"name":"devices",
"primary_key":"serial",
"type":"TABLE"
}
2 Use master branch
You can find instruction here
Most probably the problem is related to this rethinkdb bug. I am now able to reproduce this with rethinkdb < 2.1.3
These are my findings with different rethinkdb versions.
2.1.1 - X 2.1.3 - O 2.1.4 - O 2.1.5 - O
The problem is because indexes in devices tables are being created parallel and only the last one is actually being created.
Problem occurs only with older rethinkdb.
Now, you can run stf doctor command in order to confirm all the stf dependencies.