-
Notifications
You must be signed in to change notification settings - Fork 292
Reapply "CA-403867: Block pool join if IP not configured on cluster n… #6441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ff20c17
to
4dda4cb
Compare
We can re-apply the fix as the blocking/required update in XenRT has been merged. |
ocaml/xapi/xapi_pool.ml
Outdated
~self:(Helpers.get_localhost ~__context) | ||
|> List.filter (fun p -> | ||
List.exists | ||
(fun d -> Db.PIF.get_device ~__context ~self:p = d) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest using the PIF.network -> Network.bridge to determine if they are corresponding devices.
The device names here will not be renamed as eth with the network device ordering feature. In other words, the devices connect to the same network may have different names.
ocaml/xapi/xapi_pool.ml
Outdated
| pif when pif = Ref.null -> | ||
() | ||
| pif -> ( | ||
match Client.PIF.get_VLAN ~rpc ~session_id ~self:pif with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is quite a bit of nesting here. Can we take put some of these into a inner function to reduce this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to squash your commit, otherwise LGTM
Refix with some review comments addressed. To join a host into a pool with cluster enabled, the host must have one and only one IP configured on the joining cluster network. If not, after the host joinied the pool, GFS2 SR cannot be plugged on the joined host because an IP is required in the cluster network. Pool join in this scenario has been blocked in XenCenter, here we will block it inside xapi. Signed-off-by: Gang Ji <gang.ji@cloud.com>
02e17f3
to
caaad26
Compare
…etwork"
This reverts commit 8ce5a53.