upgrade hook should get access to previous version numbers of the charm

Bug #766721 reported by Kapil Thangavelu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Expired
Wishlist
Unassigned
juju-core
Won't Fix
Medium
Unassigned
pyjuju
Triaged
Low
Unassigned

Bug Description

A suggestion mentioned during the cloud meeting, which was not implemented would be to pass to the upgrade hook which version the upgrade process is starting from. This is needed as sometimes the upgrade process depends on the starting version (example upgrade wordpress 2.9 -> 3.0 might involve a DB schema migration, while 3.0 -> 3.1 might not)

Changed in ensemble:
milestone: none → budapest
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

This is a good idea.

As a minor, it's not clear that the *new* version is necessary (the new version is always the one the script was bundled with).

Changed in ensemble:
milestone: budapest → dublin
Changed in ensemble:
milestone: dublin → none
summary: - upgrade hook should get access to previous and new versions numbers of
- the formula
+ upgrade hook should get access to previous version numbers of the charm
Changed in juju:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

<hazmat> and people do want access to at least the old charm version, which we don't currently provide
<niemeyer> hazmat: I'm concerned about introducing that
<hazmat> niemeyer, even providing just the number?
<niemeyer> hazmat: Yes
<niemeyer> hazmat: precisely because people will use the number, and people are generally bad at figuring exactly what number they should use
<niemeyer> hazmat: We should instead recommend to people that they look for facts rather than charm numbers
<niemeyer> hazmat: E.g. "Was this file on the tree?"
<niemeyer> hazmat: Very often, authors of packages think about upgrades happening from the previous version
<niemeyer> hazmat: and forget that real world users will often leap multiple versions forward

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Re: [Bug 766721] Re: upgrade hook should get access to previous version numbers of the charm

Excerpts from Kapil Thangavelu's message of Mon Jan 16 15:01:27 UTC 2012:
> <hazmat> and people do want access to at least the old charm version, which we don't currently provide
> <niemeyer> hazmat: I'm concerned about introducing that
> <hazmat> niemeyer, even providing just the number?
> <niemeyer> hazmat: Yes
> <niemeyer> hazmat: precisely because people will use the number, and people are generally bad at figuring exactly what number they should use
> <niemeyer> hazmat: We should instead recommend to people that they look for facts rather than charm numbers
> <niemeyer> hazmat: E.g. "Was this file on the tree?"
> <niemeyer> hazmat: Very often, authors of packages think about upgrades happening from the previous version
> <niemeyer> hazmat: and forget that real world users will often leap multiple versions forward
>

Ignoring the facts of the system in a maintainer script is also a bug,
but not one caused by having version numbers.

Whats helpful is having the version number so you can make some
assumptions about the user's intentions.

If I know that the version is lower than one where a permissions change
is asserted, then I can safely change the permission from what it was
in previous versions of the package to what I, the package maintainer,
suggest it should be now. So I still have to observe the facts before
making changes, but I can do it confidently.

If I don't know the previous version that I'm upgrading from, then I
have to assume that the old permissions were set explicitly by the user,
and I would have to leave them alone no matter what.

We can suggest that charms are a firmer assertion of policy than package
maintainer scripts, in which case we should be more heavy handed with
these changes and revert any user changes anyway, so I'm comfortable
with not having the version available. This is also simpler since we
will not have the luxury of a single version stream that is guaranteed
to advance like the changelog of packages.

Curtis Hovey (sinzui)
Changed in juju:
status: Confirmed → Triaged
importance: Wishlist → High
Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
Changed in juju:
importance: High → Wishlist
importance: Wishlist → Low
Changed in juju-core:
importance: High → Medium
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Re-targeting to Juju 2.x

Changed in juju:
status: New → Triaged
importance: Undecided → Wishlist
Changed in juju-core:
status: Triaged → Won't Fix
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 5 years, so we're marking it Expired. If you believe this is incorrect, please update the status.

Changed in juju:
status: Triaged → Expired
tags: added: expirebugs-bot
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.