You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before shutting down, xapi calls `xapi_pre_shutdown` to execute several
pre-shutdown scripts, which require the current host's UUID as a
parameter.
Currently, xapi obtains this UUID in a redundant manner:
1. It retrieves the UUID from the local inventory file.
2. It queries the database for the host's reference using the UUID.
3. It queries the database again for the host's UUID using the reference
obtained in step 2.
Steps 2 and 3 are unnecessary since the UUID is already available from
step 1. Moreover, when the master stops, the slave fails to query the
database, increasing xapi shutdown times on the slave.
The solution is to directly use the UUID obtained in step 1, eliminating
the redundant database queries.
Signed-off-by: Bengang Yuan <[email protected]>
0 commit comments