Subject: Rare project developers
List archive
- From: <>
- To: <>
- Cc: "" <>
- Subject: Re: [rare-dev] nix packaging
- Date: Mon, 16 Aug 2021 12:00:46 +0200
- Authentication-results: mx2.switch.ch; x-trusted-ip=pass
On Mon, 16 Aug 2021 10:08:25 +0200, mc36 <> said:
> hi,
> ok then, it seems allright... i just mentioned this because i noticed that
> on poznan it somehow did not restarted...
> it went to systsmd's too quick restarts stopped mode or so, as i
> studied "systemctl status freerouter" output....
Ok, so meaybe there is something missing. I remember having tested the
mechanism when freertr terminates with status 4, but it's been a while.
> regarding the exit code, freertr never exits with 0, it always have
> a numeric value indicating the exact cause....
I see. But we should ignore the status unless it's 4, right? I think
the current logic of the unit file should behave exactly like that, at
least that is the intention :) But it can be stopped with "systemctl
stop freerouter", of course.
--
Alex
> regards,
> cs
> On 8/16/21 10:03 AM, wrote:
>> On Mon, 16 Aug 2021 08:40:31 +0200, mc36 <> said:
>>
>>> and another, the
>>> /nix/store/l1wlg9llnjdg549kw82szwj3pchqhkw5-freerouter-21.04.06/bin/freerouter
>>> script should look like:
>>> cd /rtr/
>>> while (true); do
>>> java -Xmx2g -jar /rtr/rtr.jar router /rtr/rtr-
>>> if [ $? -eq 4 ] ; then
>>> sync
>>> reboot -f
>>> else
>>> sleep 1
>>> fi
>>> sleep 1
>>> done
>>
>> The reboot is done by the ExecStopPost handler of the service:
>>
>> $ cat /nix/store/vc8pxy21iynvqkgy6r8f2q46yfxlqr1m-freertr-exec-stop-post
>> #!/nix/store/a3fc4zqaiak11jks9zd579mz5v0li8bg-bash-4.4-p23/bin/bash
>> if [ $EXIT_STATUS -eq 4 ]; then
>> echo "cold reload requested by freeRtr, initiating reboot"
>> /nix/store/q6ylicsava582g55mdx0788yg2fib7js-systemd-246.6/bin/systemctl
>> reboot
>> fi
>> exit 0
>>
>> I have also set
>>
>> Restart=on-failure
>>
>> The difference to your method is that the service doesn't restart if
>> it exits with status 0. I guess we need to decide whether the user
>> should be able to stop the service from the CLI without an automatic
>> restart or reboot.
>>
>> --
>> Alex
>>
>>> On 8/15/21 5:56 AM, mc36 wrote:
>>>> one more thing: the p4 user have no sudo capabilities...
>>>>
>>>> On 8/15/21 5:39 AM, mc36 wrote:
>>>>> hello,
>>>>> i just noticed that poznan runs the nix version of the rare builds....
>>>>> checked around and found the following, please correct and rebuild:
>>>>> - please use the latest greatest available jvm for the built blob... at
>>>>> the moment you build with jvm8 whereas the latest stable is jvm16...
>>>>> (if that is not yet nix-ized, then
>>>>> jvm11 should work fine)
>>>>> - please compile freerouter to rtr.jar instead of freerouter.jar... the
>>>>> name have importance in the autoupgrade process...
>>>>> otherwise i found the blob convenient, great work!
>>>>> thanks,
>>>>> cs
>>>>>
>>>>>
>>>>> POZ0001#show platform
>>>>> freeRouter v21.4.6-cur, done by cs@nop.
>>>>>
>>>>> name: POZ0001
>>>>> hwid: wedge100bf32x
>>>>> uptime: since 2021-08-15 05:33:43, for 00:00:34
>>>>> hwcfg: /etc/freertr/rtr-hw.txt
>>>>> swcfg: /etc/freertr/rtr-sw.txt
>>>>> cpu: 8*amd64
>>>>> mem: free=131m, max=1908m, used=794m
>>>>> host: Linux v4.19.0-16-amd64
>>>>> java: Oracle Corporation v1.8.0_272 @
>>>>> /nix/store/mlhbfwpig3yadxvcxb1055qcqbpjfdx5-openjdk-headless-8u272-b10-jre/lib/openjdk/jre
>>>>> jspec: Oracle Corporation (Java Platform API Specification) v1.8
>>>>> vm: Oracle Corporation (OpenJDK 64-Bit Server VM) v25.272-b10
>>>>> vmspec: Oracle Corporation (Java Virtual Machine Specification) v1.8
>>>>> class: v52.0 @
>>>>> /nix/store/l1wlg9llnjdg549kw82szwj3pchqhkw5-freerouter-21.04.06/share/java/freerouter.jar
>>>>>
>>>>> POZ0001#
- [rare-dev] nix packaging, mc36, 08/15/2021
- Re: [rare-dev] nix packaging, mc36, 08/15/2021
- Re: [rare-dev] nix packaging, mc36, 08/16/2021
- Re: [rare-dev] nix packaging, gall, 08/16/2021
- Re: [rare-dev] nix packaging, mc36, 08/16/2021
- Re: [rare-dev] nix packaging, gall, 08/16/2021
- Re: [rare-dev] nix packaging, mc36, 08/16/2021
- Re: [rare-dev] nix packaging, gall, 08/16/2021
- Re: [rare-dev] nix packaging, gall, 08/16/2021
- Re: [rare-dev] nix packaging, mc36, 08/16/2021
- Re: [rare-dev] nix packaging, gall, 08/16/2021
- Re: [rare-dev] nix packaging, mc36, 08/16/2021
- Re: [rare-dev] nix packaging, gall, 08/16/2021
- Re: [rare-dev] nix packaging, gall, 08/16/2021
- Re: [rare-dev] nix packaging, mc36, 08/16/2021
- Re: [rare-dev] nix packaging, mc36, 08/16/2021
- Re: [rare-dev] nix packaging, mc36, 08/15/2021
Archive powered by MHonArc 2.6.19.