Hi Michael,
Thanks for the manual link for fstab. I was using this:
172.17.9.20:/home/emil/Apps/epics /home/emil/Apps/epics nfs defaults,nofail,noatime 0 0
172.17.9.20:/home/emil/Apps/autosave/ /home/emil/Apps/autosave nfs defaults,nofail,noatime 0 0
I was missing _netdev. I removed nofail so that the mount was a requirement of remote-fs.target. It now looks like this and it works:
172.17.9.20:/home/emil/Apps/epics /home/emil/Apps/epics nfs defaults,noatime,_netdev 0 0
172.17.9.20:/home/emil/Apps/autosave/ /home/emil/Apps/autosave nfs defaults,noatime,_netdev 0 0
My procServ service is now back to the standard with "After" set to
After=network.target remote-fs.target
Hopefully this will help somebody else who searches techtalk! You can probably close the issue on github since it's not a bug with manage-procs
Cheers,
Wil
-----Original Message-----
From: Michael Davidsaver <mdavidsaver at gmail.com>
Sent: Wednesday, August 4, 2021 5:29 PM
To: Smith, William <william.smith at helmholtz-berlin.de>
Cc: tech-talk at aps.anl.gov
Subject: Re: Autostart with manage-procs and network mounts
On 8/4/21 2:25 AM, Smith, William wrote:
> Hi Michael,
>
> I am using /etc/fstab
>
> I solved the problem for my case by adding: "name-of-mount.mount" in the end of the After line like this:
>
> After=network.target remote-fs.target name-of-mount.mount
Well, this is unexpected. Can you share the line from /etc/fstab?
I'm wondering if the special '_netdev' option has been omitted?
This is how systemd recognizes a network mount, and knows to add the dependency on 'remote-fs.target'.
https://www.freedesktop.org/software/systemd/man/systemd.mount.html#_netdev
> I found the name-of-mount using
>
>> systemctl list-units --type=mount
>
> I used this for help: https://unix.stackexchange.com/a/247547
>
> Obviously this doesn’t work in a general case, only for my deployment system. For now I have edited the generator.py file of manage-procs. I haven't looked at used autofs before.
>
> I will follow the github issue you've made and post anything else there if I think of anything.
>
> Best
>
> Will
>
>
>
> -----Original Message-----
> From: Michael Davidsaver <mdavidsaver at gmail.com>
> Sent: Tuesday, August 3, 2021 7:17 PM
> To: Smith, William <william.smith at helmholtz-berlin.de>
> Cc: wayne.lewis at ess.eu; tech-talk at aps.anl.gov
> Subject: Re: Autostart with manage-procs and network mounts
>
> On 8/3/21 3:07 AM, Smith, William via Tech-talk wrote:
>> Hi,
>>
>>
>>
>> I am using manage-procs to deploy and manage IOC’s using systemd. It creates the systemd files that look something like what is shown below. I mount a network drive over nfs at boot that contains the built IOC binaries for the service to run. The service is enabled, it should start at boot but it doesn’t because the ConditionPathIsDirectory fails. If I go to the directory after the system has booted, I can see that it has been mounted correctly and exists. I cc Wayne because I seem to remember us having a similar problem at ESS about 2 years ago but I can’t remember how we solved it! Does anybody have any ideas?
>
> How is the relevant NFS share being mounted? Via /etc/fstab, autofs, or some other initiator?
>
> I think that "After=network.target remote-fs.target" should be enough to ensure ordering. You could try adding "Requires=network.target remote-fs.target".
>
>
>> Many thanks,
>>
>>
>>
>> Will
>>
>>
>>
>> emil@sissy-ioc-01:/etc/systemd/system$ cat
>> procserv-EMIL_KTH_00.service
>>
>>
>>
>> [Unit]
>>
>> Description=procServ for EMIL_KTH_00
>>
>> After=network.target remote-fs.target
>>
>> ConditionPathIsDirectory=/home/emil/Apps/epics/R7.0.4.1/prod/ioc/EMIL
>> E
>> L/EMIL_KTH_00/1-4-0/iocBoot/iocEMIL_KTH_00
>>
>>
>>
>> [Service]
>>
>> Type=simple
>>
>> ExecStart=/usr/local/bin/procServ-launcher --system EMIL_KTH_00
>>
>> RuntimeDirectory=procserv-EMIL_KTH_00
>>
>> StandardOutput=syslog
>>
>> StandardError=inherit
>>
>> SyslogIdentifier=procserv-EMIL_KTH_00
>>
>>
>>
>> User=emil
>>
>> Group=emil
>>
>>
>>
>> [Install]
>>
>> WantedBy=multi-user.target
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> -
>> ---------------------------------------------------------------------
>> -
>> ---------------------------------------------------------------------
>> -
>> ---------------------------------------------------------------------
>> -
>> ---------------------------------------------------------------------
>> -
>> ---------------------------------------------------------------------
>> -
>> ---------------------------------------------------------------------
>> -
>> ---------------------------------------------------------------------
>> -
>> ---------------------------------------------------------------------
>> -
>> ---------------------------------------------------------------------
>> -
>> ---------------------------------------------------------------------
>> -
>> ---------------------------------------------------------------------
>> -
>> ---------------------------------------------------------------------
>> -
>> ---------------------------------------------------------------------
>> -
>> ----------
>>
>> Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
>>
>> Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.
>>
>> Aufsichtsrat: Vorsitzender Dr. Volkmar Dietz, stv. Vorsitzende Dr.
>> Jutta Koch-Unterseher
>> Geschäftsführung: Prof. Dr. Jan Lüning (Sprecher), Prof. Dr. Bernd
>> Rech, Thomas Frederking
>>
>> Sitz Berlin, AG Charlottenburg, 89 HRB 5583
>>
>> Postadresse:
>> Hahn-Meitner-Platz 1
>> 14109 Berlin
>> Deutschland
>
>
> ________________________________
>
> Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
>
> Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.
>
> Aufsichtsrat: Vorsitzender Dr. Volkmar Dietz, stv. Vorsitzende Dr.
> Jutta Koch-Unterseher
> Geschäftsführung: Prof. Dr. Jan Lüning (Sprecher), Prof. Dr. Bernd
> Rech, Thomas Frederking
>
> Sitz Berlin, AG Charlottenburg, 89 HRB 5583
>
> Postadresse:
> Hahn-Meitner-Platz 1
> 14109 Berlin
> Deutschland
>
________________________________
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.
Aufsichtsrat: Vorsitzender Dr. Volkmar Dietz, stv. Vorsitzende Dr. Jutta Koch-Unterseher
Geschäftsführung: Prof. Dr. Jan Lüning (Sprecher), Prof. Dr. Bernd Rech, Thomas Frederking
Sitz Berlin, AG Charlottenburg, 89 HRB 5583
Postadresse:
Hahn-Meitner-Platz 1
14109 Berlin
Deutschland
- References:
- Autostart with manage-procs and network mounts Smith, William via Tech-talk
- Re: Autostart with manage-procs and network mounts Michael Davidsaver via Tech-talk
- RE: Autostart with manage-procs and network mounts Smith, William via Tech-talk
- Re: Autostart with manage-procs and network mounts Michael Davidsaver via Tech-talk
- Navigate by Date:
- Prev:
Re: Lib directory is not created for RTEMS (EPICS 7). Johnson, Andrew N. via Tech-talk
- Next:
Re: Archive appliance on RHEL8 Shankar, Murali via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Autostart with manage-procs and network mounts Michael Davidsaver via Tech-talk
- Next:
Re: Autostart with manage-procs and network mounts Michael Davidsaver via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
|