Skip to content

provide an easy way of changing leader of a certain application #585

@gabrielcocenza

Description

@gabrielcocenza

On the charm that I've been working, which is subordinate one, it would be nice to have some functional tests that check that nrpe configuration are present just in the leader unit and that this config disappears if leader unit changes. This is what I tried so far:

  1. running systemctl stop jujud-machine- on the leader unit by using zaza.model.run_on_unit with a timeout. When I do that some weird behaviors happen:
  • timeout is not respected and the command hangs forever. Probably this is due python libjuju depending on jujud-machine being up and running.
  1. deleting a unit. Because it's a subordinate charm it's not possible doing that. All subordinates charms would be destroyed if the relation with the principal is removed.

I guess if zaza provides an easy way of changing leader of an application, that could be useful and helpful for a lot of functional tests on charms.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions