Skip to Content.
Sympa Menu

grouper-dev - grouper readonly mode (might help during upgrades)

Subject: Grouper Developers Forum

List archive

grouper readonly mode (might help during upgrades)


Chronological Thread 
  • From: Chris Hyzer <>
  • To: "" <>
  • Subject: grouper readonly mode (might help during upgrades)
  • Date: Fri, 26 Mar 2010 15:13:27 -0400
  • Accept-language: en-US
  • Acceptlanguage: en-US

There is a readonly mode for the Grouper API in svn in the 1.4+ branch.

https://bugs.internet2.edu/jira/browse/GRP-406

 

You can get this with:

 

svn co http://anonsvn.internet2.edu/svn/i2mi/branches/GROUPER_1_4_BRANCH/grouper

 

The immediate need for this is for Chicago and Penn's 1.5 upgrade, we can put the existing services in readonly mode, so the WS, UI, and GSH can be used against the current schema, the schema can be cloned, the upgrade can take place in the clone, then we can cut back.  The only disruption will be to read/write operations.

 

To use this, set this in the grouper.properties:

 

# set the API as readonly (e.g. during upgrades).  Any updates will throw an exception

grouper.api.readonly = true

 

Note that we are discussing having a database table to store config defaults or overrides so at some point we will be able to do this in one place.  Right now this is a grouper.properties config only.

 

There is a startup message in readonly mode (none if not):

 

C:\mchyzer\grouper\v1_4\grouper\bin>gsh

Grouper starting up: version: 1.4.2, build date: 2010/03/26 12:50:01, env: <no label configured>

grouper.properties read from: C:\mchyzer\grouper\v1_4\grouper\conf\grouper.properties

grouper.api.readonly:         true

Grouper current directory is: C:\mchyzer\grouper\v1_4\grouper\bin

 

 

There are not friendly messages to the user yet.  WS gives a message, the UI just says there is an error, but the logs describe it.  We can iterate on this going forward.  Here is a client example:

 

C:\mchyzer\grouper\v1_4\grouperClient\dist\institution\grouperClient.institution-1.4.2>java -jar grouperClient.jar --operation=addMemberWs --groupName=etc:sysadmingroup --subjectIds=GrouperSystem

Error with grouper client, check the logs: Bad response from web service: resultCode: PROBLEM_WITH_ASSIGNMENT, There were 0 successes and 1 failures of users added to the group.

Error 0, result index: 0, code: EXCEPTION, message: edu.internet2.middleware.grouper.exception.GrouperReadonlyException: Grouper is in readonly mode (perhaps due to maintenance), you cannot perform an operation which changes the data!,

 

I tested this in api (junit), GSH, UI, WS, client

 



  • grouper readonly mode (might help during upgrades), Chris Hyzer, 03/26/2010

Archive powered by MHonArc 2.6.16.

Top of Page