Comment 2 for bug 1762069

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1762069] [NEW] charms should be able to expose version information about themselves (e.g. in juju status)

For example, we could produce the hash of the charm contents, as a way to
define "identity". However, that wouldn't give you nice
human-understandable identifiers. And any other identifier that would be
human-readable would probably require some sort of process to make sure it
gets updated when it needs to (I changed the charm content, did you bump
the version number?) so that you can trust it accurately represents what
you want.

The short-term thing that supports most of it would be charm-config that
defines whatever you want, which you can then update with "juju config app
charm-identiifer=X" and read with "juju config app charm-identifier".
But very much there is a lot of potential failure modes where it doesn't
get set when it needs to, and thus is stale and not reliable.
Having the charm be able to report something could also be done simply as a
standard action "juju run --application=app charm-identify"

There would still need to be some sort of charm build process that would
produce an identifier for the built charm (that is about to be deployed)
that would be stable and repeatable and trustable.

We can certainly start exposing something in status, but until we've worked
out what would be put there, it seems better to iterate on some of these
other mechanisms that don't require Juju changes.

On Mon, Apr 9, 2018 at 8:37 AM, John Meinel <email address hidden> wrote:

> They currently do have a way to expose payload versions (I'm running
> "postgres 9.1.2" for xenial/postgreqsl-25)
>
> Is that sufficient, or is that confusing the "version of the charm" with
> the "version of the payload". Given your comment about "Openstack Charm"
> what are you looking to expose "I would support Mitaka if you wanted it,
> even though you're only running Liberty".
>
>
>
> On Sun, Apr 8, 2018 at 1:02 AM, James Troup <email address hidden>
> wrote:
>
>> Public bug reported:
>>
>> Charms should be able to expose version information about themselves to
>> users. This would trivially allow one to know what version of the
>> OpenStack charms one is using for example.
>>
>> (I know there's a 'charm' and 'charm-rev' field already in juju status
>> but these aren't helpful in identifying the version of the charms.)
>>
>> ** Affects: juju
>> Importance: Undecided
>> Status: New
>>
>> --
>> You received this bug notification because you are subscribed to juju.
>> Matching subscriptions: juju bugs
>> https://bugs.launchpad.net/bugs/1762069
>>
>> Title:
>> charms should be able to expose version information about themselves
>> (e.g. in juju status)
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/juju/+bug/1762069/+subscriptions
>>
>
>