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

Packer debug #75

Closed
wants to merge 2 commits into from
Closed

Packer debug #75

wants to merge 2 commits into from

Conversation

pix
Copy link
Contributor

@pix pix commented Sep 7, 2017

The first patch adds a debug switch to allow viewing the packer template.
The second one, adds a --profile option (since prepare_config is now aware of args) to override the selected profile in config.js

  Added a --show-packer-template debug switch to inspect what is going
  to be sent to packer.

  Useful to debug changes to templates / profiles

Signed-off-by: Camille Moncelier <camille@moncelier.fr>
Signed-off-by: Camille Moncelier <camille@moncelier.fr>
@obilodeau
Copy link
Member

--show-packer-template: I'm not fond of exposing a deep debugging option like that to the command-line.

In debug mode, malboxes will leave generated configuration files in the cache folder. That's how I check for issues. Maybe we can modify that behavior so that the generated packer.json will be shown on the command-line in debug mode instead?

--profile: I'm interested but let's see how the discussion in #77 evolves first.

@pix
Copy link
Contributor Author

pix commented Sep 8, 2017

To be honest I submitted this pull request because I spent quite some time doing tests and having a fast way to show what would the packer config looked like was useful (hence the formating using json.loads/json.dumps)

Also when a build failed, a quick --show-packer-template (since the original was deleted) was kind of useful.

Maybe this should be a hidden switch ?

As for the profile I answered in #77

@obilodeau
Copy link
Member

I'm willing to see the dump of the full json beautified config when in --debug mode but otherwise, I think either running tests or looking at cache folders should suffice. Thoughts?

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.

None yet

2 participants