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

Filter docker devices to add_hosts() #200

Open
sebastianeferrer opened this issue Feb 9, 2022 · 5 comments
Open

Filter docker devices to add_hosts() #200

sebastianeferrer opened this issue Feb 9, 2022 · 5 comments
Labels

Comments

@sebastianeferrer
Copy link

sebastianeferrer commented Feb 9, 2022

I have a conflict between docker and comitup.
First approach was to implement comitup callback depending on connection state to stop the docker container that was bodering.
Then I found that I needed my docker container running without interruption in case wifi fails so I was trying to figure out what is the function that makes comitup have a conflict with the docker interfaces.

Digging a bit inside the logs in debug mode I found out add_hosts() function trying to add this unwanted docker interfaces.

def add_hosts(hosts: List[str]) -> None:
    establish_group()
    int_mapping = get_interface_mapping()

    devices: Optional[List["NetworkManager.Device"]] = nm.get_devices()

I think that may be replacion nm.get_devices() with nm.get_wifi_devices(), the issue will be solver. Am I in the wrong way or is this correct way?

I really appreciate all the hard work you have done for this proyect and I thank to you!

@davesteele
Copy link
Owner

If the issue involves networking, I suspect the solution follows along the lines of this.

@sebastianeferrer
Copy link
Author

Sorry Dave, I'd posted this issue by mistake, but now I'm editing first comment to explain what it came about. It's about conflict between docker and comitup.

@sebastianeferrer sebastianeferrer changed the title docker Filter docker devices to add_hosts() Feb 15, 2022
@davesteele
Copy link
Owner

Good work.

The add_hosts() function is getting a list of network devices for publishing ZeroConf services and mdns records - it needs to list both wired and wireless devices. I can believe that it could have some heartache with devices created by Docker.

I suspect a new function (get_network_endpoints()?) that filters a la get_wifi_devices() to provide a list of "useful" devices.

@davesteele
Copy link
Owner

Note that Comitup also takes action on loss of a wifi connection.

@sebastianeferrer
Copy link
Author

I will try to play with this that you pointed out and I will back with the results. Thanks again for the fast reponse! You are the best!

@davesteele davesteele added the bug label Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants