Open blackbasket opened 1 month ago
If I update the instantation_type in DB it looks good. Unfortunately only until the next inventory...
In some way it is recognized as aggregated port. In the DB the "source ports" are connected correctly. They are just not shown in WebUI because of the wrong overwritten instantation type...
HI @blackbasket
improvements have been made to the management of instantiation types in the main branch.
https://github.com/glpi-project/glpi/pull/16563
I don't know if this will solve your problem, but can you test with this version (on a test environment)?
https://nightly.glpi-project.org/glpi/ (choose main
version)
@stonebuzz The PR your are mentioning seems to be already present in GLPI 10.0.13.
yes, you're right (sorry) can you provide us with the inventory file for local testing?
Hi @stonebuzz
I only have access through iOS app for now... you may find the xml here: https://github.com/glpi-project/glpi-agent/issues/683#issuecomment-2136700618
After authorizing port import with iftype = 161
(1)
Have you defined the instantiation type
? (2)
If I set it to NetworkPortAggregate
Import works correctly
That's what I did... as said previously, I can find the ports in the DB as aggregated ports including the hardware ports... if I change the "Ethernet" port to aggregate in the DB, all is right until next inventory... it gets overwritten then...
jsut go here
then search network port type with decimal = 161
update it to set instantiation type to NetworkPortAggregate
(be sure import
is set to Yes
)
Then run an inventory and network port will by updated
But that is what I have done already... sorry, the screenshots came some minutes later...
changes made in the database may have altered the data
NetworkPortaggregate
INSTANTIATION type will fill another table
Can you delete / purge the equipment and then run inventory again?
Can you delete / purge the equipment and then run inventory again?
I will try...
but the ports were not added before I activated the port type in discussion... and I set Aggregation Port
the same time...
We see the following in GLPI 10.0.15 (there is an LACP configured Linux machine connected on port-channel47 and an LACP configured Windows machine connected on port-channel46). The connections are split over two identical switches.
But we also appear to be missing a column or am I missing something?
Switch 1
Switch 2
@stonebuzz
Deleting the device did not help... IDs of the Ports are new, but Port types remain wrong...
@GuidoWilden
The column network port types
is missing... you may add it using the tools icon next to network ports
on the top of the list...
Thank you @blackbasket, could add that column successfully.
@stonebuzz @cedric-anne let us know if there is anything else we can provide.
hi @stonebuzz @cedric-anne
just to make it more clear... if I look into the database, the port is defined as instantation_type = NetworkPortEthernet
but in the aggregates-table it is defnied as aggregate with the corresponding ports...
MariaDB [glpidb]> select * from glpi_networkports where id=1699;
+------+----------+------------------+-------------+--------------+----------------+------+---------------------+-------------------+---------+------------+------------+---------------------+---------------------+-------+------------+------------------+--------------------+-----------------------+------------+------------+------------+-------------+----------+---------+---------+------------+-------+--------+
| id | items_id | itemtype | entities_id | is_recursive | logical_number | name | instantiation_type | mac | comment | is_deleted | is_dynamic | date_mod | date_creation | ifmtu | ifspeed | ifinternalstatus |
ifconnectionstatus | iflastchange | ifinbytes | ifinerrors | ifoutbytes | ifouterrors | ifstatus | ifdescr | ifalias | portduplex | trunk | lastup |
+------+----------+------------------+-------------+--------------+----------------+------+---------------------+-------------------+---------+------------+------------+---------------------+---------------------+-------+------------+------------------+--------------------+-----------------------+------------+------------+------------+-------------+----------+---------+---------+------------+-------+--------+
| 1699 | 46 | NetworkEquipment | 5 | 0 | 53 | Trk5 | NetworkPortEthernet | b4:39:d6:8b:5c:00 | NULL | 0 | 1 | 2024-06-10 02:52:03 | 2024-06-06 16:58:22 | 1500 | 2000000000 | 1 |
0 | 266 days, 04:57:23.62 | 2274672300 | 2 | 2695243352 | 0 | 1 | Trk5 | NULL | NULL | 0 | NULL |
+------+----------+------------------+-------------+--------------+----------------+------+---------------------+-------------------+---------+------------+------------+---------------------+---------------------+-------+------------+------------------+--------------------+-----------------------+------------+------------+------------+-------------+----------+---------+---------+------------+-------+--------+
1 row in set (0.000 sec)
MariaDB [glpidb]> select * from glpi_networkportaggregates;
+----+-----------------+----------------------+---------------------+---------------------+
| id | networkports_id | networkports_id_list | date_mod | date_creation |
+----+-----------------+----------------------+---------------------+---------------------+
| 13 | 1664 | [1651,1652] | 2024-06-06 16:58:22 | 2024-06-06 16:58:22 |
| 14 | 1665 | [1649,1650] | 2024-06-06 16:58:22 | 2024-06-06 16:58:22 |
| 15 | 1666 | [1653,1654] | 2024-06-06 16:58:22 | 2024-06-06 16:58:22 |
| 16 | 1699 | [1646,1645] | 2024-06-06 16:58:22 | 2024-06-06 16:58:22 |
+----+-----------------+----------------------+---------------------+---------------------+
4 rows in set (0.000 sec)
only trunk 4 is missing completly... because of this (I think) the ports 7 and 8 are not even marked as part of an aggregated port...
@stonebuzz @cedric-anne any news on this subject? Is there anything else we can provide to help narrow this down?
I did the import using the xml file now. This worked also for me. So, it must have to do with the import function...
Wait, so you generated the xml on command line and then imported via Inventory > Import from file
?
exactly... but I realize that something is wrong anyway... now all Ports are connected to the same "virtual hub"... that was right before... of course not all devices are connected to all trunks ;)
well, everything it might be the result of the update to 10.0.15 thsi morning... if I run the tasks now, everything is correct... ports are shown as aggregates and "hubs" are correct as well... maybe @cedric-anne had a point and it just was not merged in 10.0.13 and 10.0.14...
remains the question, how to handle the hubs... maybe not a question for the ticket, but I just ask... for every port with mininum two connected item (i.e. MAC addresses or devices with management and ethernet port) a "hub" is created in unmanaged devices... furthermore a "hub link" without any information but the connected trunk itself is created as network port... how should I understand this and work with it? maybe I am just stupid, but I do not understand...
I have very much the same issue. Everything that is not a standard network port gets thrown into a bit of a mess in the interface. Saying that, I would not know how to do this either but it seems to me that there need to be more varied definitions of possible network configurations (LACP etc.) that are then also being displayed as such in the GUI. I know this should be a feature request rather than an issue but I have never figured out how to set this in GitHub.
Code of Conduct
Is there an existing issue for this?
Version
10.0.14
Bug description
Hi...
I try to inventory HP switches using Network Inventory with GLPI agent 1.8. After the help of @g-bougard I was able to import the inventoried ports... But the aggregated ports are imported as "NetworkPortEthernet" an not as "aggregated ports"... therefore I cannot assign the physical ports to the aggregated one...
reference: https://github.com/glpi-project/glpi-agent/issues/683
xml sample:
network port types:
switch network ports:
If I can provide any more helpful information, please let me know...
Regards, Marcel
Relevant log output
No response
Page URL
No response
Steps To reproduce
No response
Your GLPI setup information
Information about system installation & configuration
Server
GLPI constants
Libraries
SQL replicas
Notifications
Plugins list
Anything else?
No response