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

Fix missing Init Binary in docker info output #32469

Merged
merged 1 commit into from
Apr 10, 2017

Conversation

darkowlzz
Copy link
Contributor

  • Moved DefaultInitBinary from daemon/daemon.go to
    daemon/config/config.go since it's a daemon config and is referred in
    config package files.
  • Added condition in GetInitPath to check for any explicitly configured
    DefaultInitBinary. If not, the default value of DefaultInitBinary is
    returned.
  • Changed all references of DefaultInitBinary to refer to the variable
    from new location.
  • Added TestCommonUnixGetInitPath to test for the values of
    DefaultInitBinary.

Fixes #32314

Signed-off-by: Sunny Gogoi indiasuny000@gmail.com

- What I did

Added the missing Init Binary info in docker info output.

- How I did it

Details are in commit body.

- How to verify it

Verify by running docker info and checking the value of Init Binary in the output.

- Description for the changelog

Fix missing Init Binary in docker info output.

- A picture of a cute animal (not mandatory but encouraged)

cute animal

{
config: &Config{},
expectedInitPath: "docker-init",
},
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we should have a test-case where InitPath is set as well?

Copy link
Contributor Author

@darkowlzz darkowlzz Apr 10, 2017

Choose a reason for hiding this comment

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

@thaJeztah yep, missed that out 😬

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@thaJeztah Added that too.

Copy link
Member

Choose a reason for hiding this comment

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

oh, I'm gonna be a PITA; can you add one with both InitPath and DefaultInitBinary set, so that we test that InitPath correctly overrides DefaultInitBinary?

And when you added that, can you "squash" your commits, so that there's only a single commit in this PR? 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@thaJeztah lol! that's alright 😁 Added another test-case and squashed the commits.

Copy link
Member

Choose a reason for hiding this comment

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

Perfect, thank you so much!

@darkowlzz darkowlzz force-pushed the 32314-fix-default-init-binary-value branch from 75fd141 to 5d7d2d2 Compare April 10, 2017 10:29
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 🦁
/cc @mlaventure

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

left one more question, but LGTM once that's done!

Thanks so much for picking this up!

{
config: &Config{},
expectedInitPath: "docker-init",
},
Copy link
Member

Choose a reason for hiding this comment

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

oh, I'm gonna be a PITA; can you add one with both InitPath and DefaultInitBinary set, so that we test that InitPath correctly overrides DefaultInitBinary?

And when you added that, can you "squash" your commits, so that there's only a single commit in this PR? 😅

- Moved DefaultInitBinary from daemon/daemon.go to
daemon/config/config.go since it's a daemon config and is referred in
config package files.
- Added condition in GetInitPath to check for any explicitly configured
DefaultInitBinary. If not, the default value of DefaultInitBinary is
returned.
- Changed all references of DefaultInitBinary to refer to the variable
from new location.
- Added TestCommonUnixGetInitPath to test for the various values of
GetInitPath.

Fixes moby#32314

Signed-off-by: Sunny Gogoi <indiasuny000@gmail.com>
@darkowlzz darkowlzz force-pushed the 32314-fix-default-init-binary-value branch from 5d7d2d2 to 17b1288 Compare April 10, 2017 11:26
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM (if green 😅)

Thank you!

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

Successfully merging this pull request may close these issues.

Init Binary no longer set in output of docker info
5 participants