Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Install the 2.3.0#40 API patch (note: Force install that patch since it will say file mismatch)

Code Block

Patch grouper_v2_3_0_api_patch_3540 is lowmedium risk, is not a security patch
GRP-14171454: migrate from groupersources.ehcache.xml to hierarchical properties configuration
 - set property: grouper_v2_3_0_api_patch_3540.date from: 20162017/1101/2707 1922:0543:1645 to: 20162017/1101/2707 1922:1244:0838
This patch requires all processes that user Grouper to be stopped.
  Please stop these processes if they are running and press <enter> to continue...

Problem applying patch since this patch old file:
 <using default which is blank due to grouperInstaller.autorun.useDefaultsAsMuchAsAvailable and grouperInstaller.autorun.continueAfterPatchStopProcesses>: 
Applying file: /opt/grouper/2.3/patchesAuto/tarballs/patchestomcats/tomcat_f/webapps/grouper_v2_3_0_api_patch_35/old/classes/ehcache.xml
  is not the same as what the patch expects:
 /WEB-INF/classes/edu/internet2/middleware/subject/provider/SourceManager$SourceManagerStatusBean.class
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/ehcache.xml
  Do you want to force install this patch (t|f)? [f]: 
t
/edu/internet2/middleware/subject/provider/NullSourceAdapter.class
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/grouper.cache.base.properties/edu/internet2/middleware/subject/provider/NullSourceAdapter.java
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/groupersubject/miscprovider/GrouperCheckConfigLdapSourceAdapter.class
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/groupersubject/miscprovider/GrouperCheckConfigSourceManager.javaclass
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/groupersubject/cfgprovider/GrouperCacheConfigJDBCSourceAdapter.class
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/groupersubject/cfgprovider/GrouperCacheConfigSourceManager.java
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/groupersubject/cacheprovider/EhcacheControllerJNDISourceAdapterLegacy.java
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/groupersubject/cacheprovider/EhcacheControllerJNDISourceAdapterLegacy.class
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/grouper.cache.properties
Deleting/edu/internet2/middleware/subject/provider/JDBCSourceAdapter.java
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/ehcache.example.xml
Deleting file: /opt/tomcats/edu/internet2/middleware/subject/provider/LdapSourceAdapter.java
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/ehcache.xml
Patch successfully applied: /edu/internet2/middleware/subject/config/SubjectConfig.java
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3_0_api_patch_35
 - set property: grouper_v2_3_0_api_patch_35.state from: error to: applied

 

Run the grouperInstaller, admin task, upgradeTasks, convert sources xml to properties

Follow the prompt to identify the location of the sources.xml file

This will generate the subject.properties file based on your sources.xml edits

Code Block
[appadmin@i2midev1 patchesAuto]$ java -jar grouperInstaller.jar
Do you want to 'install' a new installation of grouper, 'upgrade' an existing installation,
  'patch' an existing installation, 'admin' utilities, or 'createPatch' for Grouper developers
  (enter: 'install', 'upgrade', 'patch', 'admin', 'createPatch' or blank for the default) [install]: admin
What admin action do you want to do (manage, upgradeTask)? : upgradeTask
What upgrade task do you want to do (convertEhcacheXmlToProperties)? : convertEhcacheXmlToProperties
Note, you need to convert the ehcache.xml file for each Grouper runtime, e.g. loader, WS, UI.
Note, you need to be running Grouper 2.3.0 with API patch 35 installed.
Enter the location of the ehcache.xml/WEB-INF/classes/edu/internet2/middleware/subject/config/SubjectConfig.class
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/grouper/GrouperSourceAdapter$2.class
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/grouper/subj/InternalSourceAdapter.java
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/grouper/subj/InternalSourceAdapter.class
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/grouper/misc/GrouperCheckConfig.class
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/grouper/misc/GrouperCheckConfig$1.class
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/grouper/misc/GrouperCheckConfig.java
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/grouper/GrouperSourceAdapter.class
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/grouper/GrouperSourceAdapter$3.class
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/grouper/GrouperSourceAdapter$1.class
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/edu/internet2/middleware/grouper/GrouperSourceAdapter.java
Applying file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/ehcache.xml
Enter the location of the grouper.cachesubject.base.properties
Applying file: [/opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classeslib/grouper.cache.base.properties]: 
Enter the location of the grouper.cache.properties file (to be created)  [/opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/grouper.cache.properties]: 
File was writtencommons-digester.jar
Patch successfully applied: grouper_v2_3_0_api_patch_40
 - set property: grouper_v2_3_0_api_patch_40.state from: error to: applied

At this point, you can use Grouper as you did before, with the sources.xml.  but if you want to use the subject.properties, you can continue.  You can see its reading from sources.xml in the startup output

Code Block
subject.properties read from: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/grouper.cache.properties

 

...

/classes/subject.properties

...

Code Block
[appadmin@i2midev1 patchesAuto]$ more
sources.xml read from:        /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/grouper.cache.properties
# Copyright 2016 Internet2
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# Grouper Cache Configuration
#

# The grouper cache config uses Grouper Configuration Overlays (documented on wiki)
# By default the configuration is read from grouper.cache.base.properties
# (which should not be edited), and the grouper.cache.properties overlays
# the base settings.  See the grouper.cache.base.properties for the possible
# settings that can be applied to the grouper.cache.properties

cache.name.internal_dao_hib3_Hib3MemberDAO_FindBySubject.maxElementsInMemory = 10000

cache.name.internal_dao_hib3_Hib3MembershipDAO.maxElementsInMemory = 20000
cache.name.internal_dao_hib3_Hib3MembershipDAO.timeToIdleSeconds = 60
cache.name.internal_dao_hib3_Hib3MembershipDAO.timeToLiveSeconds = 60




[appadmin@i2midev1 patchesAuto]$ diffsources.xml
sources configured in:        sources.xml
sources.xml        groupersource id: g:gsa
sources.xml        groupersource id: grouperEntities
sources.xml        jdbc source id:   jdbc: GrouperJdbcConnectionProvider

 

Run the grouperInstaller, admin task, upgradeTasks, convert sources xml to properties

Follow the prompt to identify the location of the sources.xml file

This will generate the subject.properties file based on your sources.xml edits

Code Block
[appadmin@i2midev1 patchesAuto]$ java -jar grouperInstaller.jar
Do you want to 'install' a new installation of grouper, 'upgrade' an existing installation,
  'patch' an existing installation, 'admin' utilities, or 'createPatch' for Grouper developers
  (enter: 'install', 'upgrade', 'patch', 'admin', 'createPatch' or blank for the default) [install]: admin
What admin action do you want to do (manage, upgradeTask)? : upgradeTask
What upgrade task do you want to do (convertEhcacheXmlToProperties, convertSourcesXmlToProperties)? : convertSourcesXmlToProperties
Note, you need to convert the sources.xml file for each Grouper runtime, e.g. loader, WS, UI.
Note, to use subject sources from subject.properties, you need to be running Grouper 2.3.0+ with API patch 40 installed.
Enter the location of the sources.xml file: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/sources.xml
Enter the location of the subject.base.properties file [/opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/subject.properties]: 
File was written: /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/ehcache.xml subject.properties
You should archive your sources.xml and remove it from your project since it is now unused:
  /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/ehcache.example.xml
90c90
<           maxElementsInMemory="10000"
---
>           maxElementsInMemory="5000"
101c101
<           maxElementsInMemory="20000"
---
>           maxElementsInMemory="10000"
103,104c103,104
<           timeToIdleSeconds="60"
<           timeToLiveSeconds="60"
---
>           timeToIdleSeconds="5"
>           timeToLiveSeconds="5"
[appadmin@i2midev1 patchesAuto]$ 

 

INF/classes/sources.xml

 

Examine the subject.properties file.  Diff your sources.xml file with your sources.example.xml (if exists or get here) file and make sure those diffs are expected and listed in your subject.properties file

Code Block
[appadmin@i2midev1 patchesAuto]$ more /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/properties.properties


[appadmin@i2midev1 patchesAuto]$ wget --no-check-certificate https://github.com/Internet2/grouper/raw/GROUPER_2_3_BRANCH/grouper/conf/sources.example.xml
[appadmin@i2midev1 patchesAuto]$ diff sources.example.xml /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/sources.xml


 

Delete the sources.xml and sources.example.xml (if exists) files, archiving if you like

Code Block
[appadmin@i2midev1 patchesAuto]$ mv /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/sources.xml ~/sources.xml.20170107.grouper2_3
[appadmin@i2midev1 patchesAuto]$ rm /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/sources.example.xml
rm: cannot remove `/opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/sources.example.xml': No such file or directory
[appadmin@i2midev1 patchesAuto]$ 

 

Install the patch in your other envs (UI, WS, daemon, etc), and copy the subject.properties to each env (no need to go through this same process unless you have different cache customizations in each env.  Delete Delete the sources.xml and sources.example.xml files in other envs too

Logging

Grouper startup will show the subject.properties info

Code Block
subject.properties read from:
Code Block
[appadmin@i2midev1 patchesAuto]$ rm /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/ehcache.xml
[appadmin@i2midev1 patchesAuto]$ rm /opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/ehcache.example.xml 

 

Install the patch in your other envs (UI, WS, daemon, etc), and copy the subject.properties to each env (no need to go through this same process unless you have different cache customizations in each env.  Delete the sources.xml and sources.example.xml in other envs too

Logging

Grouper startup will show the subject.properties info

Code Block
TODOsubject.properties
sources configured in:        subject.properties
subject.properties groupersource id: g:gsa
subject.properties groupersource id: grouperEntities
subject.properties jdbc source id:   jdbc: GrouperJdbcConnectionProvider