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

Bridged network setup fails on arping check step on Alpine Linux #15

Closed
geostarling opened this issue Jun 19, 2018 · 2 comments

Comments

@geostarling
Copy link
Contributor

commented Jun 19, 2018

While trying to setup bridged network on Alpine Linux v3.7, the initialization procedure setup_network fails while checking interface avalibility with arping on the following error:

Fatal error running "container/container.0": arping failed: exited with code 1

Full log of the container attache below:

[2018-06-19T11:46:53Z][DEBUG]src/mount.rs:148: Making private "/"
[2018-06-19T11:46:53Z][DEBUG]src/mount.rs:132: Remount readonly: "/run/lithos/mnt"
[2018-06-19T11:46:53Z][INFO] [container/container.0] Starting container
[2018-06-19T11:46:53Z][DEBUG]src/bin/lithos_knot/setup_network.rs:106: Running "ip" "link" "add" "li_ca02f9_0001" "type" "veth" "peer" "name" "li-ca02f9-0001"
[2018-06-19T11:46:53Z][DEBUG]src/bin/lithos_knot/setup_network.rs:119: Running "ip" "link" "set" "dev" "li_ca02f9_0001" "netns" "/proc/28231/fd/6"
[2018-06-19T11:46:53Z][DEBUG]src/bin/lithos_knot/setup_network.rs:131: Running "brctl" "addif" "br0" "li_ca02f9_0001"
[2018-06-19T11:46:53Z][DEBUG]src/bin/lithos_knot/setup_network.rs:142: Running "ip" "link" "set" "li_ca02f9_0001" "up"
[2018-06-19T11:46:53Z][DEBUG]src/bin/lithos_knot/setup_network.rs:155: Running "ip" "link" "set" "lo" "up"
[2018-06-19T11:46:53Z][DEBUG]src/bin/lithos_knot/setup_network.rs:168: Running "ip" "addr" "add" "10.0.0.1/24" "dev" "li-ca02f9-0001"
[2018-06-19T11:46:53Z][DEBUG]src/bin/lithos_knot/setup_network.rs:179: Running "ip" "link" "set" "li-ca02f9-0001" "up"
[2018-06-19T11:46:53Z][DEBUG]src/bin/lithos_knot/setup_network.rs:191: Running "ip" "route" "add" "default" "via" "10.0.0.1"
[2018-06-19T11:46:53Z][DEBUG]src/bin/lithos_knot/setup_network.rs:203: Running "arping" "-U" "10.0.0.1" "-c1"
[2018-06-19T11:46:53Z][ERROR] Fatal error running "container/container.0": arping failed: exited with code 1

If lithos_tree process is run with strace as follows, it gives us an indication why is this happening:

$ strace -f /usr/bin/lithos_tree
... unrelated output ommited ...

[pid 32223] execve("/usr/bin/arping", ["/usr/bin/arping", "-U", "10.0.0.1", "-c1"], 0x55d76cb2d0a0 /* 1 var */) = 0

... unrelated output ommited ...

[pid 32223] writev(2, [{iov_base="", iov_len=0}, {iov_base="arping: Too many args on command"..., iov_len=61}], 2arping: Too many args on command line. Expected at most one.
) = 61
[pid 32223] exit_group(1)               = ?
[pid 32223] +++ exited with 1 +++

The lithos configurations used are:

master config:

log_level: debug
devfs-dir: /dev

sandbox config:

allow-users: [0, 1, 100]
allow-groups: [0, 101]
image-dir: /var/lib/lithos/images
writable-paths:
  /var/log/container: /data
  /var/lib/container: /log
bridged-network:
  bridge: br0
  network: 10.0.0.0/24
  default_gateway: 10.0.0.1

process config:

container:
  image: container
  config: /config/container.yaml
  ip-addresses: [10.0.0.1]

It turns out that Alpine uses distribution of arping (specifically this one by Thomas Habets) which is more strict with regards to argument order validation than arping distributions that are available in other (more mainstream) Linux distros (there it is usually provided by iputils package).

Simple reordering of arguments is sufficient to get it to work on both implementations of arping (I have tested only on Fedora and Alpine).

@geostarling

This comment has been minimized.

Copy link
Contributor Author

commented Jun 19, 2018

PR attached #16

@tailhook tailhook closed this in #16 Jun 19, 2018

@tailhook

This comment has been minimized.

Copy link
Owner

commented Jun 19, 2018

Merged your PR and released in v0.17.8. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.