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

Include weave exposed addresses in ps output #558

Merged
merged 1 commit into from Apr 15, 2015

Conversation

awh
Copy link
Contributor

@awh awh commented Apr 14, 2015

Fixes #385. Sample output:

$ sudo ./weave ps
e8f979801cd7 ae:50:e8:95:f6:03 10.0.0.1/24
2e25b47b08fe 6a:95:45:20:14:56
weave 7a:c4:8b:a1:e6:ad 10.0.0.2/24

The final entry uses $BRIDGE in place of the container name, for lack of anything better - thoughts @rade @bboreham ?

@rade
Copy link
Member

rade commented Apr 14, 2015

$BRIDGE is fine.

Docs?

@bboreham
Copy link
Contributor

Doesn't "weave" clash with what you get from weave ps weave ?

@awh
Copy link
Contributor Author

awh commented Apr 14, 2015

Doesn't "weave" clash with what you get from weave ps weave ?

Very much so - well spotted. Container names are restricted to these characters

https://github.com/ajhager/docker/blob/master/runtime.go#L35

though so the literal string weave:expose is neither a valid container name nor identifier, and is exactly twelve characters long so the output remains nicely formatted:

$ sudo ./weave ps
e8f979801cd7 ae:50:e8:95:f6:03 10.0.0.1/24
2e25b47b08fe 6a:95:45:20:14:56
weave:expose 7a:c4:8b:a1:e6:ad 10.0.0.2/24

@awh awh force-pushed the weave_ps_includes_exposed_addresses branch from 1829f4c to cbc25bd Compare April 14, 2015 14:53
@awh
Copy link
Contributor Author

awh commented Apr 14, 2015

Amended the commit to use weave:expose, restore filtering and update documentation.

for CONTAINER_ID in $CONTAINERS ; do
if CONTAINER_ADDRS=$(with_container_netns $CONTAINER_ID container_weave_addrs 2>&1) ; then
if [ "$CONTAINER_ID" == "weave:expose" ]; then

This comment was marked as abuse.

This comment was marked as abuse.

@rade rade assigned awh and rade and unassigned awh and rade Apr 14, 2015
@awh awh force-pushed the weave_ps_includes_exposed_addresses branch from cbc25bd to cbbe3cc Compare April 15, 2015 10:54
@awh awh assigned rade and unassigned awh Apr 15, 2015
rade added a commit that referenced this pull request Apr 15, 2015
Include weave exposed addresses in ps output

Closes #385.
@rade rade merged commit 2eb13f0 into weaveworks:master Apr 15, 2015
@rade rade modified the milestone: 0.10.0 Apr 18, 2015
@awh awh deleted the weave_ps_includes_exposed_addresses branch April 28, 2015 14:17
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.

list weave exposed addresses
3 participants