Weird script-caching issue with external scripts

Hey all,

it seems like genieacs is caching extension-scripts in some form - but does this inconsistently:

timeline:

  1. created a script returning the string “test123”
  2. executed the script via a provision on a simulated CPE successfully (“Script: test123” in log)
  3. changed the script
  4. executed the script via a provision on a simulated CPE unsuccessfully (“Extension timed out”)
  5. executed the script again (after a change not related to the ACS Server), this time successfully (“Script: test123” in log)

After restarting the genieacs-cwmp service, the script changes were permanent.

Can we somehow control this behaviour? disable the caching? manually refresh/clear the cache?

Thanks in advance"

I noticed a few days back when I would try to send a task to a device behind NAT, I was getting a channel error and that the change would get cached somewhere. The change was happening but the Genieacs server didn’t realise it so would keep trying. I didn’t pursue it far but the task wouldn’t show in the task list from the cli so I couldn’t delete it. It did look like every hour the task would return until the retries got to 4 or 5. I left it then as I assumed it was something I was doing when I was messing with the config.

So it would be a possibility that the faulted task was cached, not the script itself?
huh, interesting.

I need to dig a little deeper, will report back…

The extensions are loaded on demand when they’re first called. Every genieacs-cwmp process may spawn one process per extension. So if you change the ext code while genieacs-cwmp is running you may end up with different versions of that extension. Which one is called depends on which particular genieacs-cwmp process is serving the request. So you should restart genieacs-cwmp whenever the extension scripts change.