Bootstrap: --agent-version not working with k8s controllers.

Bug #1887549 reported by David
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
David

Bug Description

I execute:

juju bootstrap microk8s --agent-version="2.8.0"

And I get a controller with version 2.8.1

Snap version:
$ juju version
2.8.1-focal-amd64

Tags: k8s
Revision history for this message
Heather Lanigan (hmlanigan) wrote :

Verified. Does not occur with non k8s cloud.

tags: added: k8s
Changed in juju:
status: New → Triaged
Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.8-next
importance: Undecided → High
Revision history for this message
David (davigar15) wrote :

I provided this patch which seemed to work locally for me:
https://github.com/juju/juju/pull/12094

I installed juju from the 2.8/edge channel, and I'm seeing this issue:

$ juju bootstrap microk8s pinned2 --agent-version 2.8.1
Creating Juju controller "pinned2" on microk8s/localhost
Fetching Juju Dashboard 0.3.0
Creating k8s resources for controller "controller-pinned2"
Downloading images
...

$ microk8s.kubectl -n controller-pinned2 describe pods controller-0
...
...
Events:
  Type Reason Age From Message
  ---- ------ ---- ---- -------
  Warning FailedScheduling 2m43s (x2 over 2m43s) default-scheduler 0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims.
  Normal Scheduled 2m41s default-scheduler Successfully assigned controller-pinned2/controller-0 to davigar15
  Warning Failed 2m28s (x3 over 2m37s) kubelet Error: ImagePullBackOff
  Normal Pulled 2m13s (x3 over 2m40s) kubelet Container image "jujusolutions/juju-db:4.0" already present on machine
  Normal Created 2m13s (x3 over 2m40s) kubelet Created container mongodb
  Normal Started 2m13s (x3 over 2m40s) kubelet Started container mongodb
  Normal Pulling 2m13s (x2 over 2m40s) kubelet Pulling image "jujusolutions/jujud-operator:2.8.1.372"
  Warning Failed 2m11s (x2 over 2m38s) kubelet Failed to pull image "jujusolutions/jujud-operator:2.8.1.372": rpc error: code = NotFound desc = failed to pull and unpack image "docker.io/jujusolutions/jujud-operator:2.8.1.372": failed to resolve reference "docker.io/jujusolutions/jujud-operator:2.8.1.372": docker.io/jujusolutions/jujud-operator:2.8.1.372: not found
  Warning Failed 2m11s (x2 over 2m38s) kubelet Error: ErrImagePull
  Warning BackOff 2m10s (x3 over 2m36s) kubelet Back-off restarting failed container
  Normal BackOff 2m10s (x4 over 2m37s) kubelet Back-off pulling image "jujusolutions/jujud-operator:2.8.1.372"

The agentVersion is alright, 2.8.1, but the fourth number is related to the current version of the snap: https://hub.docker.com/layers/jujusolutions/jujud-operator/2.8.6.372/images/sha256-deafc9fcd2cb24ed885e5206e68e9ceb8aaf61340d098c917be1b328d4bb349b?context=explore

So I would say it needs some more fixing

Revision history for this message
David (davigar15) wrote :

https://github.com/juju/juju/blob/develop/environs/bootstrap/bootstrap.go#L287

^ It might be related to that. Don't know how to get the official build number of an specified agent-version.

Revision history for this message
David (davigar15) wrote :

Ian Booth says this will work when it is released because the buildNumber for the official releases is always "0"

Ian Booth (wallyworld)
Changed in juju:
milestone: 2.8-next → 2.8.7
status: Triaged → Fix Committed
assignee: nobody → David (davigar15)
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.