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 issue when checking guest IP of the VM with Docker installed #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jessehu
Copy link

@jessehu jessehu commented Feb 20, 2019

When docker daemon runs in the VM, there will be a NIC created by
Docker and usually has IP like 172.17.x.x. When VM is booting up,
VM Tools sometimes reports this IP to vCenter, although the real IP
of the non-docker nic will be reported later.

This patch can filter out the docker IP by specifying the prefix of
the invalid machine IP via the bootstrap option 'invalid_ip_prefix'.
e.g. invalid_ip_prefix: '172.17'.

@ticobotbot
Copy link
Collaborator

Can one of the admins verify this patch?

@jjlimepoint
Copy link

This will absolutely break my environment as is - 172.18.x.x is a valid internal IP set, not just used by docker. Please don't merge as is! :)

@jjlimepoint
Copy link

If you really do need to filter by IP, maybe add something to bootstrap options as a IP filter list, and then filter based on that - then at least it's something you have to specifically turn on, and you can choose your range.

@jessehu
Copy link
Author

jessehu commented Mar 14, 2019

Thanks @jjlimepoint. Your case "172.18.x.x" makes sense. "add something to bootstrap options as a IP filter list" is a good solution. I will update it later.

When docker daemon runs in the VM, there will be a NIC created by
Docker and usually has IP like 172.17.x.x. When VM is booting up,
VM Tools sometimes reports this IP to vCenter, although the real IP
of the non-docker nic will be reported later.

This patch can filter out the docker IP by specifying the prefix of
the invalid machine IP via the bootstrap option 'invalid_ip_prefix'.
e.g. invalid_ip_prefix: '172.17'.
@jessehu jessehu changed the title Fix issue when checking guest IP of the VM with docker running Fix issue when checking guest IP of the VM with docker installed Mar 15, 2019
@jessehu jessehu changed the title Fix issue when checking guest IP of the VM with docker installed Fix issue when checking guest IP of the VM with Docker installed Mar 15, 2019
@jessehu
Copy link
Author

jessehu commented Mar 15, 2019

Hi @jjlimepoint , I have updated the patch to use bootstrap options for the IP filter. Please take a look.

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.

3 participants