I believe one of the recent updates broken my ability to change device type. I had some custom device types added trough config.php ($config[‘device_types’]) and one day devices started to randomly change to “Server”. So I removed my custom added types and tried to add them with higher id but it didn’t help. Now I have them removed completely but I’m not able to change device type to any other built in type. As soon as I change it to Workstation by example it goes back to Server and recent events shows “Device type changed workstation => server”. And even if I change database entry manually to something else than Server it goes back to server as soon as I open this device in browser. Any idea what could cause this?
edit: I didn’t think about checking logs first and I found something that I think is related to my issue:
MySQL Error: Cannot add or update a child row: a foreign key constraint fails (librenms.device_relationships, CONSTRAINT device_relationship_parent _device_id_fk FOREIGN KEY (parent_device_id) REFERENCES devices (device_id) ON DELETE CASCADE) (INSERT INTO device_relationships (parent_device_id,child_device_ id) VALUES (‘0’,‘284’))
It appears every time I try to change device type.
edit2: I just setup new vm with CentOS 7 and installed LibreNMS from scratch following guide and have the same issue for all devices that I added and tried change type from default to something else.