Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional debugging #22

Merged
merged 3 commits into from
May 26, 2020
Merged

Add additional debugging #22

merged 3 commits into from
May 26, 2020

Conversation

mikemrm
Copy link
Contributor

@mikemrm mikemrm commented May 26, 2020

This should dump some additional data as seen by the tool to help with failed template renders. Below is an example of the output if no ip addresses are specified.

...
==== METADATA ====
{
  "metadata": {
...
    "network": {
...
      "addresses": []
    },
...
  },
  "network": {
...
    },
    "addresses": [],
    "resolvers": [
      "192.168.1.1"
    ]
  }
}
ERROR:root:An exception occured while processing task 'etc/sysconfig/network-scripts/ifcfg-bond0' with template:
DEVICE=bond0
NAME=bond0
{% if ip4pub %}
IPADDR={{ ip4pub.address }}

...

  File "<template>", line 10, in top-level template code
jinja2.exceptions.UndefinedError: 'None' has no attribute 'address'

mikemrm added 3 commits May 26, 2020 13:08
If specifying a local metadata file, retrying won't result in a
different result. So we should fail immediately.
@mikemrm mikemrm requested review from zevweiss and dustinmiller May 26, 2020 18:14
Copy link
Contributor

@dustinmiller dustinmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! (assuming tested)

@mikemrm mikemrm merged commit 6ed104f into master May 26, 2020
@mikemrm mikemrm deleted the add-additional-debugging branch May 26, 2020 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants