Skip to content

Commit 3205aea

Browse files
committed
[WFCORE-7317] Promote management interface attributes for backlog, no-read-timeout, connection-high-water, connection-low-water from community to default stability level
Jira issue: https://issues.redhat.com/browse/WFCORE-7317 Signed-off-by: Yeray Borges <yborgess@redhat.com>
1 parent 391163c commit 3205aea

File tree

7 files changed

+16
-23
lines changed

7 files changed

+16
-23
lines changed

controller/src/main/java/org/jboss/as/controller/management/BaseHttpInterfaceAddStepHandler.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,14 @@
3333
public abstract class BaseHttpInterfaceAddStepHandler extends ManagementInterfaceAddStepHandler {
3434

3535
private static final String PROPERTY_BASE = "org.wildfly.management.";
36+
// Do not use the system properties, use the management API to configure them in the model
37+
@Deprecated(since = "30.0.0", forRemoval = true)
3638
private static final String BACKLOG_PROPERTY = PROPERTY_BASE + "backlog";
39+
@Deprecated(since = "30.0.0", forRemoval = true)
3740
private static final String CONNECTION_HIGH_WATER_PROPERTY = PROPERTY_BASE + "connection-high-water";
41+
@Deprecated(since = "30.0.0", forRemoval = true)
3842
private static final String CONNECTION_LOW_WATER_PROPERTY = PROPERTY_BASE + "connection-low-water";
43+
@Deprecated(since = "30.0.0", forRemoval = true)
3944
private static final String NO_REQUEST_TIMEOUT_PROPERTY = PROPERTY_BASE + "no-request-timeout";
4045

4146
protected static final String HTTP_AUTHENTICATION_FACTORY_CAPABILITY = "org.wildfly.security.http-authentication-factory";

controller/src/main/java/org/jboss/as/controller/management/BaseHttpInterfaceResourceDefinition.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import org.jboss.as.controller.parsing.Attribute;
4646
import org.jboss.as.controller.registry.AttributeAccess;
4747
import org.jboss.as.controller.registry.ManagementResourceRegistration;
48-
import org.jboss.as.version.Stability;
4948
import org.jboss.dmr.ModelNode;
5049
import org.jboss.dmr.ModelType;
5150

@@ -187,29 +186,25 @@ public void validateParameter(String parameterName, ModelNode value) throws Oper
187186
.setAllowExpression(true)
188187
.setDefaultValue(new ModelNode(50))
189188
.setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES)
190-
.setStability(Stability.COMMUNITY)
191189
.build();
192190

193191
public static final SimpleAttributeDefinition NO_REQUEST_TIMEOUT = new SimpleAttributeDefinitionBuilder(ModelDescriptionConstants.NO_REQUEST_TIMEOUT, ModelType.INT, true)
194192
.setAllowExpression(true)
195193
.setMeasurementUnit(MeasurementUnit.MILLISECONDS)
196194
.setDefaultValue(new ModelNode(60000))
197195
.setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES)
198-
.setStability(Stability.COMMUNITY)
199196
.build();
200197

201198
public static final SimpleAttributeDefinition CONNECTION_HIGH_WATER = new SimpleAttributeDefinitionBuilder(ModelDescriptionConstants.CONNECTION_HIGH_WATER, ModelType.INT, true)
202199
.setAllowExpression(true)
203200
.setDefaultValue(new ModelNode(100))
204201
.setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES)
205-
.setStability(Stability.COMMUNITY)
206202
.build();
207203

208204
public static final SimpleAttributeDefinition CONNECTION_LOW_WATER = new SimpleAttributeDefinitionBuilder(ModelDescriptionConstants.CONNECTION_LOW_WATER, ModelType.INT, true)
209205
.setAllowExpression(true)
210206
.setDefaultValue(new ModelNode(75))
211207
.setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES)
212-
.setStability(Stability.COMMUNITY)
213208
.build();
214209

215210
protected static final AttributeDefinition[] COMMON_ATTRIBUTES = new AttributeDefinition[] { HTTP_AUTHENTICATION_FACTORY, SSL_CONTEXT, CONSOLE_ENABLED, HTTP_UPGRADE_ENABLED,

core-model-test/tests/src/test/java/org/jboss/as/core/model/test/mgmt_interfaces/HostMgmtInterfacesTestCase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ public void testEmptyAllowedOriginsConfiguration() throws Exception {
3131
}
3232

3333
@Test
34-
public void testResourceConstraints_Community() throws Exception {
35-
// Test for https://issues.redhat.com/browse/WFCORE-6830
36-
testConfiguration("host_resource_constraints_community.xml", Stability.COMMUNITY);
34+
public void testResourceConstraints() throws Exception {
35+
// Test for https://issues.redhat.com/browse/WFCORE-7317
36+
testConfiguration("host_resource_constraints.xml");
3737
}
3838

3939
private void testConfiguration(String fileName) throws Exception {

core-model-test/tests/src/test/java/org/jboss/as/core/model/test/mgmt_interfaces/StandaloneMgmtInterfacesTestCase.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ public void testEmptyAllowedOriginsConfiguration() throws Exception {
3131
}
3232

3333
@Test
34-
public void testResourceConstraints_Community() throws Exception {
35-
// Test for https://issues.redhat.com/browse/WFCORE-6830
36-
testConfiguration("standalone_resource_constraints_community.xml", Stability.COMMUNITY);
34+
public void testResourceConstraints() throws Exception {
35+
// Test for https://issues.redhat.com/browse/WFCORE-7317
36+
testConfiguration("standalone_resource_constraints.xml");
3737
}
3838

39+
3940
public void testConfiguration(String fileName) throws Exception {
4041
testConfiguration(fileName, Stability.DEFAULT);
4142
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
~ SPDX-License-Identifier: Apache-2.0
66
-->
77

8-
<host name="primary" xmlns="urn:jboss:domain:community:20.0">
8+
<host name="primary" xmlns="urn:jboss:domain:21.0">
99

1010
<management>
1111
<management-interfaces>
1212
<http-interface http-authentication-factory="management-http" allowed-origins="http://www.example.com http://localhost"
13-
backlog="44" connection-high-water="111" connection-low-water="77" no-request-timeout="66666">
13+
backlog="44" connection-high-water="111" connection-low-water="77" no-request-timeout="66666">
1414
<http-upgrade enabled="true" sasl-authentication-factory="management-sasl" />
1515
<socket interface="management" port="${jboss.management.http.port:9990}"/>
1616
</http-interface>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
~ SPDX-License-Identifier: Apache-2.0
66
-->
77

8-
<server xmlns="urn:jboss:domain:community:20.0">
8+
<server xmlns="urn:jboss:domain:21.0">
99
<management>
1010
<management-interfaces>
1111
<http-interface http-authentication-factory="management-http" allowed-origins="http://www.example.com http://localhost"
12-
backlog="44" connection-high-water="111" connection-low-water="77" no-request-timeout="66666">
12+
backlog="44" connection-high-water="111" connection-low-water="77" no-request-timeout="66666">
1313
<http-upgrade enabled="true" sasl-authentication-factory="managament-sasl" />
1414
<socket-binding http="management-http"/>
1515
</http-interface>

testsuite/manualmode/src/test/java/org/wildfly/core/test/standalone/mgmt/ManagementInterfaceResourcesTestCase.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public class ManagementInterfaceResourcesTestCase {
5353
/*
5454
* Command Templates
5555
*/
56-
private static final String HTTP_INTERFACE_READ_ATTRIBUTE = "/core-service=management/management-interface=http-interface:read-attribute(name=%s)";
5756
private static final String HTTP_INTERFACE_WRITE_ATTRIBUTE = "/core-service=management/management-interface=http-interface:write-attribute(name=%s, value=%d)";
5857
private static final String HTTP_INTERFACE_UNDEFINE_ATTRIBUTE = "/core-service=management/management-interface=http-interface:undefine-attribute(name=%s)";
5958
private static final String SYSTEM_PROPERTY_ADD = "/system-property=%s:add(value=%d)";
@@ -159,13 +158,6 @@ private void runTest(boolean useSystemProperties, int noRequestTimeout, Exceptio
159158
cli.sendLine(String.format(SYSTEM_PROPERTY_ADD, CONNECTION_LOW_WATER_PROPERTY, 3));
160159
cli.sendLine(String.format(SYSTEM_PROPERTY_ADD, NO_REQUEST_TIMEOUT_PROPERTY, noRequestTimeout));
161160
} else {
162-
cli.sendLine(String.format(HTTP_INTERFACE_READ_ATTRIBUTE, BACKLOG_ATTRIBUTE), true);
163-
String response = cli.readOutput();
164-
if (response.contains("WFLYCTL0201")) {
165-
LOG.info("Attribute \"backlog\" not found - assuming the attributes are not available at the server's stability level" );
166-
controller.stop();
167-
return;
168-
}
169161
cli.sendLine(String.format(HTTP_INTERFACE_WRITE_ATTRIBUTE, BACKLOG_ATTRIBUTE, 2));
170162
cli.sendLine(String.format(HTTP_INTERFACE_WRITE_ATTRIBUTE, CONNECTION_HIGH_WATER_ATTRIBUTE, 6));
171163
cli.sendLine(String.format(HTTP_INTERFACE_WRITE_ATTRIBUTE, CONNECTION_LOW_WATER_ATTRIBUTE, 3));

0 commit comments

Comments
 (0)