Skip to content

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

Merged
merged 1 commit into from
May 8, 2025

Conversation

gangj
Copy link
Contributor

@gangj gangj commented Apr 27, 2025

…etwork"

This reverts commit 8ce5a53.

@gangj gangj force-pushed the private/gangj/CP-53800 branch from ff20c17 to 4dda4cb Compare April 27, 2025 05:46
@gangj
Copy link
Contributor Author

gangj commented Apr 27, 2025

We can re-apply the fix as the blocking/required update in XenRT has been merged.

~self:(Helpers.get_localhost ~__context)
|> List.filter (fun p ->
List.exists
(fun d -> Db.PIF.get_device ~__context ~self:p = d)
Copy link
Member

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.

| pif when pif = Ref.null ->
()
| pif -> (
match Client.PIF.get_VLAN ~rpc ~session_id ~self:pif with
Copy link
Contributor

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?

@gangj gangj requested review from Vincent-lau and minglumlu May 7, 2025 02:15
Copy link
Contributor

@Vincent-lau Vincent-lau left a 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>
@gangj gangj force-pushed the private/gangj/CP-53800 branch from 02e17f3 to caaad26 Compare May 8, 2025 02:58
@gangj gangj added this pull request to the merge queue May 8, 2025
Merged via the queue into xapi-project:master with commit 18e8584 May 8, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants