Commit a59f1c9
authored
CA-416351: Slave shutdown timeout (#6645)
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.2 files changed
+14
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
| 105 | + | |
| 106 | + | |
108 | 107 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 108 | + | |
| 109 | + | |
112 | 110 | | |
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
116 | 114 | | |
117 | 115 | | |
118 | 116 | | |
| 117 | + | |
119 | 118 | | |
120 | | - | |
| 119 | + | |
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
| |||
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
135 | | - | |
136 | | - | |
137 | | - | |
| 134 | + | |
| 135 | + | |
138 | 136 | | |
139 | | - | |
| 137 | + | |
140 | 138 | | |
141 | 139 | | |
142 | 140 | | |
| |||
159 | 157 | | |
160 | 158 | | |
161 | 159 | | |
| 160 | + | |
162 | 161 | | |
163 | | - | |
| 162 | + | |
164 | 163 | | |
165 | 164 | | |
166 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
795 | 795 | | |
796 | 796 | | |
797 | 797 | | |
798 | | - | |
799 | | - | |
800 | | - | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
801 | 801 | | |
802 | 802 | | |
803 | 803 | | |
| |||
0 commit comments