Bug 1151434

Summary: The outbound-connections element doesn't validate against XSD after removing connection
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Josef Cacek <jcacek>
Component: Domain ManagementAssignee: Darran Lofthouse <darran.lofthouse>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kremensky <pkremens>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4.0CC: dandread, kkhan
Target Milestone: DR6   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Within the management mode, when a new outbound LDAP connection is defined, a resource is instantiated to hold the child ldap connections. In previous versions of JBoss EAP 6, this resource was not removed after the last child connection is removed. The behavior was encountered because the XML marshalling saw the outbound ldap connections in the model as being defined, and so wrote the `<outbound-connections>` element to contain them. As there were no connections in the model this element remained empty, which is invalid according to the schema. Note: The parser is tolerant to this and this does not prevent a subsequent server start up. In this release of the product the resource is removed once the last child has been removed and the parser now sees there are no defined outbound connections so an empty <outbound-connections> element is no longer written.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-19 12:40:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Josef Cacek 2014-10-10 11:59:41 UTC
When I add and remove LDAP connection in management, empty element <outbound-connections/> remains in the management configuration.

However, the XSD (jboss-as-config_1_7.xsd) says the element must not be empty:

<xs:element name="outbound-connections" minOccurs="0">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="ldap" type="ldapConnectionType" minOccurs="1" />
    </xs:sequence>
  </xs:complexType>
</xs:element>


CLI steps to reproduce:
/core-service=management/ldap-connection=ldapConnection:add(url="ldap://localhost:10389", search-credential="secret", search-dn="uid=admin,ou=system")
/core-service=management/ldap-connection=ldapConnection:remove
reload

Comment 1 Darran Lofthouse 2014-10-14 17:24:58 UTC
Just to clarify this is an EAP only issue and does not cause subsequent start up of the server to fail.

Comment 3 Petr Kremensky 2014-10-21 11:51:51 UTC
Verified on EAP 6.4.0.DR6.

Empty <outbound-connections/> element no longer remains in configuration files.