OpenVidu Event: Invalid Json

I received this autoscaling event with one of the values being NaN which is invalid json. Is this a bug?

{
	"timestamp": 1623199180072,
	"clusterId": "openvidu.govork.com",
	"reason": "Minimum number of nodes (1) not reached.  The cluster average load is within the range [30.00%, 70.00%]. Current number of active nodes is 0 (0 launching and 0 running). 1 new Media Nodes will be launched.",
	"mediaNodes": {
		"launch": {
			"total": 1,
			"waitingIdleToTerminateNodes": [],
			"canceledNodes": [],
			"newNodes": 1
		},
		"terminate": {
			"total": 0,
			"launchingNodes": [],
			"runningNodes": []
		}
	},
	"system": {
		"config": {
			"maxNodes": 8,
			"minNodes": 1,
			"maxAvgLoad": 70.0,
			"minAvgLoad": 30.0
		},
		"status": {
			"numNodes": 0,
			"totalLoad": 0.0,
			"avgLoad": NaN,
			"runningNodes": [],
			"launchingNodes": [],
			"waitingIdleToTerminateNodes": [],
			"canceledNodes": []
		}
	},
	"event": "autoscaling"
}

Indeed, Nan is not a valid JSON value, so this is clearly a bug.
I have already found the root cause and fixed it. This is already listed in the bug fix list for 2.19.0 release.

Thank you for reporting.

2 Likes