Customer complained that lastContact present in API responses of /enterprise/getEnterpriseEdges and /edge/getEdge are different
Environment
VMware SDWAN Orchestrator
Cause
The difference in lastContact fetched by two APIs /enterprise/getEnterpriseEdges and /edge/getEdge is expected due to below reasons :
/enterprise/getEnterpriseEdges -- > Fetches last contact from MySQL database which is equivalent to System Up Since on the Edge view screen
/edge/getEdge ----> Fetches last contact from redis cache which is equivalent to Last Contact means the last successful heartbeat received from that edge
VCO doesn't update timestamp of every heartbeat in MySQL database.
In database, it only stores the last timestamp of heartbeat when the edge came online.
mysql> select lastContact from VELOCLOUD_EDGE where id=2; +---------------------+ | lastContact | +---------------------+ | 2024-05-28 02:12:55 | +---------------------+ 1 row in set (0.00 sec)
mysql>
Whereas in redis, timestamp of every heartbeat is stored temporary so lastContact fetched from database and redis cache will be different. This is expected behaviour.