-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gracefully handle empty db file on startup #315
Gracefully handle empty db file on startup #315
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: booxter The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@karelyatin this is the fix body. Do you think we need a kuttl scenario for this? We can probably start the cluster, then |
In some situations, e.g. when ovsdb-tool is killed during db file initialization, the file may end up empty. On next restart, the service fails to start because the file format is invalid. Ideally, ovs start scripts would handle this situation gracefully, as tracked in https://issues.redhat.com/browse/FDP-689 But in the meantime, we can also handle the situation on operator's side, by removing the empty file if present. FYI a valid file always contains at least some data, because ovsdb-tool adds a log entry with raft config as the first entry. See: https://github.com/openvswitch/ovs/blob/56e315937eeb640d5d8f305988d133390445eaee/ovsdb/raft.c#L525 Resolves: https://issues.redhat.com/browse/OSPRH-8117
|
/test ovn-operator-build-deploy-kuttl |
2 similar comments
/test ovn-operator-build-deploy-kuttl |
/test ovn-operator-build-deploy-kuttl |
Thanks Ihar, doesn't looks we need any kuttl test just for this. |
/lgtm |
598886a
into
openstack-k8s-operators:main
In some situations, e.g. when ovsdb-tool is killed during db file initialization, the file may end up empty. On next restart, the service fails to start because the file format is invalid.
Ideally, ovs start scripts would handle this situation gracefully, as tracked in https://issues.redhat.com/browse/FDP-689
But in the meantime, we can also handle the situation on operator's side, by removing the empty file if present.
FYI a valid file always contains at least some data, because ovsdb-tool adds a log entry with raft config as the first entry. See:
https://github.com/openvswitch/ovs/blob/56e315937eeb640d5d8f305988d133390445eaee/ovsdb/raft.c#L525
Resolves: https://issues.redhat.com/browse/OSPRH-8117