Skip to content

CP-51895: Drop FCoE support when fcoe_driver does not exists #6202

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 2 commits into from
Jan 7, 2025

Conversation

liulinC
Copy link
Collaborator

@liulinC liulinC commented Jan 2, 2025

FCoE support will be removed from XS9 and dom0 will no longer provide fcoe_driver. However, XS8 still actively support it.

Xapi checks the existence of fcoe_driver, and thinks all PIFs no longer support FCoE if fcoe_driver not found

FCoE support will be removed from XS9 and dom0 will no longer
provide fcoe_driver. However, XS8 still actively support it.

Xapi checks the existence of fcoe_driver, and thinks all PIFs
no longer support FCoE if fcoe_driver not found

Signed-off-by: Lin Liu <[email protected]>
@liulinC
Copy link
Collaborator Author

liulinC commented Jan 2, 2025

XS8 BST: 209859 (Dev Run)

| false ->
(* Does not support FCoE from XS9, presuming not in use
* Upgrade plugin will block upgrade with FCoE in use *)
()
Copy link
Member

@minglumlu minglumlu Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't know if the fcoe_driver is absent intentionally or not. The original logic would raise an exception to complain the absence of the driver. But now it would pass quietly.
In other words, if the driver does not exist, but it reaches here, it would be good to let it raise the exception to expose the error.

Copy link
Collaborator Author

@liulinC liulinC Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is the design, e.g Xapi would permit the absence of fcoe_driver, in which case, it think current XS does not support FCoE. If the driver does not exist, it is by intention.

There is another alternative by checking Xapi_version.product_version_text_short () and handle accordingly. (only for xapi, NOT for networkd). This seems NOT work for XCP, which is the reason I did not prefer. (because we have comments In the case of XCP, all product_* fields will be blank).
@minglumlu what is the suggestion?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggestion is not changing this function at all.
The caller is as the following. Is it possible that there is fcoe in PIF.capabilities while the fcoe_driver is absent intentionally? If not, then letting it go as before (raising exception) would be fine?

if Db.PIF.get_capabilities ~__context ~self |> List.mem "fcoe" then
  assert_fcoe_not_in_use ~__context ~self ;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that there is fcoe in PIF.capabilities while the fcoe_driver is absent intentionally?
No, this should NOT be possible.

If not, then letting it go as before (raising exception) would be fine?
No, Xapi would try to initialise the capabilities during its startup, refer to fcoe-nics.md

@psafont
Copy link
Member

psafont commented Jan 3, 2025

Who knows more about FCoE that can confirm that this change is desirable for XS8?

I'm not comfortable approving this change of behaviour in XS8, this looks like it should be only for XS9.

@liulinC
Copy link
Collaborator Author

liulinC commented Jan 3, 2025

Who knows more about FCoE that can confirm that this change is desirable for XS8?

I'm not comfortable approving this change of behaviour in XS8, this looks like it should be only for XS9.

This is the simplest way to keep the code compatible with XS8 and XS9. (and compatible with XCP)
XS8 will always have fcoe_driver installed while XS9 not.
If someday XS8 does not have fcoe_driver, this means XS8 does not support it neither.

- Add logs when fcoe_driver does not exist
- Use List.assoc_opt instead of try catch
- Add __FUNCTION__ to the logs

Signed-off-by: Lin Liu <[email protected]>
@liulinC liulinC added this pull request to the merge queue Jan 7, 2025
Merged via the queue into xapi-project:master with commit dc565fd Jan 7, 2025
15 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