Skip to content

CA-403851 disable API of ejected pool member #6371

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

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ocaml/xapi/xapi_fuse.ml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ let light_fuse_and_reboot_after_eject () =
ignore
(Thread.create
(fun () ->
debug "%s: stop management server" __FUNCTION__ ;
Xapi_mgmt_iface.Server.stop () ;
Copy link
Contributor

Choose a reason for hiding this comment

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

I see it was stopped by "Xapi_mgmt_iface.run ~__context ~mgmt_enabled:false", may I know why it can't be stopped as before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem was a failing SDK test that used Pool.Async.eject. The API call could not properly communicate that it was finished before the server was shut down. I suspect the Async was the problem. Again, all of this might not be worth it - I think this is mostly a cosmetic issue.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I don't really like exposing this internal function in Xapi_mgmt_iface. It leads to spaghettification of the code. And xapi is already complicated enough...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, in the fuse you don't have the context available so can't use the function. I also don't like that there seem to be more scenarios where we reboot and don't disable the management interface.

Thread.delay !Constants.fuse_time ;
(* this activates firstboot script and reboots the host *)
ignore
Expand Down
Loading