In HyperShift hosted cluster deployment we often expose the SBDB connection as an openshift route and we only provide one endpoint to ovn-trace, even if SBDB runs in clustered mode. This is fine for ovn-controller and we can use `--no-leader-only` with ovn-sbctl, ovn-trace doesn't have that option. debug logs: #ovn-trace <ssl> --db ssl:ovnkube-sbdb-clusters-hypershift-ci-22332.apps.rbratta-o413a42h.qe.devcluster.openshift.com:443 ... -v ... 2022-12-09T09:43:12Z|00064|ovsdb_cs|INFO|ssl:ovnkube-sbdb-clusters-hypershift-ci-22332.apps.rbratta-o413a42h.qe.devcluster.openshift.com:443: clustered database server is not cluster leader; trying another server 2022-12-09T09:43:12Z|00065|reconnect|DBG|ssl:ovnkube-sbdb-clusters-hypershift-ci-22332.apps.rbratta-o413a42h.qe.devcluster.openshift.com:443: entering RECONNECT 2022-12-09T09:43:12Z|00066|ovsdb_cs|DBG|ssl:ovnkube-sbdb-clusters-hypershift-ci-22332.apps.rbratta-o413a42h.qe.devcluster.openshift.com:443: SERVER_MONITOR_REQUESTED -> RETRY at lib/ovsdb-cs.c:2011 2022-12-09T09:43:12Z|00067|poll_loop|DBG|wakeup due to 0-ms timeout at lib/reconnect.c:677 2022-12-09T09:43:12Z|00068|reconnect|INFO|ssl:ovnkube-sbdb-clusters-hypershift-ci-22332.apps.rbratta-o413a42h.qe.devcluster.openshift.com:443: connection attempt timed out 2022-12-09T09:43:12Z|00069|reconnect|DBG|ssl:ovnkube-sbdb-clusters-hypershift-ci-22332.apps.rbratta-o413a42h.qe.devcluster.openshift.com:443: entering BACKOFF 2022-12-09T09:43:12Z|00070|stream_ssl|DBG|client0-->ssl:ovnkube-sbdb-clusters-hypershift-ci-22332.apps.rbratta-o413a42h.qe.devcluster.openshift.com:443 type 256 (5 bytes) 2022-12-09T09:43:12Z|00071|stream_ssl|DBG|client0-->ssl:ovnkube-sbdb-clusters-hypershift-ci-22332.apps.rbratta-o413a42h.qe.devcluster.openshift.com:443 type 257 (1 bytes) 2022-12-09T09:43:12Z|00072|stream_ssl|DBG|client0-->ssl:ovnkube-sbdb-clusters-hypershift-ci-22332.apps.rbratta-o413a42h.qe.devcluster.openshift.com:443 alert: warning, close_notify (2 bytes) 2022-12-09T09:43:12Z|00073|ovsdb_cs|DBG|ssl:ovnkube-sbdb-clusters-hypershift-ci-22332.apps.rbratta-o413a42h.qe.devcluster.openshift.com:443: RETRY -> SERVER_SCHEMA_REQUESTED at lib/ovsdb-cs.c:419 ovn-trace: ssl:ovnkube-sbdb-clusters-hypershift-ci-22332.apps.rbratta-o413a42h.qe.devcluster.openshift.com:443: database connection failed () How reproducible: Always Expected results: ovn-trace to have an option to work with non-leader sbdb
V1 posted for review: https://patchwork.ozlabs.org/project/ovn/list/?series=331978&state=*
ovn22.06 fast-datapath-rhel-9 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2155387 ovn22.03 fast-datapath-rhel-8 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2155390 ovn22.03 fast-datapath-rhel-9 clone created at https://bugzilla.redhat.com/show_bug.cgi?id=2155391
It seems hard to reproduce as we need to setup an ovn-sandbox to do this. For that purpose, we need to build ovn sources for a sandbox: make sandbox SANDBOXFLAGS="--sbdb-mode=clustered this would spawn ovn in a sandbox and SB will start in clustered mode. However from the other tests related to ovn-trace, this seems OK. Verifying as sanity Only.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (ovn22.06 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:0680