You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We renamed one of our sites (TOPAS -> TOPAS-CPU) and reused the MachineType names. TARDIS requested and managed the drones fine. However, the SqliteRegistry plugin did not insert new drones into the database. The log entry looks fine:
The MachineTypes tables in the database connect the site_id and the MachineType. The values for the site of the MachineTypes were not updated after the change of the configuration.
sqlite> select * from Sites;
1|TOPAS
602|TOPAS-CPU
187|TOPAS-GPU
sqlite> select * from MachineTypes;
1|singlecore|1
2|eightcore|1
25|eightcore_small|1
547|singlegpu|187
2218|testgpu|187
Therefore, the MachineType was assigned to the wrong site_id; as a result, the insertion of new drones failed. After an update of the entries in the MachineTypes table, it works fine.
Is it possible to include a sanity check or change the SQL insertion query to get an error message? That would help to detect such problems.
The text was updated successfully, but these errors were encountered:
Maybe you should add a bit more information here. Part of the problem is the schema of the table MachineTypes (machine_type_id INTEGER PRIMARY KEY AUTOINCREMENT, machine_type VARCHAR(255) UNIQUE, site_id INTEGER, FOREIGN KEY(site_id) REFERENCES Sites(site_id)). As point out by @giffels part of the solution is to not decalre site_id and machine_type unique independent of each other (as is now) but add a contraint like CONSTRAINT UNIQUE_site_machinetype UNIQUE (machine_type,site_id) in the schema.
We renamed one of our sites (TOPAS -> TOPAS-CPU) and reused the MachineType names. TARDIS requested and managed the drones fine. However, the SqliteRegistry plugin did not insert new drones into the database. The log entry looks fine:
The MachineTypes tables in the database connect the site_id and the MachineType. The values for the site of the MachineTypes were not updated after the change of the configuration.
Therefore, the MachineType was assigned to the wrong site_id; as a result, the insertion of new drones failed. After an update of the entries in the MachineTypes table, it works fine.
Is it possible to include a sanity check or change the SQL insertion query to get an error message? That would help to detect such problems.
The text was updated successfully, but these errors were encountered: