File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,18 @@ let pre_join_checks ~__context ~rpc ~session_id ~force =
113113
114114 (* The maximum pool size allowed must be restricted to 3 hosts for the pool which does not have Pool_size feature *)
115115 let assert_pool_size_unrestricted () =
116- if (not (Pool_features. is_enabled ~__context Features. Pool_size )) &&
117- (List. length (Client.Host. get_all ~rpc ~session_id ) > = Xapi_globs. restricted_pool_size) then
116+ let allowed =
117+ let dom0 = Helpers. get_domain_zero ~__context in
118+ Db.VM. get_records_where ~__context
119+ ~expr: (Eq (Field " is_control_domain" , Literal " true" ))
120+ |> List. exists (fun (vmref , vmrec ) ->
121+ (vmref <> dom0) &&
122+ (Xapi_stdext_std.Xstringext.String. endswith " -CVM" vmrec.API. vM_name_label)
123+ )
124+ in
125+ if (not allowed) &&
126+ (not (Pool_features. is_enabled ~__context Features. Pool_size )) &&
127+ (List. length (Client.Host. get_all ~rpc ~session_id ) > = Xapi_globs. restricted_pool_size) then
118128 raise (Api_errors. Server_error (Api_errors. license_restriction, [Features. name_of_feature Features. Pool_size ]))
119129 in
120130
You can’t perform that action at this time.
0 commit comments