Skip to content

Conversation

minishrink
Copy link
Contributor

As per the GFS2 PR review, this change splits Xapi_pbd.unplug_all_pbds into two separate internal functions; one to unplug all PBDs and one to disable clustering, allowing for better decoupling of these functions. The external Xapi_pbds.unplug_all_pbds interface and logic is unchanged.

Signed-off-by: Akanksha Mathur akanksha.mathur@citrix.com

@coveralls
Copy link

coveralls commented Mar 13, 2018

Coverage Status

Coverage decreased (-0.001%) to 18.662% when pulling eda3e96 on minishrink:feature/REQ477/CA-285349/unplug_all_pbds into 7ec570a on xapi-project:feature/REQ477/master.

If anything fails it throws an exception *)
let unplug_all_pbds ~__context =
unplug_all_pbds_internal ~__context;
disable_clustering ~__context
Copy link
Contributor

Choose a reason for hiding this comment

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

Please change all the caller of unplug_all_pbds to call these two functions instead. The reason behind splitting the function was to make it clearer what it does: a function called unplug_all_pbds also disabling clustering is somewhat unexpected.

@minishrink minishrink force-pushed the feature/REQ477/CA-285349/unplug_all_pbds branch from 4f6b762 to 86e9f53 Compare March 13, 2018 11:33
…able clustering

Signed-off-by: Akanksha Mathur <akanksha.mathur@citrix.com>
@minishrink minishrink force-pushed the feature/REQ477/CA-285349/unplug_all_pbds branch from 86e9f53 to a9f20b1 Compare March 13, 2018 11:44
Copy link
Contributor

@edwintorok edwintorok left a comment

Choose a reason for hiding this comment

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

One more change, sorry. Lets move the disable clustering function to xapi_clustering.ml. It does not really belong in Xapi_pbd now that we split it out. You can do that as a 2nd commit.

…ost.{ml, mli}

- Remove disable_clustering from Xapi_pbd
- Add disable_clustering to Xapi_cluster_host.{ml, mli}
- Update call to Xapi_pbd.unplug_all_pbds to use
    Xapi_pbd.unplug_all_pbds, then
    Xapi_cluster_host.disable_clustering

Signed-off-by: Akanksha Mathur <akanksha.mathur@citrix.com>
@minishrink
Copy link
Contributor Author

minishrink commented Mar 13, 2018

Moved disable_clustering to Xapi_cluster_host.ml as moving to Xapi_clustering.ml created a cyclical dependency, and this way it's directly beneath the Xapi_cluster_host.disable function it wraps.
No testing carried out except for running unit tests, but those pass, and the quicktest suite builds.

@edwintorok edwintorok merged commit d088ba1 into xapi-project:feature/REQ477/master Mar 13, 2018
@minishrink minishrink deleted the feature/REQ477/CA-285349/unplug_all_pbds branch March 13, 2018 16:15
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.

3 participants