-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
WIP: Basic support for -connection-info flag #6863
Conversation
Example output:
The lines that appear because of
(I'll change the last two lines to be |
@azr @SwampDragons It would be great if you could have some input on this before I proceed. Especially the naming of the flags etc. |
@@ -293,7 +293,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe | |||
state := new(multistep.BasicStateBag) | |||
state.Put("cache", cache) | |||
state.Put("config", &b.config) | |||
state.Put("debug", b.config.PackerDebug) | |||
state.Put("debug", b.config.PackerDebug) // TODO rickard remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commenting on TODO so that we don't forget, just resolve me !
command/build.go
Outdated
var cfgOnError string | ||
flags := c.Meta.FlagSet("build", FlagSetBuildFilter|FlagSetVars) | ||
flags.Usage = func() { c.Ui.Say(c.Help()) } | ||
flags.BoolVar(&cfgColor, "color", true, "") | ||
flags.BoolVar(&cfgDebug, "debug", false, "") | ||
flags.BoolVar(&cfgConnInfo, "connection-info", false, "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find connection-info
a bit vague, it could also mean "show connection-info of provider".
Alternative names in order of preference:
--show-communication-credentials
--show-communicator-credentials
--communication-credentials
--communicator-credentials
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think communication-credentials
includes all the things this does, it also prints IPs ports etc. Maybe something like --communication-details
? It be awesome if this was a bit shorter since this will probably most used by humans troubleshooting and developing builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree 🙂 may be: comm-credentials
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a side note; it also feels with comm-credentials
that I could pass a parameter:
packer build --com-credentials login=azr,pass=s3cure file.json
LGTM otherwise 🙂 |
After we have decided on the UX, I'll work through both communicators and all builders to output relevant details. So this will take some more time.. |
If the purpose is debugging, why not |
Hmm that's not so bad. |
haha I aspire to be "not so bad". The reality is, I trust you and don't want to bikeshed this too hard. I'm in favor of making the |
@rickard-von-essen are you still waiting for an explicit 👍 from us or are you just busy with other things? I like the direction this was going and still find myself leaning towards |
Just got other thinks needed to handled. I'll go with |
This adds the -connection-info flag to the build command causing all relevant connection information (IPs, username, passwords, temporary keys, etc) to be printed out for troubleshooting. Currently only supports amazon-ebs
e6f0fac
to
6c6db9a
Compare
Any possibility to get this included for next couple of versions? |
I won't have any time to work on this for at lest a month. Maybe someone else would like to pick it up? |
looking back at this issue, I think printing the info from inside of the step_connect may make more sense; that way we can implement it for basically all our builders at once since it's a common step. |
That sounds like a big simplification!
…On Tue, Oct 1, 2019, 22:16 Megan Marsh ***@***.***> wrote:
looking back at this issue, I think printing the info from inside of the
step_connect may make more sense; that way we can implement it for
basically all our builders at once since it's a common step.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6863?email_source=notifications&email_token=AAEIFA3PVEFMK4PMWQ5YCYLQMOV3FA5CNFSM4F4F23B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEACS4EY#issuecomment-537210387>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEIFAZJTNTCXTU2AFFS3CLQMOV3FANCNFSM4F4F23BQ>
.
|
Closing since this has gone stale; we can reopen if you ever get the bug to finish it up. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This adds the -connection-info flag to the build command causing all
relevant connection information (IPs, username, passwords, temporary
keys, etc) to be printed out for troubleshooting.
Currently only supports amazon-ebs
Closes #5107