[racktables-users] Parent Child relationship bug

  • From: Chris James <chris@xxxxxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Wed, 26 Aug 2015 08:46:03 -0700

Discovered a bug - if a child has multiple parents i.e. server to server
chassis and same server to vm cluster, the ID of the object is used for the
order of operations so if a child is created after a parent the ordering is
affected.

The parent and child relationships are being derived on the basis of IDs.
Therefore if you create the objects in the wrong order the relationship is
affected.

((child entities in this example are the first blade in 3 different chassis
that are all in the same VM Cluster thus 2 parents))

Example:
SELECT * FROM `EntityLink` where `child_entity_id` in (1095, 950, 981)
ORDER BY `EntityLink`.`child_entity_id` ASC

Result:
id parent_entity_type parent_entity_id child_entity_type
<https://rack.datacate.net/phpmyadmin/sql.php?db=racktables_db&table=EntityLink&sql_query=SELECT+%2A+FROM+%60EntityLink%60+where+%60child_entity_id%60+in+%281095%2C+950%2C+981%29%0AORDER+BY+%60EntityLink%60.%60child_entity_id%60++DESC&session_max_rows=30&token=debfe6bf210922f5e0def0fc363fc340>
child_entity_id 1026 object 1073 object 950 1027 object 872 object 950 596
object 977 object 981 783 object 1073 object 981 1029 object 1457 object
1095 1046 object 1073 object 1095

872, 977, and 1457 are Server Chassis.
1073 is the VM Cluster.
In this case object 1457 displays incorrectly in graphwiz, and the order on
the properties page is reversed.
Recreating the VM Cluster new id is 1460 - Everything works perfect.

Isn't it common to create the "top level" parent entity first?


Does this make sense?

--
This e-mail message may contain confidential or legally privileged
information and is intended only for the use of the intended recipient(s).
Any unauthorized disclosure, dissemination, distribution, copying or the
taking of any action in reliance on the information herein is prohibited.
E-mails are not secure and cannot be guaranteed to be error free as they
can be intercepted, amended, or contain viruses. Anyone who communicates
with us by e-mail is deemed to have accepted these risks. This company is
not responsible for errors or omissions in this message and denies any
responsibility for any damage arising from the use of e-mail. Any opinion
and other statement contained in this message and any attachment are solely
those of the author and do not necessarily represent those of the company.

Other related posts:

  • » [racktables-users] Parent Child relationship bug - Chris James