replication-manager
replication-manager copied to clipboard
Console rendering invalid characters on RHEL 8
We recently started upgrading our servers to RHEL 8, and while everything seems to be functional, we are getting invalid characters rendered to the terminal when we use the CLI Console:
[root@dbmgr-dev ~]# replication-manager-cli console
%p1%dGQ������������������������������������������������������
Replication Manager Client | Group: dev-cluster | Mode: Manual �����������������������
Host Port Status Failures Using GTID Current GTID Slave GTID Replication Health Delay RO��������������������� �����������������������>
10.36.21.123 3306 Master 0 No 2-1451829552-10767,7-1451862526-13 2-1451843462-9911,7-1451862526-13 Master OK 0 OFF�������������
10.32.21.123 3306 Slave 0 Slave_Pos 2-1451843462-11622 2-1451829552-10767 Running OK 0 ON
Updates to the terminal are not rendered correctly, and exiting the Console requires a reset
command to restore the terminal to normal.
I've tried both the v2.2.20 and v2.3.20 versions and both exhibit the same issue.
I've also verified the issue occurs in CentOS 8 Stream, to rule out any RHEL specific shenanigans.
Thanks for reporting we will try to improve on this when one get time in the team
Can you please just let us know the name of your cluster so that we can reproduce that bad printing ?
Here's the cluster.d/dev-cluster.toml
:
[dev-cluster]
title = "Dev Cluster"
db-servers-hosts = "10.36.21.123,10.32.21.123"
db-servers-prefered-master = "10.36.21.123"
db-servers-ignored-hosts = ""
db-servers-connect-timeout = 5
db-servers-read-timeout = 15
db-servers-credential = "[REDACTED]"
db-servers-tls-ca-cert = ""
db-servers-tls-client-cert = ""
db-servers-tls-client-key = ""
replication-credential = "[REDACTED]"
replication-use-ssl = false
replication-master-slave = true
proxy-servers-read-on-master = "true"
It looks like this is an issue in the underlying termbox-go
dependency due to an update to ncurses terminfo format: https://github.com/nsf/termbox-go/issues/185
I think the dependency is version-locked to a few commits before the fix was pushed. Updating the termbox-go
dependency should fix the issue.
Current version locked commit: https://github.com/nsf/termbox-go/commit/88b7b944be8b Commit with fix for new ncurses format: https://github.com/nsf/termbox-go/commit/08476232a995
https://github.com/signal18/replication-manager/blob/ec79c78222eac5da21add8f153d3ada40b01e77b/go.mod#L65
In the meantime, prefixing the replication-manager-cli console
command with TERM=xterm
works around the issue. The default TERM
environment value in RHEL 8 of xterm-256color
should reproduce the issue.
Hi thanks a lot for reporting and digging in the code for a workaround and a fixe would like to make a pull request for it or should we proceed with the change ?
I'm not very fluent in the language, so I'll leave the actual change to the experts :)
Please reopen if not fixed