Agent.conf upgradedToVersion field not updated on upgrade

Bug #1705112 reported by Jorge Niedbalski
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Anastasia

Bug Description

[Environment]

Xenial
Juju 2.2.2

[Description]

$ juju upgrade-juju -m controller --agent-version='2.2.2'

- Check /var/lib/juju/agents/machine-XX/agent.conf value has been set to
upgradedToVersion: 2.2.2.

- Same check for /var/lib/juju/agents/unit-*/agent.conf keeps
referring the previous release upgradedToVersion: 2.1.3

The upgrade seems successful except from this field on the agent.conf.

Tags: usability sts
summary: - Agent.conf upgradedToVersion field not updated on upgrades
+ Agent.conf upgradedToVersion field not updated on upgrade
description: updated
tags: added: sts
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1705112] Re: Agent.conf upgradedToVersion field not updated on upgrade

It sounds like you upgraded the controller but not the models. Are you
having units in the controller model? Or is this a case of needing to also
run "juju upgrade-juju -m default" (or any other model name you have
created)

John
=:->

On Jul 18, 2017 22:21, "Jorge Niedbalski" <email address hidden>
wrote:

> ** Summary changed:
>
> - Agent.conf upgradedToVersion field not updated on upgrades
> + Agent.conf upgradedToVersion field not updated on upgrade
>
> ** Description changed:
>
> [Environment]
>
> - Xenial
> + Xenial
> Juju 2.2.2
>
> [Description]
>
> -
> - $ juju upgrade-juju -m controller --agent-version='2.2.2'
> + $ juju upgrade-juju -m controller --agent-version='2.2.2'
>
> - Check /var/lib/juju/agents/machine-XX/agent.conf value has been set to
> upgradedToVersion: 2.2.2.
>
> - - Same check for /var/lib/juju/agents/unit-*/agent.conf keeps in
> + - Same check for /var/lib/juju/agents/unit-*/agent.conf keeps
> referring the previous release upgradedToVersion: 2.1.3
>
> The upgrade seems successful except from this field on the agent.conf.
>
> ** Tags added: sts
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1705112
>
> Title:
> Agent.conf upgradedToVersion field not updated on upgrade
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1705112/+subscriptions
>

Revision history for this message
Anastasia (anastasia-macmood) wrote :

@Jorge Niedbalski (niedbalski),

From John's comment, the units on "controller" model should have "upgradedToVersion: 2.2.2" after you ran "juju upgrade-juju -m controller --agent-version='2.2.2'"...

Could you please clarify whether "2.1.3" is on the units in that model or a different, possibly not-yet-upgraded, model?

Changed in juju:
status: New → Incomplete
Revision history for this message
Doug Parrish (dparrish) wrote :

@Anastasia - I opened the case which spawned this bug report.

The agent.conf for each machine agent in the model get updated with the new tools version; yet, none of the unit agents' agent.conf get updated. This occurs whether the model is 'controller' or 'default'. Also, the tools:version field of the units collection in MongoDB does indeed get updated, though with a slightly different string: "2.2.2.1-xenial-amd64" versus "2.2.2.1" in agent.conf. The upgrade-juju process appears to complete successfully.

Revision history for this message
Doug Parrish (dparrish) wrote :

This deficiency occurs in Juju 2.2.3 as well

Revision history for this message
Felipe Reyes (freyes) wrote :
Download full text (3.8 KiB)

Anastasia, here you can see how the default and controller models were upgraded from 2.1.3 to 2.2.3 and as doug previously mentioned the agent.conf was not updated

Steps:

  juju bootstrap ...
  juju deploy -n 3 cs:ubuntu
  juju upgrade-juju -m controller --agent-version=2.2.3
  juju show-model controller
  juju upgrade-juju -m default --agent-version=2.2.3
  juju show-model default

ubuntu@juju-2pt2:~$ juju ssh 0 sudo cat /var/lib/juju/agents/unit-ubuntu-0/agent.conf
# format 2.0
tag: unit-ubuntu-0
datadir: /var/lib/juju
logdir: /var/log/juju
metricsspooldir: /var/lib/juju/metricspool
nonce: unused
upgradedToVersion: 2.1.3
cacert: |
  -----BEGIN CERTIFICATE-----
  MIIDzTCCArWgAwIBAgIUJpaXcqEiOJDChdmOIoIs7/XE1zgwDQYJKoZIhvcNAQEL
  BQAwbjENMAsGA1UEChMEanVqdTEuMCwGA1UEAwwlanVqdS1nZW5lcmF0ZWQgQ0Eg
  Zm9yIG1vZGVsICJqdWp1LWNhIjEtMCsGA1UEBRMkM2UyZjk3OTQtMTQ3NC00NTZ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PDVuwJnV+ClV61t9BLIMoEJ0zJKa0C8aXPO+g3NDVJtr2lKlSYsQhiWP
  6K730jQbvqQJa+wicmBUHHw=
  -----END CERTIFICATE-----
stateaddresses:
- 10.5.1.106:37017
statepassword: +tjyRSJjYM8pZe2Nok33Gygy
controller: controller-c40c11a4-d4fa-420b-8be4-3fc6ab4c2f59
model: model-7707aaa4-39a5-4bd1-8179-70abd08201ba
apiaddresses:
- 10.5.1.106:17070
- 10.230.70.83:17070
apipassword: +tjyRSJjYM8pZe2Nok33Gygy
oldpassword: vyhsnCPIQrXJTkJwUDAlo5Q0
loggingconfig: <root>=INFO;unit=DEBUG
values:
  CONTAINER_TYPE: ""
  NAMESPACE: ""
mongoversion: "0.0"
Connection to 10.230.70.94 closed.
ubuntu@juju-2pt2:~$ juju status
Model Controller Cloud/Region Version SLA
default c2 stsstack/stsstack 2.2.3 unsupported

App Version Status Scale Charm Store Rev OS Notes
ubuntu 16.04 active 3 ubuntu jujucharms 10 ubuntu

Unit Workload Agent Machine Public address Ports Message
ubuntu/0* active idle 0 10.230.70.94 ready
ubuntu/1 active idle 1 10.230.70.95 ready
ubuntu/2 active idle 2 10.230.70.96 ready

Machine State DNS Inst id Series AZ Message
0 started 10.230.70.94 9d...

Read more...

Changed in juju:
status: Incomplete → New
Changed in juju:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Anastasia (anastasia-macmood)
tags: added: usability
Revision history for this message
Anastasia (anastasia-macmood) wrote :

PR against develop (2.3-beta2): https://github.com/juju/juju/pull/7923

Changed in juju:
status: Triaged → In Progress
Changed in juju:
milestone: none → 2.3-beta2
status: In Progress → Fix Committed
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.