Skip to content

What does an impl do with Annotations? #480

Closed

Description

@duglin

The spec defines annotations in the config.json but it doesn't anything else about them.
For example, is that info suppose to be available via a runc state id type of operation?
If that info isn't retrievable/queriable then what is it for?

Activity

  1. wking commented on Jun 1, 2016

    @wking
    Contributor

    On Wed, Jun 01, 2016 at 10:40:35AM -0700, Doug Davis wrote:

    The spec defines annotations in the config.json but it doesn't
    anything else about them.

    They are explicitly opaque (“arbitrary” 1); the runtime doesn't care
    what you do with them.

    For example, is that info suppose to be available via a runc state id type of operation?

    You can get to the original config.json using the state's bundlePath
    [2,3].

  2. duglin commented on Jun 1, 2016

    @duglin
    ContributorAuthor

    Is that the workflow people are expecting?

    Meaning: use "runc xxx" to manipulate and get the state of the container but then access the filesystem directly to retrieve the annotations/config.json?

    Would including config.json as part of the output of state() be so bad?

  3. wking commented on Jun 1, 2016

    @wking
    Contributor

    On Wed, Jun 01, 2016 at 11:00:41AM -0700, Doug Davis wrote:

    Is that the workflow people are expecting?

    Meaning: use "runc xxx" to manipulate and get the state of the
    container but then access the filesystem directly to retrieve the
    annotations/config.json?

    For more background on this approach (but in the context of mounting),
    see assorted rebuttals to my pushback in this thread 1.

    Would including config.json as part of the output of state() be so
    bad?

    My problem with including it is that the config.json entries may be
    stale by the time you find them in the state. Folks should just ask
    the kernel 2. But the kernel will not know about annotations and
    such. I don't have a problem passing config.json's annotations
    through to the state JSON 3. But what's your use-case? It may be
    better to manage your own state-like registry with this sort of
    metadata.

     Subject: Drop 'root' from state.json?
     Date: Thu, 3 Sep 2015 12:50:59 -0700
     Message-ID: <20150903195059.GF25638@odin.tremily.us>
    
  4. crosbymichael commented on Jun 1, 2016

    @crosbymichael
    Member

    Nothing. The runtimes should do nothing with annotations, that is the point of having them.

  5. duglin commented on Jun 2, 2016

    @duglin
    ContributorAuthor

    See opencontainers/runc#869 for one possible way to deal with it.

  6. crosbymichael commented on Jun 2, 2016

    @crosbymichael
    Member

    By nothing i meant no actions on the values, it can just pass them through and return them in the state.

  7. duglin commented on Jun 2, 2016

    @duglin
    ContributorAuthor

    yea, I assumed you were focused on the "no action" side of things. If people are happy with your runc PR, I think having a similar change in the spec would be good so that people have a consistent way to get this info from OCI complaint runtimes.

  8. crosbymichael commented on Jun 2, 2016

    @crosbymichael
    Member

    Ya, it would make sense to have this in the spec as a part of the state return result

  9. wking commented on Jun 2, 2016

    @wking
    Contributor

    On Thu, Jun 02, 2016 at 12:55:05PM -0700, Doug Davis wrote:

    If people are happy with your runc PR, I think having a similar
    change in the spec would be good so that people have a consistent
    way to get this info from OCI complaint runtimes.

    I explicitly suggested this (for ‘labels’) 1 and it was rejected
    2. If we want to revisit “you can look that up using bundlePath” as
    a valid reason to reject this sort of thing, I expect we'll end up
    copying the whole config over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions