Describe the bug
On a newly created MySQL semisync cluster, KubeBlocks can publish the
Component system-account condition as AllProvisioned and make the Cluster
Ready before kbadmin is usable on the secondary Pod.
The backup policy prefers a secondary Pod and uses kbadmin. A backup started
in this window can fail with MySQL access denied even though the same generated
Secret works on the primary and later works on the secondary.
This is tracked as a known issue. The exact readiness-window duration and the
underlying replication timing are still being measured.
Environment
- Addon: MySQL
- Topology:
semisync
- Replicas: 2 (one primary, one secondary)
- MySQL: 8.0.46
- Addon source:
cb195154944dc3e0911b0b1eb6639edea033ed1b
Evidence
One unchanged-code reproduction recorded this timeline:
- 21:30:14 UTC:
kbadmin first authenticated successfully on the primary.
- 21:30:25 UTC: Cluster Ready/Available and
SystemAccountProvision=True, reason AllProvisioned.
- 21:30:28 UTC: the backup action selected the secondary Pod.
- 21:30:46 and 21:31:08 UTC: the backup action was denied using
kbadmin.
- 21:31:17 UTC: a separate read-only
kbadmin probe to the secondary was
still denied.
- About 12 minutes later,
kbadmin and the backup account both authenticated
successfully on the primary and secondary.
The addon references the intended generated Secret and key names. The
AllProvisioned condition currently means the account-provision lifecycle
action returned successfully; it does not verify login on every database
replica. For kbadmin, the current addon action executes select 1 on the
primary.
Steps to reproduce
- Create a fresh two-Pod MySQL
semisync cluster.
- Observe
kbadmin login on both Pod UIDs and roles from before the generated
account Secret appears.
- When the Cluster first becomes Ready, immediately create one backup.
- Record the selected backup Pod UID and continue read-only
kbadmin probes
on both roles every two seconds.
- Observe that the backup can select the secondary while
kbadmin is not yet
accepted there.
Expected behavior
A backup started after the Cluster becomes Ready should not fail because its
configured system account is not yet usable on the selected secondary.
Temporary workaround
Wait after initial cluster creation and retry the backup. This is a workaround,
not a fix. Operators should keep retries bounded and surface the final
authentication failure instead of retrying indefinitely.
Scope and open questions
- The issue is a readiness window, not evidence of permanent account damage.
- Changing the backup account to
root is not an accepted solution.
- A fresh two-second probe run will measure the first secondary recovery time,
up to 120 seconds.
- The final fix, if needed, must preserve least privilege and validate the
original kbadmin backup contract.
Describe the bug
On a newly created MySQL semisync cluster, KubeBlocks can publish the
Component system-account condition as
AllProvisionedand make the ClusterReady before
kbadminis usable on the secondary Pod.The backup policy prefers a secondary Pod and uses
kbadmin. A backup startedin this window can fail with MySQL access denied even though the same generated
Secret works on the primary and later works on the secondary.
This is tracked as a known issue. The exact readiness-window duration and the
underlying replication timing are still being measured.
Environment
semisynccb195154944dc3e0911b0b1eb6639edea033ed1bEvidence
One unchanged-code reproduction recorded this timeline:
kbadminfirst authenticated successfully on the primary.SystemAccountProvision=True, reasonAllProvisioned.kbadmin.kbadminprobe to the secondary wasstill denied.
kbadminand the backup account both authenticatedsuccessfully on the primary and secondary.
The addon references the intended generated Secret and key names. The
AllProvisionedcondition currently means the account-provision lifecycleaction returned successfully; it does not verify login on every database
replica. For
kbadmin, the current addon action executesselect 1on theprimary.
Steps to reproduce
semisynccluster.kbadminlogin on both Pod UIDs and roles from before the generatedaccount Secret appears.
kbadminprobeson both roles every two seconds.
kbadminis not yetaccepted there.
Expected behavior
A backup started after the Cluster becomes Ready should not fail because its
configured system account is not yet usable on the selected secondary.
Temporary workaround
Wait after initial cluster creation and retry the backup. This is a workaround,
not a fix. Operators should keep retries bounded and surface the final
authentication failure instead of retrying indefinitely.
Scope and open questions
rootis not an accepted solution.up to 120 seconds.
original
kbadminbackup contract.