Skip to content

Canonicalize the fetch stage as the only stage during which Ignition fetches configs #950

Closed

Description

@jlebon

Noticed this while examining the logs for a different reason. It looks like Ignition doesn't cache the fact that an Ignition config wasn't provided when it gets HTTP 200 with an empty body. So it ends up trying to refetch the config on each stage.

We should cache it instead (e.g. as just {} in /run/ignition.json?) and avoid spamming the metadata server.

Activity

  1. jlebon commented on Mar 27, 2020

    @jlebon
    MemberAuthor
  2. jlebon commented on Mar 27, 2020

    @jlebon
    MemberAuthor

    Also related: #903

  3. added
    jira
    on Mar 30, 2020
  4. dustymabe commented on Mar 30, 2020

    @dustymabe
    Member

    though another question to ask is should ignition try to fetch configs in multiple stages at all? It seems like there should only be one stage that ever tries to fetch and condense an ignition config for the system. All other stages use that initial stage's output (let's say it's a written local file) as their input.

  5. dustymabe commented on Mar 30, 2020

    @dustymabe
    Member

    i.e. instead of solving this problem of "Ignition shouldn't try to refetch empty configs" we restate it to "Ignition should only ever try to fetch configs in one stage".

  6. bgilbert commented on Mar 30, 2020

    @bgilbert
    Contributor

    @dustymabe I think that's fair. The current stage structure evolved over time, and now that we have a distinct fetch stage, we don't need to think of ignition.json as a cache anymore.

  7. jlebon commented on Mar 30, 2020

    @jlebon
    MemberAuthor

    Yup, agreed with the above. Keeping it to the fetch stage helps with solving the conditional networking issue as well.

  8. changed the title [-]Ignition shouldn't try to refetch empty configs[/-] [+]Canonicalize the fetch stage as the only stage during which Ignition fetches configs[/+] on Mar 30, 2020
  9. dustymabe commented on Mar 30, 2020

    @dustymabe
    Member

    Nice - it seems like we're mostly in agreement and I see @jlebon changed the title of this issue to denote the change in scope. @jlebon as part of this we should probably be able to make "detecting if a config was provided to the machine (either fetched or embedded)" easier (#903) ?

  10. jlebon commented on Apr 1, 2020

    @jlebon
    MemberAuthor

    @jlebon as part of this we should probably be able to make "detecting if a config was provided to the machine (either fetched or embedded)" easier (#903) ?

    Yeah, I think you're right in that it simplifies the "only emit a message once" bit. Though I expect this issue will mostly be about moving code around, so I told @sohankunkerkar to keep working with what he has and we can rebase changes needed for this issue on top of his work.

  11. lucab commented on Jul 29, 2020

    @lucab

    This ticket got closed, so are we now guaranteeing that "Ignition fetches the configuration only once in the fetch stage"?

  12. bgilbert commented on Jul 29, 2020

    @bgilbert
    Contributor

    Yes, 88013e5 changed the acquire logic to ensure that.

  13. arithx commented on Jul 30, 2020

    @arithx
    Contributor

    Sorry about that @lucab, in hindsight I should have updated the commit message for that commit to make it more obvious that it was now doing more than just always writing the cache config.

  14. jlebon commented on Aug 21, 2020

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

Metadata

Metadata

Assignees

Labels

jira

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions