[Devel] Re: Problem: Device or resource busy
Quoting Jerf gefera (jgef...@gmail.com): > Dear serge, > You are right, I am using the checkpoint_self.c in Documentation/checkpoint > dir. > Now, I am using the self_checkpoint in user-cr, but it still has some > errors: > some content in image file: > "f_op lacks checkpoi...@^o'^...@^@^...@^@^...@^d^@^...@^@<^...@^@^...@^@pid > 4375 ts > k self_checkpoint err -9]: files_struct" > In fact, when checkpoint externally, it also has the error message mentioned > above. > I traced there is an error in freezer_checkpointing(external checkpointing), > can you point out me where might be wrong? > Jefera As Matt asked in another thread, are you still using v19? v21 should iirc tell you the name of the file causing the trouble. If v21 is not an option, then pls modify your external checkpoint script to keep the task frozen, then look at the contents of /proc/pid/fd and /proc/pid/fdinfo for the checkpointed pid. Something like pid=$1 touch outout /bin/ls /proc/$pid/fd >> outout /bin/ls /proc/$pid/fdinfo >> outout for f in `/bin/ls /proc/$pid/fdinfo`; do echo "/proc/$pid/fdinfo/$f:" >> outout /bin/ls /proc/$pid/fdinfo/$f >> outout done for f in `/bin/ls /proc/$pid/fd`; do echo "/proc/$pid/fd/$f:" >> outout stat /proc/$pid/fd/$f >> outout done Really, I'm assuming that the problem is either an inherited open fd to your pty, or an inherited nscd socket. But let's see. -serge ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers ___ Devel mailing list Devel@openvz.org https://openvz.org/mailman/listinfo/devel
[Devel] Re: VRF-like use of Network Namespaces
On 06/11/2010 04:47 PM, Mathieu Peresse wrote: > Hi, > > [this is related to the use of Eric Biederman's new set of patches for named > netns / netns switching] > > ok so I successfully modified /sbin/ip. I can now: > - add/del a new netns by name: "ip netns {addns,delns} ns_name" > -> The namespace files are mounted on /var/run/netns/ns_name (so you have to > mkdir /var/run/netns/ for this to work). > IMHO, the ip command is not suitable for this, it does not write anything to the fs. You should write you own command, which can be a perl script using the 'unshare' command (util-linux package on my distro). vrf create vrf delete vrf attach vrf list vrf create will bind mount the ns at the place you decided in the script (eg. a tmpfs in order to keep the directory consistent across (unclean) reboots). > - list netns: "ip netns show" > - use /sbin/ip in any named netns: "ip -netns ns_name link show" > > (rough patch against current git tree attached) > > I want now to move devices across namespaces using their filesystem names > (instead of using PIDs...). I'm not sure I can do it in userspace with the > current code yet, can I ? > No, you can do that only with pids, but why don't you move the devices at the create time ? You have all the latitude to do that, no ? > I saw there was a rtnetlink attribute to set the netns of a device but it > uses the PID of a namespace owner to do so... within 'ip' i can refer to > only one namespace (i.e. the one that 'ip' task_struct->ns_proxy currently > points to), so I won't be able to move an interface from outside my > namespace to my namespace... > I hope my explanation is clear and that this will get some interest... :) > Your 'create' command can open a fd to its current netns, unshare a new namespace, bind mount it, and then return to the previously saved netns. > BTW is this the right ML to post this on ? > Well, this is something related to a subsystem of the containers, so it has some interest but I would suggest to send to the netdev@ mailing list (net...@vger.kernel.org), maybe cc'ing this mailing list. ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers ___ Devel mailing list Devel@openvz.org https://openvz.org/mailman/listinfo/devel
[Devel] Re: VRF-like use of Network Namespaces
MP> I saw there was a rtnetlink attribute to set the netns of a device but it MP> uses the PID of a namespace owner to do so... within 'ip' i can refer to MP> only one namespace (i.e. the one that 'ip' task_struct->ns_proxy currently MP> points to), so I won't be able to move an interface from outside my MP> namespace to my namespace... Not just the owner, but any process in the namespace, AFAIK. So, you should be able to fork() a child, have that child setns() into the namespace of your choosing, and then move the device to the process of your child (since you now know the pid). It's a little indirect, but it should work. -- Dan Smith IBM Linux Technology Center email: da...@us.ibm.com ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers ___ Devel mailing list Devel@openvz.org https://openvz.org/mailman/listinfo/devel