Skip to content

Commit 1403fea

Browse files
authored
Merge pull request #846 from oracle/config-overrides-wldf-fix
Config overrides wldf fix
2 parents f838d3d + ee9e365 commit 1403fea

File tree

5 files changed

+28
-10
lines changed

5 files changed

+28
-10
lines changed

operator/src/main/resources/scripts/introspectDomain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ def __init__(self, env):
917917
self.env.CUSTOM_PREFIX_JMS)
918918

919919
self.wldfModuleStr = self.buildModuleTable(
920-
'wldf',
920+
'diagnostics',
921921
self.env.getDomain().getWLDFSystemResources(),
922922
self.env.CUSTOM_PREFIX_WLDF)
923923

operator/src/main/resources/scripts/startServer.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ createFolder ${DOMAIN_HOME}/servers/${SERVER_NAME}/security
204204
copyIfChanged /weblogic-operator/introspector/boot.properties \
205205
${DOMAIN_HOME}/servers/${SERVER_NAME}/security/boot.properties
206206

207-
copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig 'Sit-Cfg-CFG--'
208-
copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig/jms 'Sit-Cfg-JMS--'
209-
copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig/jdbc 'Sit-Cfg-JDBC--'
210-
copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig/wldf 'Sit-Cfg-WLDF--'
207+
copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig 'Sit-Cfg-CFG--'
208+
copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig/jms 'Sit-Cfg-JMS--'
209+
copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig/jdbc 'Sit-Cfg-JDBC--'
210+
copySitCfg /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig/diagnostics 'Sit-Cfg-WLDF--'
211211

212212
if [ "${MOCK_WLS}" == 'true' ]; then
213213
mockWLS

site/config-overrides.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ For a detailed walk-through of the runtime flow, see the [Internal design flow](
5656

5757
* A WebLogic domain home must not contain any situational configuration XML file in its `optconfig` directory that was not placed there by the operator. Any existing situational configuration XML files in this directory will be deleted and replaced by your operator override templates (if any).
5858

59-
* If you want to override a JDBC, JMS, or WLDF module, the original module must be located in your domain home `config/jdbc`, `config/jms`, and `config/wldf` directory, respectively. These are the default locations for these types of modules.
59+
* If you want to override a JDBC, JMS, or WLDF (diagnostics) module, the original module must be located in your domain home `config/jdbc`, `config/jms`, and `config/diagnostics` directory, respectively. These are the default locations for these types of modules.
6060

6161
---
6262
# Typical overrides
@@ -115,7 +115,7 @@ The operator requires a different file name format for override templates than W
115115
| `config.xml` | `config.xml` |
116116
| JMS module | `jms-MODULENAME.xml` |
117117
| JDBC module | `jdbc-MODULENAME.xml` |
118-
| WLDF module | `wldf-MODULENAME.xml` |
118+
| Diagnostics module | `diagnostics-MODULENAME.xml` |
119119

120120
A `MODULENAME` must correspond to the MBean name of a system resource defined in your original `config.xml` file.
121121

@@ -153,7 +153,7 @@ _`jms-MODULENAME.xml`_
153153
</jms:weblogic-jms>
154154
```
155155

156-
_`wldf-MODULENAME.xml`_
156+
_`diagnostics-MODULENAME.xml`_
157157
```
158158
<?xml version='1.0' encoding='UTF-8'?>
159159
<wldf:wldf-resource xmlns:wldf="http://xmlns.oracle.com/weblogic/weblogic-diagnostics"
@@ -193,7 +193,7 @@ The secret macro `SECRETNAME` field must reference the name of a Kubernetes secr
193193
* When overriding `config.xml`, XML namespace `xmlns` abbreviations must be exactly as specified.
194194
* When overriding `config.xml`, the XML namespace (`xmlns:` in the XML) must be exactly as specified in [Override template schemas](#override-template-schemas).
195195
* For example, use `d:` to reference `config.xml` beans and attributes, `f:` for `add` and `replace` `domain-fragment` verbs, and `s:` to reference the situational config schema.
196-
* It is a best practice to use XML namespace abbreviations `jms:`, `jdbc:`, and `wldf:` respectively for JMS, JDBC, and WLDF module override files.
196+
* It is a best practice to use XML namespace abbreviations `jms:`, `jdbc:`, and `wldf:` respectively for JMS, JDBC, and WLDF (diagnostics) module override files.
197197

198198
## Override template samples
199199

@@ -394,6 +394,6 @@ Incorrectly formatted override files may be accepted without warnings or errors,
394394
* The `startServer.sh` script in the WebLogic Server pods:
395395
* Copies the expanded situational configuration files to a special location where the WebLogic runtime can find them:
396396
* `config.xml` overrides are copied to the `optconfig` directory in its domain home.
397-
* Module overrides are copied to the `optconfig/jdbc`, `optconfig/jms`, or `optconfig/wldf` directory.
397+
* Module overrides are copied to the `optconfig/jdbc`, `optconfig/jms`, or `optconfig/diagnostics` directory.
398398
* Deletes any situational configuration files in the `optconfig` directory that do not have corresponding template files in the configuration map.
399399
* WebLogic Servers read their overrides from their domain home's `optconfig` directory.

src/integration-tests/introspector/createDomain.pyt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,19 @@ set('ListenPort', 6124)
116116
# ==============================================
117117
setOption('OverwriteDomain', 'true')
118118

119+
# Setup a diagnostics module
120+
# ============================================
121+
def createWLDFModule(moduleName):
122+
cd('/')
123+
print 'create WLDFSystemResource'
124+
create(moduleName, 'WLDFSystemResource')
125+
cd('/WLDFSystemResource/' + moduleName)
126+
#set('Target',dsTarget)
127+
cd('/WLDFSystemResource/' + moduleName + '/WLDFResource/' + moduleName)
128+
cmo.setName(moduleName)
129+
130+
createWLDFModule('myWLDF')
131+
119132
# Setup a datasource
120133
# ============================================
121134
def createDataSource(dsName,dsJNDI,dsHost,dsSID,dsTarget):
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<wldf:wldf-resource xmlns:wldf="http://xmlns.oracle.com/weblogic/weblogic-diagnostics"
3+
xmlns:f="http://xmlns.oracle.com/weblogic/weblogic-diagnostics-fragment"
4+
xmlns:s="http://xmlns.oracle.com/weblogic/situational-config" >
5+
</wldf:wldf-resource>

0 commit comments

Comments
 (0)