Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Failure from hooks are not reflected on UI #1472

Open
@serhatcetinkaya

Description

@serhatcetinkaya

Hello,

Recently we had a scenario where we did a graceful master takeover, all the processes were okay except the PostMasterFailoverProcesses step. The command we had there (which is the last step to update the proxy on our end after takeover) exited with non-zero code. So, on orchestrator UI we saw everything was successful and master was replaced with new one. However since the hook command failed our proxy didn't get updated, the application kept writing to old master and we had to fix it later manually, which is okay for this case on our side.

The annoying thing is we didn't see any alerts or notifications on orchestrator UI during the master takeover operation. If we had seen an error or warning there stating the PostMasterFailoverProcesses failed we would've taken the action faster.

I checked the code a little bit, when we drag a slave in front of the master and trigger a master takeover:

in this flow the only problem I see is logic.GracefulMasterTakeover() calls executeProcesses() but doesn't check any errors returned. If we have this implemented in the code we would see an alert in the UI when post processes fail and the scenario above can be avoided easily.

If you think it makes sense, I will prepare a PR for this.

Orchestrator version: 3.1.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions