Change in underlying websocket library

Tim Penhey tim.penhey at canonical.com
Wed Feb 22 02:35:23 UTC 2017


Hi folks,

Just merged into the "devel" branch (will be 2.2 branch) is a change in 
the library Juju is using for websockets.

Hopefully you won't notice a thing, but if you do see strange 
interactions I'd love to know.

I did test with new CLI / old controller, and it works, and tested with 
new controller / old agents and CLI and it works. And obviously new / 
new works too.

The decision to change the websocket library was made by the tech board 
over a year ago but was just put on the back burner because other things 
were more urgent.  I was following through a thread on memory leaks and 
thought that the websocket library may be contributing to missing when 
some servers went away.

There has been a lot of work in the 2.1 branch dealing with memory 
leaks. Many have been fixed, but there is one particular case that we 
know is still there.  When agents disappear, sometimes the controller 
part that is handling the logs for that agent doesn't notice. This will 
mean extra goroutines, and if the model has been deleted, an extra leak 
of a database object. This type of leak especially hits continuous 
testing situations where models are being created, deployed, then 
destroyed in quick succession - as is the case with the Canonical OIL 
testing.

I have a gut feeling that the problem isn't entirely fixed just by 
changing the libraries, but it may have helped. What it has done though 
is given us some more options to fixing it fully - the proper way.

Cheers,
Tim



More information about the Juju-dev mailing list