Skip to content

Commit d958124

Browse files
committed
XSI-1954: Only block pool join for clustering on non-management VLAN
It is because the known issue is only with non-management VLAN: https://docs.xenserver.com/en-us/xenserver/8/storage/format#thin-provisioned-shared-gfs2-block-storage We recommend not to use a GFS2 SR with a VLAN due to a known issue where you cannot add or remove hosts on a clustered pool if the cluster network is on a non-management VLAN. Signed-off-by: Gang Ji <[email protected]>
1 parent 278ab35 commit d958124

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

ocaml/xapi/xapi_pool.ml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,23 @@ let pre_join_checks ~__context ~rpc ~session_id ~force =
118118
| pif when pif = Ref.null ->
119119
()
120120
| pif -> (
121-
match Client.PIF.get_VLAN ~rpc ~session_id ~self:pif with
122-
| vlan when vlan > 0L ->
123-
error "Cannot join pool whose clustering is enabled on VLAN network" ;
121+
match
122+
( Client.PIF.get_VLAN ~rpc ~session_id ~self:pif
123+
, Client.PIF.get_management ~rpc ~session_id ~self:pif
124+
)
125+
with
126+
| vlan, false when vlan > 0L ->
127+
error
128+
"Cannot join pool whose clustering is enabled on a \
129+
non-management VLAN network" ;
124130
raise
125131
(Api_errors.Server_error
126132
( Api_errors
127133
.pool_joining_pool_cannot_enable_clustering_on_vlan_network
128134
, [Int64.to_string vlan]
129135
)
130136
)
131-
| 0L | _ -> (
137+
| _ -> (
132138
let clustering_bridges_in_pool =
133139
( match
134140
Client.PIF.get_bond_master_of ~rpc ~session_id ~self:pif

0 commit comments

Comments
 (0)