k8s application is leaderless

Bug #1814079 reported by Stuart Bishop on 2019-01-31
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju
High
Christian Muirhead

Bug Description

Debugging a k8s charm, I see the following in my debug-log:

application-directory: 18:14:50 WARNING juju.worker.uniter.context directory/4 is not the leader but is setting application pod spec

And indeed, per 'juju status', there is no leader despite there being a single unit:

model:
  name: k8smodel
  type: caas
  controller: lxd
  cloud: microk8s
  version: 2.5.1
  model-status:
    current: available
    since: 31 Jan 2019 16:23:52+07:00
  sla: unsupported
machines: {}
applications:
  directory:
    charm: local:kubernetes/generik8s-4
    series: kubernetes
    os: kubernetes
    charm-origin: local
    charm-name: generik8s
    charm-rev: 4
    charm-version: 78cf318-dirty
    scale: 1
    provider-id: b91124d3-2545-11e9-aed7-fa163e03517a
    address: 10.152.183.34
    exposed: false
    application-status:
      current: waiting
      message: Waiting for postgres relation to complete
      since: 31 Jan 2019 18:14:51+07:00
    units:
      directory/4:
        workload-status:
          current: waiting
          message: Waiting for postgres relation to complete
          since: 31 Jan 2019 18:14:51+07:00
        juju-status:
          current: idle
          since: 31 Jan 2019 18:14:51+07:00
        open-ports:
        - 32001/TCP
        - 32002/TCP
        - 32003/TCP
        address: 10.1.1.109
        provider-id: 24035786-2549-11e9-aed7-fa163e03517a
    version: localhost:32000/directory:trunk-r107
    endpoint-bindings:
      postgres: ""
offers:
  directory-db:
    application: directory
    charm: local:kubernetes/generik8s-4
    total-connected-count: 1
    active-connected-count: 1
    endpoints:
      postgres:
        interface: pgsql
        role: requirer
storage: {}
controller:
  timestamp: 18:22:24+07:00

When this happened, the charm was calling caas_base.pod_spec_set(spec), to reconfigure the pod after the relation had completed negotiating.

Stuart Bishop (stub) on 2019-01-31
tags: added: canonical-is
Ian Booth (wallyworld) on 2019-01-31
Changed in juju:
milestone: none → 2.5.2
assignee: nobody → Christian Muirhead (2-xtian)
status: New → Triaged
importance: Undecided → High

Do you see any other failures in the log around failing to claim leadership?

On Thu, Jan 31, 2019 at 3:35 PM Stuart Bishop <email address hidden>
wrote:

> Public bug reported:
>
> Debugging a k8s charm, I see the following in my debug-log:
>
> application-directory: 18:14:50 WARNING juju.worker.uniter.context
> directory/4 is not the leader but is setting application pod spec
>
> And indeed, per 'juju status', there is no leader despite there being a
> single unit:
>
> model:
> name: k8smodel
> type: caas
> controller: lxd
> cloud: microk8s
> version: 2.5.1
> model-status:
> current: available
> since: 31 Jan 2019 16:23:52+07:00
> sla: unsupported
> machines: {}
> applications:
> directory:
> charm: local:kubernetes/generik8s-4
> series: kubernetes
> os: kubernetes
> charm-origin: local
> charm-name: generik8s
> charm-rev: 4
> charm-version: 78cf318-dirty
> scale: 1
> provider-id: b91124d3-2545-11e9-aed7-fa163e03517a
> address: 10.152.183.34
> exposed: false
> application-status:
> current: waiting
> message: Waiting for postgres relation to complete
> since: 31 Jan 2019 18:14:51+07:00
> units:
> directory/4:
> workload-status:
> current: waiting
> message: Waiting for postgres relation to complete
> since: 31 Jan 2019 18:14:51+07:00
> juju-status:
> current: idle
> since: 31 Jan 2019 18:14:51+07:00
> open-ports:
> - 32001/TCP
> - 32002/TCP
> - 32003/TCP
> address: 10.1.1.109
> provider-id: 24035786-2549-11e9-aed7-fa163e03517a
> version: localhost:32000/directory:trunk-r107
> endpoint-bindings:
> postgres: ""
> offers:
> directory-db:
> application: directory
> charm: local:kubernetes/generik8s-4
> total-connected-count: 1
> active-connected-count: 1
> endpoints:
> postgres:
> interface: pgsql
> role: requirer
> storage: {}
> controller:
> timestamp: 18:22:24+07:00
>
> When this happened, the charm was calling caas_base.pod_spec_set(spec),
> to reconfigure the pod after the relation had completed negotiating.
>
> ** Affects: juju
> Importance: Undecided
> Status: New
>
>
> ** Tags: canonical-is
>
> ** Tags added: canonical-is
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1814079
>
> Title:
> k8s application is leaderless
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1814079/+subscriptions
>

Changed in juju:
milestone: 2.5.2 → 2.5.3
Changed in juju:
milestone: 2.5.3 → 2.5.4
Changed in juju:
milestone: 2.5.4 → 2.5.5
Changed in juju:
milestone: 2.5.6 → 2.5.8
Tim Penhey (thumper) wrote :

I believe this has already been fixed in the 2.5 branch.

Changed in juju:
status: Triaged → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers