<html><body><p>hey Patrick,<br><br><tt>Patrick Williams <patrick@stwcx.xyz> wrote on 17/06/2016 12:18:11 am:<br><br>> From: Patrick Williams <patrick@stwcx.xyz></tt><br><tt>> To: Vishwanatha Subbanna/India/IBM@IBMIN</tt><br><tt>> Cc: openbmc@lists.ozlabs.org</tt><br><tt>> Date: 17/06/2016 12:18 am</tt><br><tt>> Subject: Re: Fw: Need some thoughts on systemd service file</tt><br><tt>> <br>> Vishwa,<br>> <br>> A few suggestions on your commit:<br>> <br>> 1. I see you put the files into .../network/files/ and moved them from<br>> .../network/network/ .  Why is that?<br>> </tt><br><br><tt>That is just an attempt to see if moving to files/ would do any magic.. I moved them back to network/network/ now.</tt><br><tt><br>> 2. 'inherit obmc-phosphor-systemd' causes your recipe to import<br>> obmc-phosphor-systemd.bbclass.  This file has:<br>> ====<br>> inherit systemd<br>> <br>> SYSTEMD_SERVICE_${PN} = "${BPN}.service"<br>> SRC_URI += " \<br>>     <a href="file://$">file://$</a>{BPN}.service \<br>>     "<br>> <br>> do_install_append() {<br>>     # install systemd unit files<br>>     install -d ${D}${systemd_unitdir}/system<br>>     install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_unitdir}/system<br>> }<br>> =====<br>> This means a few things...<br>>     a. By setting SYSTEMD_SERVICE_${PN} += "network.service", you're<br>>        actually getting network.service added twice.<br>>     b. network.service will be installed by this do_install_append<br>>        snippet, but network-update-dns.service will not.  I think you<br>>        need to 'install' it.<br>>     c. I'm surprised we don't 'install' everything in<br>>        SYSTEMD_SERVICE_${PN} automatically or in this .bbclass.  Maybe<br>>        Brad can comment on why it is set up this way.<br>> <br>> 3. Before you made your change are we sure 'network.service' was<br>> working?  Hopefully someone has previously tested this but there is<br>> always the possibility that systemd is confused by 'network.service' vs<br>> 'network.target'.  Maybe 'network' is effectively a reserved word.<br>> </tt><br><br><tt>Since I see manual starting with "systemctl start network" is working, it would not have an issue IMO. </tt><br><tt>Do you suggest a better name tho ?</tt><br><tt><br>> 4. There is no advantage to setting SYSTEMD_AUTO_ENABLE because it is<br>> already defaulted to 'enable'.<br>> </tt><br><br><tt>Correct. This is again with the hope that things may work. I removed this in the next patch.</tt><br><tt><br>> On Thu, Jun 16, 2016 at 11:11:00PM +0530, Vishwanatha Subbanna wrote:<br>> > <br>> > <br>> > hello Team,<br>> > <br>> > So here is what I am trying to do with :<br>> > <a href="https://github.com/vishwabmc/openbmc/commit/">https://github.com/vishwabmc/openbmc/commit/</a><br>> f28651bb92bc7af6b503c9ca07aa8d76a3f0660c<br>> > <br>> > 1/. Point bb to the git repo with commit #<br>> > c69c3d30fd7d5fd04ba990788b6d75b19f275fc8 that introduced netman_watch_dns<br>> > binary<br>> > 2/. Create 2 .service files inside<br>> > meta-phosphor/common/recipes-phosphor/network/files/ --> network.service<br>> > and network-update-dns.service<br>> > 3/  Make necessary changes to bitbake file so systemd can enable the<br>> > services and start at boot.<br>> > 4/. Build a Palmetto image ( or qemu too ) and copy 'em over to tftpserver<br>> > ( /tftpboot/cuImage_vishwa_1 and /tftpboot/initrd_vishwa_1 )<br>> > 5/. reboot palmetto and run netboot to new image.<br>> > <br>> > I expected that the netman.py ( which is part of network.service ) and<br>> > netman_watch_dns ( part of network-update-dns.service ) would get auto<br>> > started but they did *not* start and I need some thoughts on why this may<br>> > be happening.<br>> > <br>> > <a href="https://lists.yoctoproject.org/pipermail/yocto/2015-April/024470.html">https://lists.yoctoproject.org/pipermail/yocto/2015-April/024470.html</a><br>> > ( Someone else also had same issue )<br>> > <br>> > What is that I am seeing :<br>> > <br>> > 1/. I see these 2 files are actually inside /lib/systemd/system/network<br>> > Palmetto in as expected --> Good<br>> > 2/. Services not started<br>> > 3/. systemctl status network shows that its disabled. Same for update-dns.<br>> > 4/. I see systemctl status skeleton displays everything is running<br>> > 4.1/ Removing the Requires= and After= in network.service and booting to<br>> > that changed image still does not help.<br>> > 5/. Manual start using systemctl start network -and/or- systemctl start<br>> > network-update-dns does everything okay and starts the expected services.<br>> > 6/. No error seen in journal<br>> > <br>> > Thanks<br>> > <br>> > <br>> -------------------------------------------------------------------------------------<br>> > <br>> > Thanks and Regards,<br>> > Vishwanath.<br>> > Advisory Software Engineer,<br>> > Power Firmware Development,<br>> > Systems &Technology Lab,<br>> > MG2-6F-255 , Manyata Embassy Business Park,<br>> > Bangalore , KA , 560045<br>> > Ph: +91-80-46678255<br>> > E-mail: vishwanath@in.ibm.com<br>> > <br>> ----------------------------------------------------------------------------------<br>> > <br>> <br>> > _______________________________________________<br>> > openbmc mailing list<br>> > openbmc@lists.ozlabs.org<br>> > <a href="https://lists.ozlabs.org/listinfo/openbmc">https://lists.ozlabs.org/listinfo/openbmc</a><br>> <br>> <br>> -- <br>> Patrick Williams<br>> [attachment "signature.asc" deleted by Vishwanatha Subbanna/India/IBM] </tt><BR>
</body></html>