Cannot use open-iscsi inside LXC container
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Wishlist
|
Unassigned | ||
lxc (Ubuntu) |
Invalid
|
Wishlist
|
Unassigned |
Bug Description
Trying to use open-iscsi from within an LXC container, but the iscsi netlink socket does not support multiple namespaces, causing: "iscsid: sendmsg: bug? ctrl_fd 6" error and failure.
Command attempted: iscsiadm -m node -p $ip:$port -T $target --login
Results in:
Exit code: 18
Stdout: 'Logging in to [iface: default, target: $target, portal: $ip,$port] (multiple)'
Stderr: 'iscsiadm: got read error (0/0), daemon died?
iscsiadm: Could not login to [iface: default, target: $target, portal: $ip,$port].
iscsiadm: initiator reported error (18 - could not communicate to iscsid)
iscsiadm: Could not log into all portals'
ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: lxc 0.9.0-0ubuntu3.4
ProcVersionSign
Uname: Linux 3.8.0-30-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.3
Architecture: amd64
Date: Tue Sep 17 14:38:08 2013
InstallationDate: Installed on 2013-01-15 (245 days ago)
InstallationMedia: Xubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.1)
MarkForUpload: True
SourcePackage: lxc
UpgradeStatus: Upgraded to raring on 2013-05-16 (124 days ago)
Changed in lxc (Ubuntu): | |
status: | Incomplete → New |
Changed in lxc (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in lxc (Ubuntu): | |
importance: | Undecided → Wishlist |
Changed in linux (Ubuntu): | |
importance: | Undecided → Wishlist |
Thanks for reporting this bug.
Your example command says '$ip:$port'. Is the iscsid running on the host
or in the container? Is $ip the ip of the host?
If $ip is the host ip and you just want iscsiadm in the guest to talk to iscsid on the
host, that should work.
There are several ways depending on your configuration where netlink sockets
might be being attempted. Could you show strace -f output to show exactly
which fails? (iscsiadm itself should only fail if you're trying offload, which it
doesn't look like you are)
Netlink sockets are per-netns, so if you want to be able to connect to a
netlink socket from another netns, then something will need to open a
socket from the target netns and pass that into the other ns. (This
could be arranged with setns, but only from the host).