The service already supports avoiding chassis record cleanup with --restart CLI option. It may be useful, in some scenarios, to be able to control this behavior via ovsdb.
The proposal is to make this possible: ovs-vsctl -- set Open_vSwitch . external-ids:ovn-cleanup-on-exit=false
The exact behavior proposed is:
1. bare stop_controller - cleanup chassis
2. stop_controller --restart - don't cleanup chassis
3. stop_controller + ext_ids:ovn-cleanup-on-exit=true - cleanup chassis
4. stop_controller + ext_ids:ovn-cleanup-on-exit=false - don't cleanup
5. stop_controller + ext_ids:ovn-cleanup-on-exit=false + --restart - warn about mutually exclusive requests; still cleanup
6. stop_controller + ext_ids:ovn-cleanup-on-exit=true + --restart - don't cleanup
1-2 are currently implemented. 3 kinda is too since the attribute is not read anyway. 4-6 should be implemented.
This was discussed in Slack.