-
Notifications
You must be signed in to change notification settings - Fork 465
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-6815][Community] Added reload-enhanced operation to reload a domain to a certain stability #5992
Conversation
@kabir This PR is based on your previous work for standalone, although it has some particularities to adapt it on Domain Mode, could you take a look and provide your feedback? thanks |
void setStability(Stability stability) { | ||
WildFlySecurityManager.setPropertyPrivileged(ProcessEnvironment.STABILITY, stability.toString()); | ||
this.hostSystemProperties.put(ProcessEnvironment.STABILITY, stability.toString()); | ||
this.stability = stability; | ||
} | ||
|
||
public void checkStabilityIsValidForInstallation(Stability stability) { | ||
checkStabilityIsValidForInstallation(productConfig, stability); | ||
} | ||
|
||
private void checkStabilityIsValidForInstallation(ProductConfig productConfig, Stability stability) { | ||
if (!productConfig.getStabilitySet().contains(stability)) { | ||
throw HostControllerLogger.ROOT_LOGGER.unsupportedStability(this.stability, productConfig.getProductName()); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice we also have https://issues.redhat.com/browse/WFCORE-6760 to move common functionality to ProcessEnvironment, that can be done later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it looks good
} | ||
|
||
public static OperationDefinition getEnhancedDefinition(final LocalHostControllerInfo hostControllerInfo) { | ||
return new DeferredParametersOperationDefinitionBuilder(hostControllerInfo, ENHANCED_OPERATION_NAME, HostModelUtil.getResourceDescriptionResolver(), ENHANCED_PRIMARY_HC_ATTRIBUTES, ENHANCED_SECONDARY_HC_ATTRIBUTES, Stability.COMMUNITY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't really important, but I think it would be clearer if both the calls to this constructor had the same format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reviewing @kabir
What do you mean about having the same format?
I understand that what you suggested is to remove the overloaded DeferredParametersOperationDefinitionBuilder constructor, so both getEnhancedDefinition
and getDefinition
use the same number of arguments to improve the code readability and make it more clear, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far, just updated it to assert that closing the snapshot indeed reloaded the host controller to the original stability level
…en the Snapshoft is closed
…anagement operation
This comment was marked as outdated.
This comment was marked as outdated.
Core -> Full Integration Build 13857 outcome was FAILURE using a merge of 59589cb |
@kabir Friendly remainder, this one is waiting for your approval to get it merged, please take a look, thanks! |
Jira issue: https://issues.redhat.com/browse/WFCORE-6815
WildFly Proposal: wildfly/wildfly-proposals#570