Skip to content
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

WFCORE-4535, WFCORE-4542, WFCORE-4541, WFCORE-4613 Overhaul discovery subsystem #3835

Merged
merged 12 commits into from Aug 21, 2019

Conversation

pferraro
Copy link
Contributor

@pferraro pferraro commented Jun 21, 2019

https://issues.jboss.org/browse/WFCORE-4535
https://issues.jboss.org/browse/WFCORE-4541
https://issues.jboss.org/browse/WFCORE-4542
https://issues.jboss.org/browse/WFCORE-4613

In the process of investigating solutions for https://issues.jboss.org/browse/WFLY-12222 involving the discovery subsystem, I discovered that this subsystem never really worked correctly.
The most significant issues include:

  • Inconsistent capability definitions (service value vs runtime API) between resource registration and those registered at runtime (WFCORE-4535)
    • Consequently, capability constraints were not correctly enforced for providers referenced by aggregate-provider
  • Add operation handlers did not populate the discovery provider implementations they created
  • "services" write attribute handler for "static-provider" throws StackOverflowErrors (WFCORE--4541).

I've re-written the add operation handlers and capability logic to address the issues above.
Subsystem capabilities are documented here: wildfly/wildfly-capabilities#37

@wildfly-ci wildfly-ci added the deps-ok Dependencies have been checked, and there are no significant changes label Jun 21, 2019
@pferraro pferraro added the 10.x label Jun 21, 2019
@bstansberry
Copy link
Contributor

Why the last commit? Spelling out the dependencies instead of just inheriting everything transitively is kind of nice IMHO.

This seems good; I want to look again at the main commit re the change in write-attribute behavior; now just sets reload-required. Probably fine if the custom runtime API thing was not really usable.

@pferraro
Copy link
Contributor Author

pferraro commented Jun 26, 2019

Why the last commit? Spelling out the dependencies instead of just inheriting everything transitively is kind of nice IMHO.

Unless this module was excluding all transitive dependencies from wildfly-controller (it only excludes transitive dependencies from org.wildfly.core), I don't see much point to spelling out the dependencies, if they are already part of the dependency hierarchy. Also, I don't see any other subsystem modules that use wildcard exclusions, so I was just trying to be consistent.

If you prefer I leave them, I'll comply. :)

I want to look again at the main commit re the change in write-attribute behavior; now just sets reload-required.

We can also support the allow-resource-service-restart operation header.

@pferraro
Copy link
Contributor Author

@bstansberry Any other comments?

Copy link
Contributor

@bstansberry bstansberry left a comment

Choose a reason for hiding this comment

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

@pferraro This is ok with me. The old [xxx]ProviderAddHandler.modifyRegistration stuff probably worked, but the capability runtime API behind it was never properly published, as described in WFCORE-4535. Nor were the capabilities ever documented (https://issues.jboss.org/browse/WFLY-12225). Also it seems that WFCORE-4541 means that write-attribute for a static-provider could not have worked.

StaticProviderAddHanlder.modifyRegistration could be made to work for write-attribute without allow-resource-service-restart, since the MutableDiscoveryProvider could be looked up and modified from MSC. But I agree that in the aggregrate-provider case, MSC services are more practical and that means a service restart is required. I don't like allow-resource-service-restart so wouldn't like it for the aggregrate-provider case. And for the static-provider case 'allow-resource-service-restart' would not be accurate as no service would have to be restarted. JMHO but I think it's cleaner to keep both types consistent and require reload, as you do here.

@rhusar
Copy link
Member

rhusar commented Aug 19, 2019

FWIW I have been working with this branch for clustering subsystems integration work and haven't found any major problems besides a minor tangential issue https://issues.jboss.org/browse/WFCORE-4613 about missing validation (not sure if originated in this branch).

@pferraro
Copy link
Contributor Author

pferraro commented Aug 20, 2019

@rhusar The missing validation was a pre-existing problem. I've added a commit that addresses WFCORE-4613 to this PR.

@pferraro pferraro changed the title WFCORE-4535, WFCORE-4542, WFCORE-4541 Overhaul discovery subsystem WFCORE-4535, WFCORE-4542, WFCORE-4541, WFCORE-4613 Overhaul discovery subsystem Aug 20, 2019
@wildfly-ci
Copy link

Core - Full Integration Build 8944 outcome was UNKNOWN using a merge of cb22323
Summary: Canceled (Tests passed: 5108, ignored: 127; exit code 143 (Step: Build & test full (Maven)) (new)) Build time: 02:01:30

@rhusar
Copy link
Member

rhusar commented Aug 20, 2019

retest this please

Copy link
Member

@rhusar rhusar left a comment

Choose a reason for hiding this comment

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

Looks great now.

@bstansberry bstansberry added the ready-for-merge This PR is ready to be merged and fulfills all requirements label Aug 21, 2019
jamezp added a commit to jamezp/wildfly-core that referenced this pull request Aug 21, 2019
WFCORE-4613 Add missing validation for the URI of a ServiceURL.
jamezp added a commit to jamezp/wildfly-core that referenced this pull request Aug 21, 2019
WFCORE-4613 Add missing validation for the URI of a ServiceURL.
@jamezp jamezp merged commit 2d26b4b into wildfly:master Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deps-ok Dependencies have been checked, and there are no significant changes ready-for-merge This PR is ready to be merged and fulfills all requirements
Projects
None yet
5 participants