Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.11.90, 1.10.10
-
Component/s: Database
-
Labels:
-
Environment:This problem has been found on a customer installation. There are services declared several times. One of them was SSH which was preventing to display the node page correctly (this one was manually fixed properly), but I found that not all the entries from ifservices associated with the exact same serviceName have the same serviceId, which is why adding a unique constraint over serviceName through liquibase is not enough to fix the problem, the ifservices table must be updated first.This problem has been found on a customer installation. There are services declared several times. One of them was SSH which was preventing to display the node page correctly (this one was manually fixed properly), but I found that not all the entries from ifservices associated with the exact same serviceName have the same serviceId, which is why adding a unique constraint over serviceName through liquibase is not enough to fix the problem, the ifservices table must be updated first.
Description
The service table on the DB (which is associated with the entity named OnmsServiceType) does not have a unique constraint for the servicename, which is conceptually wrong, because some methods from the ServiceTypeDao are going to fail if there are two instances of the same service.