Not able to change device type

Blockquote

====================================

Component Version
LibreNMS 1.33-297-g34ed39c
DB Schema 227
PHP 7.0.25
MySQL 5.5.56-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2
====================================

[OK] Database connection successful
[OK] Database schema correct

Blockquote

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.

I am also seeing this issue. Here is my install information.

====================================

Component Version
LibreNMS 1.33-308-g4fc946b
DB Schema 227
PHP 7.0.22-0ubuntu0.16.04.1
MySQL 10.0.31-MariaDB-0ubuntu0.16.04.2
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3

====================================

[OK] Database connection successful
[OK] Database schema correct

Issue has been opened for this in github

This issue has been fixed but still how can you add custom device types?

You can’t add custom device types. But you can setup device groups. Check out docs.librenms.org for device groups.