https://redmine.named-data.net/https://redmine.named-data.net/favicon.ico?14759811232014-05-12T10:19:49ZNDN project issue tracking systemNFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=28462014-05-12T10:19:49ZDavide Pesavento
<ul></ul><p>A unit file (nfd.service) should be enough, no scripts should be needed. Optionally we can (should) support on-demand socket-based activation, at least for the unix stream socket.</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=28472014-05-12T10:23:33ZAlex Afanasyev
<ul></ul><p>yes. <code>nfd.service</code> could be enough (may be nrd.service too, unless systemd cannot monitor two processes for the same service). I just don't know anything about it, so don't know exactly how to work with it. Are you familiar with it and can write a sample/readme?</p>
<p>I wouldn't go with ondemand approach. It is possible (even with upstart and launchd), but it is not entirely correct for us.</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=28492014-05-12T10:32:45ZDavide Pesavento
<ul></ul><p>Alex Afanasyev wrote:</p>
<blockquote>
<p>yes. <code>nfd.service</code> could be enough (may be nrd.service too, unless systemd cannot monitor two processes for the same service). I just don't know anything about it, so don't know exactly how to work with it. Are you familiar with it and can write a sample/readme?</p>
</blockquote>
<p>Sure, I can do it.</p>
<blockquote>
<p>I wouldn't go with ondemand approach. It is possible (even with upstart and launchd), but it is not entirely correct for us.</p>
</blockquote>
<p>Why not? It actually makes a lot of sense for the local socket...</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=28502014-05-12T11:15:28ZAlex Afanasyev
<ul></ul><p>When an application connects to the socket, there is an assumption that someone already created faces, created correct routes so packet can be routed somewhere. So, it doesn't make much sense in starting nfd/nrd when an app tries to connect.</p>
<p>This is different from ssh/apache/etc. deamons, which are triggered by remote connection, do some local job, and after that they are useless. nfd is more like kernel's IP stack: it runs, somebody manages it with command interest, packets gets forwarded, etc.</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=28732014-05-13T18:46:43ZAlex Afanasyev
<ul><li><strong>Assignee</strong> set to <i>Davide Pesavento</i></li></ul> NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=35042014-06-26T17:41:35ZJunxiao Shi
<ul><li><strong>Target version</strong> changed from <i>v0.2</i> to <i>Unsupported</i></li><li><strong>Start date</strong> deleted (<del><i>05/09/2014</i></del>)</li></ul><p>20140626 conference call decides to make this "unsupported", because <code>systemd</code> is used on Debian and RedHat, which are unsupported platforms.</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=89232015-03-06T09:49:26ZDavide Pesavento
<ul><li><strong>Assignee</strong> deleted (<del><i>Davide Pesavento</i></del>)</li><li><strong>Target version</strong> changed from <i>Unsupported</i> to <i>v0.4</i></li></ul><p><a href="https://lists.ubuntu.com/archives/ubuntu-devel-announce/2015-March/001130.html">https://lists.ubuntu.com/archives/ubuntu-devel-announce/2015-March/001130.html</a></p>
<p>Ubuntu is switching to systemd very soon, and the 15.04 release will likely boot with systemd by default.</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=99112015-05-12T23:53:35ZAlex Afanasyev
<ul></ul><p>So, 15.04 has switched to systemd and our PPA package no longer provides automatic start of nfd.</p>
<p>@Davide: Can you help creating systemd script that can be included in PPA?</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=99122015-05-12T23:53:43ZAlex Afanasyev
<ul><li><strong>Priority</strong> changed from <i>Normal</i> to <i>High</i></li></ul> NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=99142015-05-13T00:35:02ZEric Newberryenewberry@cs.ucla.edu
<ul></ul><p>I can work on this if needed.</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=99182015-05-13T05:41:47ZDavide Pesavento
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Code review</i></li><li><strong>Assignee</strong> set to <i>Eric Newberry</i></li></ul> NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=99232015-05-13T10:44:59ZAlex Afanasyev
<ul><li><strong>Blocks</strong> <i><a class="issue tracker-3 status-5 priority-2 priority-default closed" href="/issues/2810">Task #2810</a>: PPA: use systemd startup scripts for daemons</i> added</li></ul> NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=99262015-05-13T11:13:12ZDavide Pesavento
<ul><li><strong>Subject</strong> changed from <i>contrib: Add instructions/scripts on how to start/stop nfd with systemd</i> to <i>contrib: Add unit file(s) and instructions for systemd</i></li></ul> NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=99572015-05-15T15:30:25ZAlex Afanasyev
<ul></ul><p>From gerrit issue discussions:</p>
<p>Alex: Do you have any idea where systemd stores its journal on Ubuntu. I figured out that I can access nfd's logs (current logs) using journalctrl command, but I couldn't figure out where this information stored or whether or not this information is stored permanently (i.e., how to debug problems)</p>
<p>Eric: By default Ubuntu stores the journal in /run/log/journal. However, this is a temporary filesystem and is lost upon reboot.</p>
<p>Alex: is there a good way to make it "permanent"</p>
<p>Eric: This can be done by creating the /var/log/journal directory</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=99582015-05-15T15:31:52ZAlex Afanasyev
<ul></ul><p>So, just creating /var/log/journal folder and everything will work automatically? Or anything else to configure? What about log rotation, will this be handled automatically?</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=99592015-05-15T15:31:59ZAlex Afanasyev
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul> NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=99602015-05-15T15:35:15ZEric Newberryenewberry@cs.ucla.edu
<ul></ul><p>That's what the documentation says.</p>
<p>Rotation and other options can be configured in /etc/systemd/journald.conf:</p>
<p><a href="http://www.freedesktop.org/software/systemd/man/journald.conf.html">http://www.freedesktop.org/software/systemd/man/journald.conf.html</a></p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=99612015-05-15T15:59:22ZAlex Afanasyev
<ul></ul><p>I guess my question is going to Davide. How should we handle log files in nfd's PPA? Don't do anything and assume users will know what they are doing (this is kind of destructive...)? Create NFD-specific logging? Force creation of journal? Creating nfd-specific journal?</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=99822015-05-19T07:14:01ZDavide Pesavento
<ul></ul><p>Alex Afanasyev wrote:</p>
<blockquote>
<p>So, just creating /var/log/journal folder and everything will work automatically?</p>
</blockquote>
<p>Yes, assuming <code>Storage=auto</code> in journald.conf (the default).</p>
<blockquote>
<p>Or anything else to configure?</p>
</blockquote>
<p>No, assuming <code>Storage=auto</code> in journald.conf (the default).</p>
<blockquote>
<p>What about log rotation, will this be handled automatically?</p>
</blockquote>
<p>Yes, if <code>SystemMaxFileSize</code>/<code>RuntimeMaxFileSize</code> and <code>MaxFileSec</code> are left to their default values (or set to any other reasonable values). In any case, these are system-wide settings that are configured by the admin, and should never be touched by us.</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=99832015-05-19T07:42:32ZDavide Pesavento
<ul></ul><p>Alex Afanasyev wrote:</p>
<blockquote>
<p>I guess my question is going to Davide. How should we handle log files in nfd's PPA? Don't do anything and assume users will know what they are doing (this is kind of destructive...)? Create NFD-specific logging? Force creation of journal? Creating nfd-specific journal?</p>
</blockquote>
<p>What problem are you trying to solve? The volatility of the journal on Ubuntu? If that's the problem, then we don't need to do anything special. On Ubuntu journald is configured to forward all messages to syslog by default. So everything still goes to the rsyslog daemon and is handled according to the rsyslog rules and usually ends up being written to <code>/var/log/syslog</code> and friends.</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=99892015-05-19T11:48:17ZAlex Afanasyev
<ul></ul><p>THe problem is logging. Right now operators can see (without doing anything, except installing nfd package) all logs in /var/log/upstart/nfd.log. This log is automatically rotated and everything is fine.</p>
<p>With systemd I'm not seeing that the log is permanently stored. Should we enable something in the package to enable logging, e.g., adding syslog rule of some kind to the system?</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=100032015-05-20T06:22:38ZDavide Pesavento
<ul></ul><p>So there are two problems (correct me if I'm wrong)</p>
<ol>
<li><p>Writing nfd log messages to persistent storage (are you sure they don't get forwarded to syslog and saved like everything else?)</p></li>
<li><p>Logging nfd messages separately from everything else... this is rather vague, what is the exact requirement here? do you really need a separate log <em>file</em> stored on disk? otherwise, if you just want to easily skim or search through nfd messages without being disturbed by other output, the systemd way of doing this is e.g. <code>journalctl _COMM=nfd</code>, no configuration necessary.</p></li>
</ol>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=100042015-05-20T06:25:02ZDavide Pesavento
<ul><li><strong>Status</strong> changed from <i>Code review</i> to <i>Closed</i></li></ul> NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=101132015-05-26T15:17:04ZAlex Afanasyev
<ul></ul><p>Davide Pesavento wrote:</p>
<blockquote>
<p>So there are two problems (correct me if I'm wrong)</p>
<ol>
<li><p>Writing nfd log messages to persistent storage (are you sure they don't get forwarded to syslog and saved like everything else?)</p></li>
<li><p>Logging nfd messages separately from everything else... this is rather vague, what is the exact requirement here? do you really need a separate log <em>file</em> stored on disk? otherwise, if you just want to easily skim or search through nfd messages without being disturbed by other output, the systemd way of doing this is e.g. <code>journalctl _COMM=nfd</code>, no configuration necessary.</p></li>
</ol>
</blockquote>
<p>There only one problem, the first one you mentioned. I don't have issues with 2, as I already figured out how to use journalctl to extract nfd-specific info.</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=101152015-05-26T15:59:48ZDavide Pesavento
<ul></ul><p>Well then you have to elaborate more on the first "problem" because I cannot reproduce it: as I said in comment #20, everything still ends up in /var/log/syslog on ubuntu.</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=101172015-05-26T16:14:08ZAlex Afanasyev
<ul></ul><p>Huh. Davide, the "problem" is that once somebody installs nfd from PPA, whether a week/month from now it would be possible to check logs about what have happened in the past. This is the only thing I want to have and I didn't notice /var/log/syslog originally, so I'm kind of ok right now. However, it would be even better if we had separated "permanent"+logrotated log files for NFD specifically, but I don't really care much.</p>
NFD - Task #1586: contrib: Add unit file(s) and instructions for systemdhttps://redmine.named-data.net/issues/1586?journal_id=101352015-05-27T06:48:13ZDavide Pesavento
<ul></ul><p>Then add a config file in <code>/etc/rsyslog.d/</code>, systemd has nothing to do with this.</p>