<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>39554</bug_id>
          
          <creation_ts>2021-01-18 07:57:57 +0300</creation_ts>
          <short_desc>Задвоение в логах в anacron</short_desc>
          <delta_ts>2022-01-02 15:35:55 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>anacron</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>37164</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="mattaku@altlinux.org">mattaku</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>legion</cc>
    
    <cc>placeholder</cc>
    
    <cc>serega2005</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>195482</commentid>
    <comment_count>0</comment_count>
    <who name="mattaku@altlinux.org">mattaku</who>
    <bug_when>2021-01-18 07:57:57 +0300</bug_when>
    <thetext>Задвоение в логах alt workstation 9 x86_64

Max ~ # journalctl -u anacron.service
-- Logs begin at Fri 2020-08-28 12:31:42 MSK, end at Mon 2021-01-18 07:55:22 MS&gt;
сен 29 16:17:58 Max.0.2.15 systemd[1]: Started Run cron jobs that were left out&gt;
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Anacron 2.3 started on `2020-09-29 16&gt;
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Anacron 2.3 started on `2020-09-29 16&gt;
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Job `cron.daily&apos; locked by another an&gt;
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Job `cron.weekly&apos; locked by another a&gt;
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Job `cron.monthly&apos; locked by another &gt;
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Normal exit (0 jobs run)
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Job `cron.daily&apos; locked by another an&gt;
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Job `cron.weekly&apos; locked by another a&gt;
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Job `cron.monthly&apos; locked by another &gt;
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Normal exit (0 jobs run)
lines 1-12/12 (END)...skipping...
-- Logs begin at Fri 2020-08-28 12:31:42 MSK, end at Mon 2021-01-18 07:55:22 MSK. --
сен 29 16:17:58 Max.0.2.15 systemd[1]: Started Run cron jobs that were left out due to downtime.
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Anacron 2.3 started on `2020-09-29 16:17:58&apos;
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Anacron 2.3 started on `2020-09-29 16:17:58&apos;
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Job `cron.daily&apos; locked by another anacron - skipping
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Job `cron.weekly&apos; locked by another anacron - skipping
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Job `cron.monthly&apos; locked by another anacron - skipping
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Normal exit (0 jobs run)
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Job `cron.daily&apos; locked by another anacron - skipping
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Job `cron.weekly&apos; locked by another anacron - skipping
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Job `cron.monthly&apos; locked by another anacron - skipping
сен 29 16:17:58 Max.0.2.15 anacron[6850]: Normal exit (0 jobs run)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>195493</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2021-01-18 12:19:52 +0300</bug_when>
    <thetext>(In reply to mattaku@altlinux.org from comment #0)
&gt; Задвоение в логах alt workstation 9 x86_64
&gt; 
&gt; Max ~ # journalctl -u anacron.service
&gt; -- Logs begin at Fri 2020-08-28 12:31:42 MSK, end at Mon 2021-01-18 07:55:22
&gt; MS&gt;
&gt; сен 29 16:17:58 Max.0.2.15 systemd[1]: Started Run cron jobs that were left
&gt; out&gt;
&gt; сен 29 16:17:58 Max.0.2.15 anacron[6850]: Anacron 2.3 started on `2020-09-29
&gt; 16&gt;
&gt; сен 29 16:17:58 Max.0.2.15 anacron[6850]: Anacron 2.3 started on `2020-09-29
&gt; 16&gt;

Его зачем-то запускают дважды, оттуда и задвоение.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206520</commentid>
    <comment_count>2</comment_count>
    <who name="">serega2005</who>
    <bug_when>2022-01-02 15:35:55 +0300</bug_when>
    <thetext>Нет, это именно задвоение в логах.
Причина в файле anacron.service

А именно опция запуска
-d

Don&apos;t fork to the background. In this mode, Anacron will output informational messages to standard error, as well as to syslog. The output of jobs is mailed as usual.


Можно эту опцию убрать, тип изменить на Type= forking, опции про syslog в данном случае тоже можно убрать.

[Unit]
Description=Run cron jobs that were left out due to downtime
ConditionACPower=true
After=crond.service

[Service]
Type=forking 
RemainAfterExit=yes
IOSchedulingClass=idle
CPUSchedulingPolicy=batch
#StandardInput=null
#StandardOutput=syslog
#StandardError=syslog
ExecStart=/usr/sbin/anacron -s

[Install]
WantedBy=multi-user.target

Может я что-то упустил, но в таком варианте запускается и работает корректно.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>