<div dir="ltr">Hi Alexander<div><br></div><div>Mininet uses a shared filesystem among all containers. As a consequence, writing to /var/log/ndn/nfd.log on container1 would conflict with writing to the same file on container2.</div><div>Mininet's <a href="https://github.com/mininet/mininet/wiki/Introduction-to-Mininet#important-shared-filesystem">private directory feature</a> creates mountpoints inside each container so that some paths are private in each host. By declaring /var/log/ndn as a private directory, /var/log/ndn on container1 and container2 will map to different physical directories, and therefore <span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">writing to /var/log/ndn/nfd.log on container1 does not conflict with writing to the same file on container2.</span><br></div><div><br></div><div>mnndn chooses to use private directories, so that NFD process inside each container can access its configuration, sockets, and logs with the default path (/usr/local/etc/ndn, /var/run, and /var/log/ndn).</div><div>mnndn also declares /root as a private directory. It has an overridden <a href="https://github.com/yoursunny/mnndn/blob/f490a83dfbfb8ee557bb3134484572f51f2da3d7/mnndn/ndn/NdnHost.py#L58">popen function</a> that sets HOME=/root, as well as "<a href="https://github.com/yoursunny/mnndn/blob/f490a83dfbfb8ee557bb3134484572f51f2da3d7/mnndn/ndn/NdnHost.py#L18">export HOME=/root</a>" command.</div><div>Generating a configuration file requires the Python experiment script to access the "real path", where mnndn <a href="https://github.com/yoursunny/mnndn/blob/f490a83dfbfb8ee557bb3134484572f51f2da3d7/mnndn/ndn/NdnHost.py#L14">declares as</a>, for example, /tmp/mnndn/container1/etc/ndn, and provides an <a href="https://github.com/yoursunny/mnndn/blob/f490a83dfbfb8ee557bb3134484572f51f2da3d7/mnndn/ndn/NdnHost.py#L29">openFile helper function</a>.</div><div><br></div><div>Mini-NDN did not adopt private directories, because Mini-NDN started as a patch of Mininet 2.1, while private directories were introduced since Mininet 2.2. If Mini-NDN don't need to support Mininet 2.1, I encourage Mini-NDN to upgrade to the better method.</div><div><br></div><div>I do not know how "cluster" works. If you are try to run containers across multiple hosts machines, you might run into problem with porting openFile helper function, but popen should work.</div><div><br></div><div>Yours, Junxiao<div class="gmail_extra"><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite">
<div><br>
<div style="margin:0px">
<span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif;color:rgb(127,127,127)"><b>From:
</b></span><span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif">Alexander Lane <<a href="mailto:awlane@memphis.edu" target="_blank">awlane@memphis.edu</a>><br>
</span></div>
<div style="margin:0px">
<span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif;color:rgb(127,127,127)"><b>Subject:
</b></span><span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif"><b>Mini-NDN/mnndn Popen?</b><br>
</span></div>
<div style="margin:0px">
<span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif;color:rgb(127,127,127)"><b>Date:
</b></span><span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif">June 6, 2018 at 9:17:16 AM CDT<br>
</span></div>
<div style="margin:0px">
<span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif;color:rgb(127,127,127)"><b>To:
</b></span><span style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif"><a href="mailto:mini-ndn@lists.cs.ucla.edu" target="_blank">mini-ndn@lists.cs.ucla.edu</a><br>
</span></div>
<br>
<br>
<div bgcolor="#FFFFFF">
<p>Sorry to bother you all, but I've encountered somewhat of a roadblock and was hoping to get some help.<br>
<br>
I recently stumbled across the <a href="https://redmine.named-data.net/issues/4078" target="_blank">
popen issue</a> and found both that the environment fix seemed to work as well as that
<a href="https://github.com/yoursunny/mnndn/blob/f490a83dfbfb8ee557bb3134484572f51f2da3d7/mnndn/ndn/NdnHost.py#L10-L15" target="_blank">
mnndn</a> has a more robust solution that can execute on clusters.<br>
<br>
While the environment fix that Ashlesh shows makes sense, I'm currently unclear on the thought process behind some of the directories Dr. Shi marks for being made private, especially /etc/ndn. As it is blocking my current work from being satisfactory completed,
 would it be possible for someone with an understanding of the code base to briefly run down what it is doing with it such that I can bring it over to Mini-NDN? I apologize if this is an overly broad request, however I want to avoid reinventing the wheel to
 fix this as it seems to be a solved problem.</p>
<p>-Alex<br>
</p>
</div>
</div></blockquote></div></div></blockquote></div><br></div></div></div>