Occasionally, the QFabric system might output the "Failed to determine director device id from hostname" error message when the show fabric session-host command is executed from the Command Line Interface (CLI).
show fabric session-host
This article gives a possible reason and the steps to resolve the error.
In a QFabric system, when the show fabric session-host command is executed from the CLI, the name of the primary Director Group (DG) is expected as output.
However, in a rare chance, the following error may be output:
root@jtac-qfabric> show fabric session-host error: Failed to determine director device id from hostname
While debugging in a customer's setup, a stale DG entry was found in the MySQL database after one of the DGs had been replaced through Return Material Authorization (RMA). The old DG entry had not been removed automatically, causing the show fabric session-host command to give the above error.
Confirm the current entries that exist in the MySQL database by executing the following command:
mysql -h db -u root -ppassword sfcdb -e "SELECT * from compute_cluster.DirectorDevices;"
Excerpt in lab
[root@dg0 ~]# mysql -h db -u root -ppassword sfcdb -e "SELECT * from compute_cluster.DirectorDevices;" +----+----------+--------------------------------------+------------------+-------------+ | id | hostname | uuid | serial_id | cp_address | +----+----------+--------------------------------------+------------------+-------------+ | 1 | dg0 | 844226d3-18f4-e011-a5ed-109c709504c2 | 0281092011000027 | 169.254.0.1 | | 4 | dg0 | f0b3f449-3f01-e511-9230-e5b098d7f28b | 0281052015000013 | 169.254.0.1 | | 7 | dg1 | e89e02d9-d6ab-e111-9754-c21a8d095034 | 0281052012000022 | 169.254.0.2 | +----+----------+--------------------------------------+------------------+-------------+ [root@dg0 ~]#
Check the current DG's serial number by executing the following command:
show fabric administration inventory
root@jtac-qfabric> show fabric administration inventory | last 3 Director group DG0 0281092011000027 Connected DG1 0281052012000022 Connected
Compare these serial numbers with the serial_id column that is displayed in the output of step 1. In this example, ID 4 , which is shown as serial number 0281052015000013 is the stale one.
serial_id
4
0281052015000013
Manually delete the stale entry by using the following command (add the appropriate serial number in the command):
mysql -h db -u root -ppassword sfcdb -e "DELETE FROM compute_cluster.DirectorDevices WHERE serial_id = '0281052015000013';"
Verify that the stale entry was deleted. Use the same command as in step 1 to confirm.
Excerpt in lab after step 4 is completed
[root@dg1 ~]# mysql -h db -u root -ppassword sfcdb -e "SELECT * from compute_cluster.DirectorDevices;" +----+----------+--------------------------------------+------------------+-------------+ | id | hostname | uuid | serial_id | cp_address | +----+----------+--------------------------------------+------------------+-------------+ | 1 | dg0 | 844226d3-18f4-e011-a5ed-109c709504c2 | 0281092011000027 | 169.254.0.1 | | 7 | dg1 | e89e02d9-d6ab-e111-9754-c21a8d095034 | 0281052012000022 | 169.254.0.2 | +----+----------+--------------------------------------+------------------+-------------+ [root@dg1 ~]#
Now verify that the show fabric session-host outputs the expected information.
root@jtac-qfabric> show fabric session-host Identifier: DG0 root@jtac-qfabric>