Skip to content
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

Implements switchover API (est: 2) #664

Closed
rosik opened this issue Mar 18, 2020 · 0 comments · Fixed by #679
Closed

Implements switchover API (est: 2) #664

rosik opened this issue Mar 18, 2020 · 0 comments · Fixed by #679
Assignees

Comments

@rosik
Copy link
Contributor

rosik commented Mar 18, 2020

Follow-up for #604 (#148): we need some API to switch leader manually.

The handler can be called from any instance in cluster. It's objective is to query active coordinator from external storage and propagate manual decision.

@rosik rosik added this to the 2.1.0 (stateful failover) milestone Mar 18, 2020
@rosik rosik mentioned this issue Mar 23, 2020
@rosik rosik changed the title Implements switchover API Implements switchover API (est: 2) Mar 24, 2020
@olegrok olegrok self-assigned this Mar 24, 2020
olegrok added a commit that referenced this issue Mar 24, 2020
The following API introduced:

  - cartridge.lua-api.failover.promote({[replicaset_uuid] = leader_uuid, ...})
  - cartridge.failover_promote({[replicaset_uuid] = leader_uuid, ...})

GraphQL:
```graphql
mutation(
    $replicaset_uuid: String!
    $instance_uuid: String!) {
       cluster {
          failover_promote(
              replicaset_uuid: $replicaset_uuid
              instance_uuid: $instance_uuid
          ) {}
    }
}
```

Closes #664
@olegrok olegrok mentioned this issue Mar 24, 2020
3 tasks
olegrok added a commit that referenced this issue Mar 24, 2020
The following API introduced:

  - cartridge.lua-api.failover.promote({[replicaset_uuid] = leader_uuid, ...})
  - cartridge.failover_promote({[replicaset_uuid] = leader_uuid, ...})

GraphQL:
```graphql
mutation(
    $replicaset_uuid: String!
    $instance_uuid: String!) {
       cluster {
          failover_promote(
              replicaset_uuid: $replicaset_uuid
              instance_uuid: $instance_uuid
          ) {}
    }
}
```

Closes #664
olegrok added a commit that referenced this issue Mar 24, 2020
The following API introduced:

  - cartridge.lua-api.failover.promote({[replicaset_uuid] = leader_uuid, ...})
  - cartridge.failover_promote({[replicaset_uuid] = leader_uuid, ...})

GraphQL:
```graphql
mutation(
    $replicaset_uuid: String!
    $instance_uuid: String!) {
       cluster {
          failover_promote(
              replicaset_uuid: $replicaset_uuid
              instance_uuid: $instance_uuid
          ) {}
    }
}
```

Closes #664
olegrok added a commit that referenced this issue Mar 24, 2020
The following API introduced:

  - cartridge.lua-api.failover.promote({[replicaset_uuid] = leader_uuid, ...})
  - cartridge.failover_promote({[replicaset_uuid] = leader_uuid, ...})

GraphQL:
```graphql
mutation(
    $replicaset_uuid: String!
    $instance_uuid: String!) {
       cluster {
          failover_promote(
              replicaset_uuid: $replicaset_uuid
              instance_uuid: $instance_uuid
          ) {}
    }
}
```

Closes #664
olegrok added a commit that referenced this issue Mar 25, 2020
The following API introduced (works only with stateful failover):

  - cartridge.lua-api.failover.promote({[replicaset_uuid] = leader_uuid, ...})
  - cartridge.failover_promote({[replicaset_uuid] = leader_uuid, ...})

GraphQL:
```graphql
mutation(
    $replicaset_uuid: String!
    $instance_uuid: String!) {
       cluster {
          failover_promote(
              replicaset_uuid: $replicaset_uuid
              instance_uuid: $instance_uuid
          ) {}
    }
}
```

Closes #664
rosik pushed a commit that referenced this issue Mar 25, 2020
The following API introduced (works only with stateful failover):

Lua:

```lua
cartridge.failover_promote({[replicaset_uuid] = leader_uuid, ...})
```

GraphQL:

```graphql
mutation {
  cluster {
    failover_promote(
      replicaset_uuid: ...
      instance_uuid: ...
    )
  }
}
```

Close #664
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants