Git Product home page Git Product logo

glu's People

Contributors

adyliu avatar andrask avatar lbruand avatar rantav avatar rou1287 avatar shellbj avatar sodul avatar spedge avatar subhan avatar vbehar avatar ypujante avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glu's Issues

Perm Gen issues when loading/unloading scripts

The agent uses the following code:

Class scriptClass = new GroovyClassLoader(getClass().classLoader).parseClass(_scriptFile.file)

which seems to introduce a perm gen memory leak as the loaded class never gets garbage collected.

Tune agent memory

Currently the memory is set to 256M which is way too much. Tune the memory usage down.

Exception while assigning agent fabric

Steps to reproduce:

Start agent-1 with no fabric defined
Go to Admin/View Agents Fabric in the console
Set a fabric for agent-1 and click "Assign Fabric"

The call works, but you get this exception back

2011/04/20 09:23:02.645 ERROR [GrailsExceptionResolver] org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String
java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String
    at java.lang.String.compareTo(String.java:92)
    at java.util.TreeMap.put(TreeMap.java:545)
    at org.linkedin.glu.agent.rest.client.ConfigurableRestClient.configure(ConfigurableRestClient.groovy:43)
    at org.linkedin.util.lifecycle.Configurable$configure.call(Unknown Source)
    at org.linkedin.glu.provisioner.services.fabric.FabricServiceImpl$_setAgentFabric_closure7.doCall(FabricServiceImpl.groovy:183)
    at org.linkedin.glu.provisioner.services.fabric.FabricServiceImpl$_setAgentFabric_closure7.call(FabricServiceImpl.groovy)
    at org.linkedin.glu.agent.rest.client.ConfigurableFactoryImpl.withRemoteConfigurable(ConfigurableFactoryImpl.groovy:50)
    at org.linkedin.glu.agent.rest.client.ConfigurableFactory$withRemoteConfigurable$0.callCurrent(Unknown Source)
    at org.linkedin.glu.agent.rest.client.ConfigurableFactoryImpl.withRemoteConfigurable(ConfigurableFactoryImpl.groovy:37)
    at org.linkedin.glu.agent.rest.client.ConfigurableFactory$withRemoteConfigurable.call(Unknown Source)
    at org.linkedin.glu.provisioner.services.fabric.FabricServiceImpl.setAgentFabric(FabricServiceImpl.groovy:182)
    at org.linkedin.glu.provisioner.services.fabric.FabricService$setAgentFabric.call(Unknown Source)
    at org.linkedin.glu.provisioner.services.fabric.AuditedFabricService.setAgentFabric(AuditedFabricService.groovy:38)
    at org.linkedin.glu.console.controllers.FabricController$_closure4_closure16.doCall(FabricController.groovy:121)
    at org.linkedin.glu.console.controllers.FabricController$_closure4.doCall(FabricController.groovy:116)
    at org.linkedin.glu.console.controllers.FabricController$_closure4.doCall(FabricController.groovy)

Race condition while upgrading the agent

While trying to upgrade the agent using the console (Admin/upgrade agent), I ran into what seems to be a race condition. On the agent side I see:

2011/01/18 07:37:05.451 INFO [0-SNAPSHOT] executeAction([action:prepare, mountPoint:/upgrade/1.7.0-SNAPSHOT, actionArgs:[:]]): 46f74878-f963-44d2-aaeb-a816b76058af
2011/01/18 07:37:05.534 INFO [0-SNAPSHOT] Preparing...
2011/01/18 07:37:05.750 INFO [0-SNAPSHOT] Prepare complete... restarting agent...
2011/01/18 07:37:05.774 INFO [AgentMain] Shutting down...
2011/01/18 07:37:05.779 INFO [AgentMain] Stopping REST service...
2011/01/18 07:37:05.782 INFO [AgentMain] REST service stopped.
2011/01/18 07:37:05.782 INFO [AgentMain] Shutting down the agent...
2011/01/18 07:37:05.810 INFO [AgentMain] Agent shut down...

and when the agent restarts I see:

2011/01/18 07:37:09.991 INFO [StateKeeperScriptManager] Restoring state: [scriptDefinition:[mountPoint: /upgrade/1.7.0-SNAPSHOT, parent: /, scriptFactory: FromClassNameScriptFactory[org.linkedin.glu.agent.impl.script.AutoUpgradeScript], initParameters: [agentTar:file:///export/content/repositories/release/org/linkedin/org.linkedin.glu.agent-server-upgrade/1.7.0-SNAPSHOT/org.linkedin.glu.agent-server-upgrade-1.7.0-SNAPSHOT.tgz, newVersion:1.7.0-SNAPSHOT]], scriptState:[script:[agentRootDir:/export/content/glu/devsetup/agent-2, currentVersion:1.7.0, untarredAgent:file:/export/content/glu/devsetup/agent-2/data/tmp/upgrade/1.7.0-SNAPSHOT/__tmp74776346Dir], stateMachine:[currentState:installed, transitionState:installed->prepared, transitionAction:prepare]]]
2011/01/18 07:37:10.097 INFO [0-SNAPSHOT] installed

The race condition comes from the fact that the agent shutdown prior to completing the transition => when it comes back up, it discards the transition (which is normal behavior). So the agent remains in state 'installed'. The agent needs to wait for any pending transition in order to shutdown.

Deployment UI gets stuck

I've seen this happening I think in all kind of deployments. In this case I tried a redeployment but it happens, I think, in all cases.
Browser: I've only tested with Chrome on osx.

What happens is when I want to run a deployment the UI seems to get stuck, see screenshot.
https://skitch.com/rantav/rg8yi/glu-dev-1-glu-console-deployment-redeploy-fabric-glu-dev-1-sequential

I look at the logs and the deployment continues as expected, so it's just the console's UI that gets stuck.
If I refresh the page it will show up as completed but if I let it run (auto refresh on) then it would never show that it's finished or that it's progressing beyond that one stage that it got stuck on.

thanks :)

jetty glu script (1.6.0) does not handle restart properly

Steps to reproduce: start the tutorial and deploy the 3 webapps. Now using the console or the cli, hard kill (kill -9) one of the jetty servers (do not kill the console ;)...

The jetty glu script will detect it properly and show a red row in the dashboard. Now select the plan to 'fix' this issue which is essentially starting the server again.

In the agent log file a line: 'Already up' is printed and the server is never restarted.

add tagging capability

Add tagging capability to the agent as well as the system entries so that it is easy to query them.

Change the clis to handle tagging/querying based on tags

Feature Request: Add dates to the table at /console

It would be useful to add dates to the table on the console page. Two date columns are interesting IMO, first is the date of the most recent deployment and second is the date of the most ancient deployment.

When browsing to /console you get a table with columns such as Product | Agent | Tags etc. The columns in this table are configurable by glu-console-webapp.groovy
What I'd like to be added to this table is two columns, one has the date and time of the most recent deployment of items in the row and the other column has the date and time of the oldest deployment of the items on the current row.

The motivation is to be able to easily determine, for a given service, when was it last deployed and what is the most ancient instance of it still currently deployed in production.

See short thread here http://glu.977617.n3.nabble.com/Feature-Request-Add-dates-to-the-table-at-console-tp2550929p2550929.html

Thanks!

Unexpexted exception can disable the agent

If a script raises an unexpected exception, the agent's executor thread will crash and the agent becomes unreachable through the CLI (and probably the REST interface too). (Internal error 500 is returned from here on)

Example:
def install = {
log.info "Listing parameters"
args.each { i -> log.info "Parameter ${i} ${i.value} " }
log.info "Install (${params.message})"
}

This results in IllegalMonitorStateException at the args.each line. It works only if install is defined as
def install = { args ->

The main issue is that any unexpected exception may cause the agent to stop operating.

password.sh requires absolute path

Step to reproduce:

./agent-cli/bin/password.sh ./setup/zookeeper-config/agent.keystore

Exception in thread "main" java.io.FileNotFoundException: ./setup/zookeeper-config/agent.keystore (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at org.linkedin.glu.agent.tools.Password.readFile(Password.java:67)
at org.linkedin.glu.agent.tools.Password.main(Password.java:57)

but the file exists...

./agent-cli/bin/password.sh $PWD/setup/zookeeper-config/agent.keystore

works

deadlock on agent shutdown

Here are the stack traces:

"/anet-cloud/i001" prio=3 tid=0x00000000026fe000 nid=0x13 waiting for monitor entry [0xfffffd7fec216000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at org.linkedin.glu.agent.impl.script.ScriptManagerImpl.findScript(ScriptManagerImpl.groovy)
    - waiting to lock <0xfffffd7ff3624880> (a org.linkedin.glu.agent.impl.script.ScriptManagerImpl)
    at org.linkedin.glu.agent.impl.script.ScriptManagerImpl$findScript.callCurrent(Unknown Source)
    at org.linkedin.glu.agent.impl.script.ScriptManagerImpl.getScript(ScriptManagerImpl.groovy:245)
    at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:362)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
    at org.linkedin.glu.agent.impl.script.ScriptManagerImpl$_createNode_closure5.doCall(ScriptManagerImpl.groovy:200)
    at sun.reflect.GeneratedMethodAccessor188.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
    at org.linkedin.glu.agent.impl.script.ScriptManagerImpl$_createNode_closure5.doCall(ScriptManagerImpl.groovy)
    at sun.reflect.GeneratedMethodAccessor187.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    at groovy.lang.Closure.call(Closure.java:276)
    at org.codehaus.groovy.runtime.ConvertedMap.invokeCustom(ConvertedMap.java:48)
    at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:79)
    at $Proxy5.getState(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor186.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at groovy.lang.MetaClassImpl$GetBeanMethodMetaProperty.getProperty(MetaClassImpl.java:3468)
    at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:61)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:235)
    at JettyServerWithWarsScript$_closure2.doCall(JettyServerWithWarsScript.groovy:71)
    at sun.reflect.GeneratedMethodAccessor204.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
    at JettyServerWithWarsScript$_closure2.doCall(JettyServerWithWarsScript.groovy)
    at sun.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at org.linkedin.glu.agent.impl.script.TimerExecution.execute(TimerExecution.groovy:32)
    at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:362)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
    at org.linkedin.glu.agent.impl.script.FutureExecutionImpl$_closure1.doCall(FutureExecutionImpl.groovy:66)
    at sun.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
    at org.linkedin.glu.agent.impl.script.FutureExecutionImpl$_closure1.doCall(FutureExecutionImpl.groovy)
    at sun.reflect.GeneratedMethodAccessor172.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    at groovy.lang.Closure.call(Closure.java:276)
    at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:51)
    at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:79)
    at $Proxy7.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java_util_concurrent_RunnableFuture$run$0.call(Unknown Source)
    at org.linkedin.glu.agent.impl.script.FutureExecutionImpl.run(FutureExecutionImpl.groovy:80)
    at java_util_concurrent_RunnableFuture$run.call(Unknown Source)
    at org.linkedin.glu.agent.impl.script.ScriptExecution$_closure2.doCall(ScriptExecution.groovy:568)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
    at org.linkedin.glu.agent.impl.script.ScriptExecution$_closure2.doCall(ScriptExecution.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    at groovy.lang.Closure.call(Closure.java:276)
    at groovy.lang.Closure.call(Closure.java:271)
    at groovy.lang.Closure.run(Closure.java:354)
    at java.lang.Thread.run(Thread.java:619)

and

"Thread-11" prio=3 tid=0x0000000002aa2000 nid=0x36e9f in Object.wait() [0xfffffd7fea9ce000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0xfffffd7ff3a6c268> (a java.lang.Thread)
    at java.lang.Thread.join(Thread.java:1143)
    - locked <0xfffffd7ff3a6c268> (a java.lang.Thread)
    at java.lang.Thread.join(Thread.java:1196)
    at sun.reflect.GeneratedMethodAccessor140.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe(AbstractCallSite.java:83)
    at org.linkedin.glu.agent.impl.script.ScriptExecution.waitForShutdown(ScriptExecution.groovy:141)
    at org.linkedin.util.lifecycle.Shutdownable$waitForShutdown$1.call(Unknown Source)
    at org.linkedin.glu.agent.impl.script.ScriptNode.waitForShutdown(ScriptNode.groovy:68)
    at org.linkedin.util.lifecycle.Shutdownable$waitForShutdown$1.call(Unknown Source)
    at org.linkedin.groovy.util.concurrent.GroovyConcurrentUtils$_waitForShutdownMultiple_closure2.doCall(GroovyConcurrentUtils.groovy:74)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    at groovy.lang.Closure.call(Closure.java:276)
    at groovy.lang.Closure.call(Closure.java:289)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1198)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1174)
    at org.codehaus.groovy.runtime.dgm$109.invoke(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:270)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
    at org.linkedin.groovy.util.concurrent.GroovyConcurrentUtils.waitForShutdownMultiple(GroovyConcurrentUtils.groovy:74)
    at org.linkedin.groovy.util.concurrent.GroovyConcurrentUtils$waitForShutdownMultiple.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:132)
    at org.linkedin.glu.agent.impl.script.ScriptManagerImpl.waitForShutdown(ScriptManagerImpl.groovy:487)
    - locked <0xfffffd7ff3624880> (a org.linkedin.glu.agent.impl.script.ScriptManagerImpl)
    at org.linkedin.util.lifecycle.Shutdownable$waitForShutdown.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
    at org.linkedin.glu.agent.impl.script.StateKeeperScriptManager.waitForShutdown(StateKeeperScriptManager.groovy:219)
    at org.linkedin.util.lifecycle.Shutdownable$waitForShutdown.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
    at org.linkedin.glu.agent.impl.AgentImpl.waitForShutdown(AgentImpl.groovy:136)
    at org.linkedin.util.lifecycle.Shutdownable$waitForShutdown.callCurrent(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
    at org.linkedin.glu.agent.impl.AgentImpl.waitForShutdown(AgentImpl.groovy:141)
    at org.linkedin.util.lifecycle.Shutdownable$waitForShutdown$1.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at org.linkedin.glu.agent.server.AgentMain$_registerTerminationHandler_closure13.doCall(AgentMain.groovy:457)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
    at org.linkedin.glu.agent.server.AgentMain$_registerTerminationHandler_closure13.doCall(AgentMain.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    at groovy.lang.Closure.call(Closure.java:276)
    at groovy.lang.Closure.call(Closure.java:271)
    at groovy.lang.Closure.run(Closure.java:354)
    at java.lang.Thread.run(Thread.java:619)

add config to jetty glu script

in 1.6.0 there is very limited capabilities to configure jetty or the webapps embedded (currently only port and contextPath pretty much). Add configuration capabilities to the script so that you can configure vm parameters, jetty itself more deeply as well as the webapps.

Support 'transient' declaration in glu script

There is currently no way to specify that a field in a glu script should not be serialized and made available to ZooKeeper. glu should honor the 'transient' declaration and not serialize a field if it is marked transient.

Generic Tarball Plan

I'd like to put in a feature request to have Glu support the deployment of generic tarballs. I see this feature working in a way that I can provide a coordinate/uri to a tarball and have a plan that simply puts the tarball in a directory, untars it, and runs some arbitrary script.

The arbitrary script would need to take 4 options, install, uninstall, start and stop. These would be run at the self-descriptive time. If glu wants to care about status then the same script should support a status command.

This would allow glu to deploy bits of compiled code that doesn't have something like a container attached to it.

Grails Runtime Exception (500) when viewing a deployment status

Most of the time this works OK, but in one case when I wanted to view the status of a failed deployment (which actually failed with a timeout, I used shell.waitFor) then I got this nasty groovy internal server error.

The URL is at:
http://glu.outbrain.com:8080/console/plan/deployments/89?showErrorsOnly=true

And the screen had:

Error 500: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag cl:renderStepExecution: null at /WEB-INF/grails-app/views/plan/_deploymentDetails.gsp:37 at /WEB-INF/grails-app/views/plan/deploymentDetails.gsp:95
Servlet: grails
URI: /console/grails/plan/deployments.dispatch
Exception Message:
Caused by: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag cl:renderStepExecution: null at /WEB-INF/grails-app/views/plan/_deploymentDetails.gsp:37 at /WEB-INF/grails-app/views/plan/deploymentDetails.gsp:95
Class: gsp_console_plan_deploymentDetails_gsp
At Line: [65]
Code Snippet:
Stack Trace

org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag cl:renderStepExecution: null at /WEB-INF/grails-app/views/plan/_deploymentDetails.gsp:37 at /WEB-INF/grails-app/views/plan/deploymentDetails.gsp:95

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:534)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1351)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1322)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1322)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1322)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:473)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:516)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:929)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:864)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)

at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:285)

at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:116)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1322)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1322)

at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)

at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)

at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)

at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)

at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:343)

at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)

at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:83)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1322)

at org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1322)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1322)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1322)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1322)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:473)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:479)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:929)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:864)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247)

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:151)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)

at org.eclipse.jetty.server.Server.handle(Server.java:352)

at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)

at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1051)

at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:590)

at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212)

at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:508)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)

at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:451)

at java.lang.Thread.run(Thread.java:619)

Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: Error executing tag cl:renderStepExecution: null at /WEB-INF/grails-app/views/plan/_deploymentDetails.gsp:37 at /WEB-INF/grails-app/views/plan/deploymentDetails.gsp:95

at gsp_console_plandeploymentDetails_gsp$_run_closure2.doCall(gsp_console_plandeploymentDetails_gsp.groovy:57)

at gsp_console_plandeploymentDetails_gsp$_run_closure2.doCall(gsp_console_plandeploymentDetails_gsp.groovy)

at gsp_console_plandeploymentDetails_gsp.run(gsp_console_plandeploymentDetails_gsp.groovy:60)

... 54 more

Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag cl:renderStepExecution: null at /WEB-INF/grails-app/views/plan/_deploymentDetails.gsp:37

at gsp_console_plan_deploymentDetails_gsp.run(gsp_console_plan_deploymentDetails_gsp.groovy:65)

... 57 more

Caused by: java.lang.NullPointerException

New users aren't displayed at /console/admin/user/list

Using 1.5.1.

I added 3 users and that was fine.
As I added more and more users that seemed fine, but then I noticed that I don't see them on the list at /console/admin/user/list
I see only the first 4 users (admin and 3 more I added).
If I try to re-add the users that I don't see in the list, then I get an error about unique key, so I realize they were inserted and suppose it's just about the list not showing them

missing connection string in setup-zookeeper.sh

In org.linkedin.glu.packaging-all-1.5.1/org.linkedin.glu.packaging-setup-1.5.1/binsetup-zookeeper.sh the connection string to be passed to zk.sh is missing.

"-s $GLU_ZK_CONNECT_STRING" is missing in line 56

Should be like:
"zk_upload()
{
CMD="$GLU_ZK_CLI -s $GLU_ZK_CONNECT_STRING upload -f $1 $2""

Build errors

Hi, sorry for posting this as a bug, it's probably not a bug but I couldn't find my way to the mailing list...
I think I have a build error, I get it when trying to gradle glu or linkedin-zookeeper. It's most probably not an error in glu or zk and may be a setup error in my envoronment (first time I'm using gradle or groovy) but I haven't been able to figure it out my self so I figured it wouldn't hurt to shout for help.
I followed the instructions here https://github.com/linkedin/glu/blob/master/1-QUICK-DEV-SETUP.md

System: CentOS

$ gradle -v

Gradle 0.9-rc-1

Gradle buildtime: Wednesday, 4 August 2010 8:04:33 AM EST
Groovy: 1.7.3
Ant: Apache Ant version 1.8.1 compiled on April 30 2010
Ivy: 2.2.0-rc1
Java: 1.6.0_11
JVM: 11.0-b16
JVM Vendor: Sun Microsystems Inc.
OS Name: Linux

$ groovy -v
Groovy Version: 1.7.5 JVM: 1.6.0_11

I have actually tried this with different versions of gradle (0.8, 0.9-rc-1 and 0.9-rc-2) and they all failed. Not all failures were exactly the same but they were the same in spirit I think... Here's the output with rc1

~/dev/linkedin-zookeeper $ gradle package-install
Working in snapshot mode: 1.2.1-SNAPSHOT

FAILURE: Build failed with an exception.

  • Where:
    Build file '/home/ran/dev/linkedin-zookeeper/build.gradle' line: 52
  • What went wrong:
    A problem occurred evaluating root project 'linkedin-zookeeper'.
    Cause: No signature of method: org.gradle.api.internal.project.GradleInternalServiceRegistry.getFactory() is applicable for argument types: (java.lang.Class) values: [interface org.gradle.api.artifacts.dsl.RepositoryHandler]
    Possible solutions: iterator()
  • Try:
    Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.

BUILD FAILED

Total time: 3.015 secs

Now the error installing glu is quite similar:
~/dev/glu/agent/org.linkedin.glu.agent-server $ gradle setup-2-2
Working in snapshot mode: 1.3.2-SNAPSHOT

FAILURE: Build failed with an exception.

  • Where:
    Build file '/home/ran/dev/glu/build.gradle' line: 52
  • What went wrong:
    A problem occurred evaluating root project 'glu'.
    Cause: No signature of method: org.gradle.api.internal.project.GradleInternalServiceRegistry.getFactory() is applicable for argument types: (java.lang.Class) values: [interface org.gradle.api.artifacts.dsl.RepositoryHandler]
    Possible solutions: iterator()
  • Try:
    Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.

BUILD FAILED

Total time: 5.695 secs

Thanks!

agent cli fails when using spaces

running the following command generates an exception:

./bin/agent-cli.sh -m /foo -I file:///tmp/test.groovy -a "[foo:'hello world']"         11:15:00
 Exception in thread "main" org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 1: expecting ''', found '<EOF>' @ line 1, column 12.
 [foo:'hello
          ^

1 error

at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:296)
at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:143)
at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:113)
at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:125)
at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:337)
at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:99)
at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:71)
at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:236)
at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:158)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:814)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:511)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:487)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:464)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:306)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:287)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:727)
at groovy.lang.GroovyShell.parse(GroovyShell.java:739)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:574)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:614)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:585)
at groovy.lang.GroovyShell$evaluate.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
at org.linkedin.glu.agent.cli.ClientMain.extractArgs(ClientMain.groovy:413)

Java 1.5?

Can't get anything done with java 1.5. Is java 1.6 required?

agent does not recover properly when safeOverwrite fails

This has been reported at LinkedIn when a 'no space left on device' exception was thrown. The issue is that the state directory (data/scripts/state) ends up with a bunch of invalid files and the zookeeper sync procedure fails on it.

Agent name and fabric are not preserved upon restart

When starting the agent it is possible to provide the -z, -n and -f options to specify the ZooKeeper url, agent name and fabric respectively.

If you stop the agent and restarts it without specifying any of those options, only the ZooKeeper one is remembered.

It should be the same behavior for name and fabric.

Feature Request: Add validate phase to the Glu Script

The way I see things, this is a desirable workflow (at least to me...).
When deploying a fresh version of a service to a cluster of servers:

  1. Deploy to one server
  2. Validate the first server
  3. Deploy to 2 servers
  4. Validate those two
  5. Deploy to 4 servers, validate...
    6 ... deploy more such that an any given time no more than Y servers are down, call it the sliding window. The sliding window grows exponentially starting at 1 ending at Y which is controlled by the user.
  6. Report success if all servers were validated.
  7. If any of the servers reported a failure, rollback all of them and report failure. Rolling back would again have to make sure that at least 50% of the hosts are up at any given time

Using the console's API (or maybe even the agent's API) this is probably doable but I'm suggesting this workflow as a core feature so that glu users would not have to re-implement.

I think a simple step forward, if you agree with the approach, is to add a validate() method to the GlueScript. So far we have install, configure, start, stop, unconfigure and uninstall so I suggest to add validate which, if fails, (returns false or throws) then glu would initiate a rollback protocol.

thoughts?

Feature Request: Support --no-check-certificate in shell.fetch

Copied from this thread: http://glu.977617.n3.nabble.com/shell-fetch-and-unautoritative-certificates-tp2888979p2888979.html

I have an https service for which its certificate is "valid" but isn't signed by an autoritative CA.
This is normal in my business since real users never hit this service directly, only via a proxy, which does have the appropriate cert. (the internal service node has a different host name which is used for load balancing and fail over). So from the user's perspective this is fine.
When I use glu to deploy the service, after it's installed I run a test using shell.fetch which basically makes sure that the service is running and is healthy.
Now the problem is that since the service's certificate isn't properly signed by a CA, shell.fetch fails.
With wget I could use --no-check-certificate.
Is there a similar no-check-certificate option when using shell.fetch?
I could fall back to running a shell with wget --no-check-certificat but I would rather use shell.fetch if that's possible.
Thanks.

Yan:
The code being executed is the following: https://github.com/linkedin/linkedin-utils/blob/master/org.linkedin.util-groovy/src/main/groovy/org/linkedin/groovy/util/io/GroovyIOUtils.groovy#L292

If you remember the code was actually enhanced because of your feature request (handling username/password).

As you can see under the cover it simply delegates to ant get task.

Quickly looking at the ant task it does not seem that it supports a no check certificate option :(

The quick answer to your question is no. The current shell.fetch method does not support this option. You may want to add a feature request and I will get to it at some point (unless you want to implement it of course :).

use -XX:+PrintGCDateStamps for gc log

Displaying timestamp is not very useful. Change the startup scripts (agent, console, zookeeper, etc...) to use -XX:+PrintGCDateStamps for gc logging.

Using http://name:pass@host:port is broken when uploading a model to /system/model

I'm trying to upload a model file through the rest API using a modelUrl parameter.

The following call fails with

The request sent by the client was syntactically incorrect (Server returned HTTP response code: 401 for URL: http://user:pass@svn.../.../glu.json

curl  -d "modelUrl=http://user:pass@svn.../.../glu.json" http://glua:password@tush:8080/console/rest/v1/glu-dev-1/system/model

While this call actually passes:

curl -d "modelUrl=file:/outbrain/glu/glu.json" http://glua:password@tush:8080/console/rest/v1/glu-dev-1/system/model

I think that the problem is similar to the one described at https://github.com/linkedin/glu/issues/closed#issue/8 only that this time I wasn't able to find the source code for the class that actually makes the HTTP request.

The line is ModelController.groovy:117

model = GroovyNetUtils.toURI(params.modelUrl).toURL().text

the .text I assume should fetch the content of params.modelUrl but it fails for the given http parameter and my assumption is that its authentication isn't performed correctly (if I try a URL without user:pass then it's OK).

Add 'decommission' a node/agent to the console

The Admin/View agents fabric page allows you to assign a fabric to a node/agent. The console does not allow you to cleanly remove a node/agent that is no longer used, thus leaving stale/useless data in ZooKeeper. There should be a way (on this page or another) to simply decommission a node/agent.

better packaging

Some suggestions on better packaging:

  1. change org.linkedin.glu… to, e.g. console, agent etc.
  2. create startup scripts, eg. agent.sh, console.sh in bin
  3. made staring scripts parameterized with fabric names

Improve agent-cli startup time

As discussed on the forum: http://glu.977617.n3.nabble.com/GLU-memory-consumption-and-response-time-jconsole-td2764498.html

"""Sorry, I wasn't too clear on the cli. It is the agent-cli. I went on with experimenting and found that there is practically no waiting time, the CPU is spinning at 100%. On a 2.66 GHz CPU it takes at least 2.5 seconds to complete a request, while on 2 GHz it takes at least 5 secs. Groovy is a great language but seems like it affects the performance quite a bit. However, these delays are not a huge issue, just a little annoying during testing.
"""

Use ip address instead of canonical name for Console->Agent communication

In some setups the canonical DNS names don't actually resolve to a routable IP and that causes an error when the Console is attempting to connect to the Agent:
The agents are being started with an overwritten -n value to give the IP address as a name, but somehow the canonical hostname still manages to crepe in. :(

2011/01/12 14:01:59.079 WARN [restlet] An error occurred during the communication with the remote HTTP server.
java.net.UnknownHostException: ticdevgrid1vm0.dev.orbitz.net
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:519)
        at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123)
        at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:123)
        at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:147)
        at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108)
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)
        at org.restlet.ext.httpclient.internal.HttpMethodCall.sendRequest(HttpMethodCall.java:331)
        at org.restlet.engine.http.adapter.ClientAdapter.commit(ClientAdapter.java:112)
        at org.restlet.engine.http.HttpClientHelper.handle(HttpClientHelper.java:110)
        at org.restlet.Client.handle(Client.java:177)
        at org.restlet.resource.ClientResource.handle(ClientResource.java:928)
        at org.restlet.resource.ClientResource.handle(ClientResource.java:999)
        at org.restlet.resource.ClientResource.handle(ClientResource.java:999)
        at org.restlet.resource.ClientResource.handle(ClientResource.java:896)
        at org.restlet.resource.ClientResource.handle(ClientResource.java:851)
        at org.restlet.resource.ClientResource.handle(ClientResource.java:759)
        at org.restlet.resource.ClientResource.get(ClientResource.java:492)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
        at org.linkedin.glu.agent.rest.client.AgentRestClient$_ps_closure12.doCall(AgentRestClient.groovy:146)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
        at org.linkedin.glu.agent.rest.client.AgentRestClient$_ps_closure12.call(AgentRestClient.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:63)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
        at org.linkedin.glu.agent.rest.client.AgentRestClient.handleResponse(AgentRestClient.groovy:307)
        at org.linkedin.glu.agent.rest.client.AgentRestClient.this$2$handleResponse(AgentRestClient.groovy)
        at org.linkedin.glu.agent.rest.client.AgentRestClient$this$2$handleResponse.callCurrent(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:153)
        at org.linkedin.glu.agent.rest.client.AgentRestClient.ps(AgentRestClient.groovy:145)
        at org.linkedin.glu.agent.api.Agent$ps$6.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
        at org.linkedin.glu.console.services.AgentsService$_ps_closure7.doCall(AgentsService.groovy:161)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
        at org.linkedin.glu.console.services.AgentsService$_ps_closure7.call(AgentsService.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:63)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
        at org.linkedin.glu.console.services.AgentsService$_withRemoteAgent_closure18.doCall(AgentsService.groovy:470)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
        at org.linkedin.glu.console.services.AgentsService$_withRemoteAgent_closure18.call(AgentsService.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:63)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
        at org.linkedin.glu.agent.rest.client.AgentFactoryImpl.withRemoteAgent(AgentFactoryImpl.groovy:106)
        at org.linkedin.glu.agent.rest.client.AgentFactory$withRemoteAgent$111.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
        at org.linkedin.glu.console.services.AgentsService.withRemoteAgent(AgentsService.groovy:469)
        at org.linkedin.glu.console.services.AgentsService.this$2$withRemoteAgent(AgentsService.groovy)
        at org.linkedin.glu.console.services.AgentsService$this$2$withRemoteAgent$1.callCurrent(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157)
        at org.linkedin.glu.console.services.AgentsService.ps(AgentsService.groovy:160)
        at org.linkedin.glu.console.services.AgentsService$ps$0.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
        at org.linkedin.glu.console.controllers.AgentsController$_closure7.doCall(AgentsController.groovy:196)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:225)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
        at org.linkedin.glu.console.controllers.AgentsController$_closure7.doCall(AgentsController.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
        at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1070)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
        at groovy.lang.Closure.call(Closure.java:276)
        at groovy.lang.Closure.call(Closure.java:271)
        at org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsControllerHelper.handleAction(SimpleGrailsControllerHelper.java:368)
        at org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsControllerHelper.executeAction(SimpleGrailsControllerHelper.java:232)
        at org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsControllerHelper.handleURI(SimpleGrailsControllerHelper.java:190)
        at org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsControllerHelper.handleURI(SimpleGrailsControllerHelper.java:129)
        at org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController.handleRequest(SimpleGrailsController.java:73)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        at org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.doDispatch(GrailsDispatcherServlet.java:292)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
        at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:293)
        at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:260)
        at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(WebUtils.java:251)
        at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:183)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent(GrailsPageFilter.java:246)
        at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilter.java:135)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:343)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:83)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:69)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:619)
2011/01/12 14:02:00.796 ERROR [GrailsExceptionResolver] Communication Error (1001) - ticdevgrid1vm0.dev.orbitz.net
org.linkedin.glu.agent.api.AgentException: Communication Error (1001) - ticdevgrid1vm0.dev.orbitz.net
        at org.linkedin.glu.agent.rest.client.AgentRestClient.handleError(AgentRestClient.groovy:351)
        at org.linkedin.glu.agent.rest.client.AgentRestClient.this$2$handleError(AgentRestClient.groovy)
        at org.linkedin.glu.agent.rest.client.AgentRestClient$this$2$handleError.callCurrent(Unknown Source)
        at org.linkedin.glu.agent.rest.client.AgentRestClient.handleResponse(AgentRestClient.groovy:321)
        at org.linkedin.glu.agent.rest.client.AgentRestClient.this$2$handleResponse(AgentRestClient.groovy)
        at org.linkedin.glu.agent.rest.client.AgentRestClient$this$2$handleResponse.callCurrent(Unknown Source)
        at org.linkedin.glu.agent.rest.client.AgentRestClient.ps(AgentRestClient.groovy:145)
        at org.linkedin.glu.agent.api.Agent$ps$6.call(Unknown Source)
        at org.linkedin.glu.console.services.AgentsService$_ps_closure7.doCall(AgentsService.groovy:161)
        at org.linkedin.glu.console.services.AgentsService$_ps_closure7.call(AgentsService.groovy)
        at org.linkedin.glu.console.services.AgentsService$_withRemoteAgent_closure18.doCall(AgentsService.groovy:470)
        at org.linkedin.glu.console.services.AgentsService$_withRemoteAgent_closure18.call(AgentsService.groovy)
        at org.linkedin.glu.agent.rest.client.AgentFactoryImpl.withRemoteAgent(AgentFactoryImpl.groovy:106)
        at org.linkedin.glu.agent.rest.client.AgentFactory$withRemoteAgent$111.call(Unknown Source)
        at org.linkedin.glu.console.services.AgentsService.withRemoteAgent(AgentsService.groovy:469)
        at org.linkedin.glu.console.services.AgentsService.this$2$withRemoteAgent(AgentsService.groovy)
        at org.linkedin.glu.console.services.AgentsService$this$2$withRemoteAgent$1.callCurrent(Unknown Source)
        at org.linkedin.glu.console.services.AgentsService.ps(AgentsService.groovy:160)
        at org.linkedin.glu.console.services.AgentsService$ps$0.call(Unknown Source)
        at org.linkedin.glu.console.controllers.AgentsController$_closure7.doCall(AgentsController.groovy:196)
        at org.linkedin.glu.console.controllers.AgentsController$_closure7.doCall(AgentsController.groovy)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:343)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:83)
        at org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
        at java.lang.Thread.run(Thread.java:619)

Feature Request: Serialize deployments per agent

If I have two concurrently running deployments that happen to use the same agent, do they get serialized or can they run concurrently?
Currently the answer is that they run concurrently. This is good for some scenarios however other scenarios actually make it desirable to serialize all deployments on a per-agent basis. This is what this feature request is about.
Motivation: In my setup, we have many web applications running under the same application server (tomcat). The deployments do not hot-deploy to tomcat, instead, they take tomcat down, replace the war file, clean up a little and then take tomcat back up.
What happens when two such apps which live under the same tomcat, use the same agent but have different mount points (and admittedly don't make good use of glu's mount points), so if one app starts a deployment then another one joins, there could be a mess. For example an app is trying to stop tomcat while at the same time another app is trying to start it. You can call that a race condition which can be solved if glu serialized all deployments per agent.

See the thread at http://glu.977617.n3.nabble.com/Serializing-deployments-on-an-agent-tp2550982p2550982.html

Agent exception when no persistent properties files

2011/03/03 19:12:08.022 INFO [ZKClient$StateChangeDispatcher] Starting StateChangeDispatcher
Exception in thread "main" java.lang.NullPointerException
       at java.util.HashMap.putAll(HashMap.java:498)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnw
rapNoCoerce.invoke(PojoMetaMethodSite.java:229)
       at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.j
ava:52)
       at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java
:40)
       at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.j
ava:54)
       at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
124)
       at org.linkedin.glu.agent.impl.storage.AgentProperties.getExposedProperties(AgentPro
perties.groovy:57)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
       at groovy.lang.MetaClassImpl$GetBeanMethodMetaProperty.getProperty(MetaClassImpl.jav
a:3468)
       at org.codehaus.groovy.runtime.callsite.GetEffectivePogoPropertySite.getProperty(Get
EffectivePogoPropertySite.java:84)
       at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty
(AbstractCallSite.java:239)
       at org.linkedin.glu.agent.impl.storage.AgentProperties.getExposedProperty(AgentPrope
rties.groovy:82)
       at org.linkedin.glu.agent.impl.storage.AgentProperties$getExposedProperty.call(Unkno
wn Source)
       at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java
:40)
       at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
116)
       at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
124)
       at org.linkedin.glu.agent.impl.storage.TagsStorage.loadTags(TagsStorage.groovy:88)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
       at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoU
nwrapNoCoerce.invoke(StaticMetaMethodSite.java:148)
       at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMe
thodSite.java:99)
       at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArra
y.java:48)
       at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite
.java:165)
       at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite
.java:177)
       at org.linkedin.glu.agent.impl.storage.TagsStorage.(TagsStorage.groovy:36)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorIm
pl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAc
cessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
       at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77
)
       at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoe
rce.callConstructor(ConstructorSite.java:102)
       at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSit
eArray.java:52)
       at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCal
lSite.java:190)
       at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCal
lSite.java:202)
       at org.linkedin.glu.agent.server.AgentMain.start(AgentMain.groovy:404)

Better/More complete documentation

Now that the project has been out for a while, the documentation needs to be restructured to match the latest improvements (the tutorial did not exist at first and as a result the primary documentation is mostly targeted at developers).

Mountpoint disappears from agent view when not in model

Steps to reproduce following the tutorial:

  • load the model
  • deploy the 3 webapps
  • change the system model and remove 2nd entry (/sample/i002)
  • on the dashboard, /sample/i002 is properly flagged red : 'should NOT be deployed'
  • if you go to the agent view (agent-1), note that there are only 2 entries and that /sample/i002 is missing which is problematic because there is no way to execute individual commands (start/stop)...

add actionArgs support

Currently it is possible to provide actionArgs to any action being executed, but there is no way to currently provide them part of the model or have a delta computed on actionArgs.

This would address both issues:

Change Agent.installScript call to add a actionArgs (optional) map with the following definition:

key = name of the phase in the glu script (ex: 'start')
value = a map to provide to the 'phase' closure

Add the concept to SystemEntry and make all the necessary changes so that it triggers the correct delta.

For example, instead of providing the 'weapps' information as part of the initParameters which triggers a full undeploy/deploy when they change, they could be provided as actionArgs to the configure phase which would only trigger an unconfigure/configure.

{
  "actionArgs": {
    "configure": {
      "webapps": [
        {
          "war": "http://localhost:8080/glu/repository/wars/@sample.webapp@",
          "contextPath": "/cp1",
          "monitor": "/monitor"
        },
        {
          "war": "http://localhost:8080/glu/repository/wars/@sample.webapp@",
          "contextPath": "/cp2",
          "monitor": "/monitor"
        }
        ]
    }
  },
  "agent": "agent-1",
  "initParameters": {
    "skeleton": "http://localhost:8080/glu/repository/tgzs/@jetty.archive@",
    "port": 9000
  },
  "metadata": {
    "cluster": "c1",
    "container": {"name": "sample"},
    "product": "product1",
    "version": "1.0.0"
  },
  "mountPoint": "/sample/i001",
  "script": "http://localhost:8080/glu/repository/scripts/org.linkedin.glu.script-jetty-@version@/JettyGluScript.groovy"
},

and the glu script would use it this way:

def configure = { args ->
  log.info "Configuring..."
  // first we configure the server
  configureServer()
  // second we configure the apps
  configureWebapps(args.webapps)
  ...
}

Refactor code out of the console

Due to the fact that the console is a grails application it is hard to reuse the code. The purpose of this task is to extract as much code as possible so that it is reusable.

Add gradle wrapper

The gradle wrapper (gradlew) is seriously convenient. Without it we have to install gradle ourselves, with it we just run gradlew.bat/sh.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.