Page MenuHomeVyOS Platform

HTTP API: GraphQL config file operations bypass the REST configuration lock
Open, NormalPublic

Description

GraphQL saveConfigFile and loadConfigFile operate on the same shared ConfigSession as the REST API but take no lock, so a GraphQL load and commit can interleave with a REST configure request and commit or discard its half-applied changes. GraphQL resolvers also run these calls directly on the event loop, so a GraphQL commit stalls every other API request.

Move the configuration lock to the shared API session module, take it for GraphQL config file save/load, and run config-session mutations in a worker thread.

Related: T9648 (REST /config-file uses the same lock).

Details

Version
rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)