@@ -112,82 +112,6 @@ let pre_join_checks ~__context ~rpc ~session_id ~force =
112
112
)
113
113
)
114
114
in
115
- let one_ip_configured_on_joining_cluster_network () =
116
- match Client.Cluster_host. get_all ~rpc ~session_id with
117
- | [] ->
118
- ()
119
- | ch :: _ -> (
120
- let cluster =
121
- Client.Cluster_host. get_cluster ~rpc ~session_id ~self: ch
122
- in
123
- match
124
- Client.Cluster. get_pool_auto_join ~rpc ~session_id ~self: cluster
125
- with
126
- | false ->
127
- ()
128
- | true -> (
129
- match Client.Cluster_host. get_PIF ~rpc ~session_id ~self: ch with
130
- | pif when pif = Ref. null ->
131
- ()
132
- | pif -> (
133
- match Client.PIF. get_VLAN ~rpc ~session_id ~self: pif with
134
- | vlan when vlan > 0L ->
135
- error
136
- " Cannot join pool whose clustering is enabled on VLAN network" ;
137
- raise
138
- (Api_errors. Server_error
139
- ( Api_errors
140
- .pool_joining_pool_cannot_enable_clustering_on_vlan_network
141
- , [Int64. to_string vlan]
142
- )
143
- )
144
- | 0L | _ -> (
145
- let clustering_devices_in_pool =
146
- ( match
147
- Client.PIF. get_bond_master_of ~rpc ~session_id ~self: pif
148
- with
149
- | [] ->
150
- [pif]
151
- | bonds ->
152
- List. concat_map
153
- (fun bond ->
154
- Client.Bond. get_slaves ~rpc ~session_id ~self: bond
155
- )
156
- bonds
157
- )
158
- |> List. map (fun self ->
159
- Client.PIF. get_device ~rpc ~session_id ~self
160
- )
161
- in
162
- match
163
- Db.Host. get_PIFs ~__context
164
- ~self: (Helpers. get_localhost ~__context)
165
- |> List. filter (fun p ->
166
- List. exists
167
- (fun d -> Db.PIF. get_device ~__context ~self: p = d)
168
- clustering_devices_in_pool
169
- && Db.PIF. get_IP ~__context ~self: p <> " "
170
- )
171
- with
172
- | [_] ->
173
- ()
174
- | _ ->
175
- error
176
- " Cannot join pool as the joining host needs to have one \
177
- (and only one) IP address on the network that will be \
178
- used for clustering." ;
179
- raise
180
- (Api_errors. Server_error
181
- ( Api_errors
182
- .pool_joining_host_must_have_only_one_IP_on_clustering_network
183
- , []
184
- )
185
- )
186
- )
187
- )
188
- )
189
- )
190
- in
191
115
(* CA-26975: Pool edition MUST match *)
192
116
let assert_restrictions_match () =
193
117
let my_edition =
@@ -964,7 +888,6 @@ let pre_join_checks ~__context ~rpc ~session_id ~force =
964
888
assert_management_interface_exists () ;
965
889
ha_is_not_enable_on_me () ;
966
890
clustering_is_not_enabled_on_me () ;
967
- one_ip_configured_on_joining_cluster_network () ;
968
891
ha_is_not_enable_on_the_distant_pool () ;
969
892
assert_not_joining_myself () ;
970
893
assert_i_know_of_no_other_hosts () ;
0 commit comments