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

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

    <bug>
          <bug_id>32095</bug_id>
          
          <creation_ts>2016-05-13 16:55:46 +0300</creation_ts>
          <short_desc>crond cannot run user crontab @reboot with systemd at boottime</short_desc>
          <delta_ts>2016-05-19 18:32:54 +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>vixie-cron</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vladimir D. Seleznev">vseleznv</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>shaba</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>156789</commentid>
    <comment_count>0</comment_count>
    <who name="Vladimir D. Seleznev">vseleznv</who>
    <bug_when>2016-05-13 16:55:46 +0300</bug_when>
    <thetext>crond не может запустить правило @reboot в пользовательском crontab&apos;е во время загрузки системы если используется systemd. с init&apos;ом проблема не воспроизводится. если после загрузки перезапустить crond с помощью `systemctl restart crond.service`, то правила @reboot выполняются.

Логи:

-- Subject: Unit crond.service has finished start-up
-- Unit crond.service has finished starting up.
May 11 14:06:05 host crond[701]: pam_nologin(crond:account): no conversation function
May 11 14:06:05 host crond[703]: pam_nologin(crond:account): no conversation function
May 11 14:06:05 host crond[702]: pam_nologin(crond:account): no conversation function
May 11 14:06:05 host crond[701]: (CRON) pam_acct_mgmt failed (Authentication failure)
May 11 14:06:05 host crond[702]: (CRON) pam_acct_mgmt failed (Authentication failure)
May 11 14:06:05 portlab.po.cs.msu.su crond[703]: (CRON) pam_acct_mgmt failed (Authentication failure)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156832</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2016-05-17 11:41:32 +0300</bug_when>
    <thetext>systemd запускает crond слишком рано: /run/nologin к этому времени, видимо, уже создан, но ещё не удалён.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156837</commentid>
    <comment_count>2</comment_count>
    <who name="Vladimir D. Seleznev">vseleznv</who>
    <bug_when>2016-05-17 13:24:49 +0300</bug_when>
    <thetext>Наблюдения показывают, что это вероятностный процесс, что неудивительно: crond может запуститься и после удаления /run/nologin.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156838</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2016-05-17 13:49:16 +0300</bug_when>
    <thetext>Поставить ему After=systemd-user-sessions.service ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156839</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Shabalin">shaba</who>
    <bug_when>2016-05-17 15:34:49 +0300</bug_when>
    <thetext>(В ответ на комментарий №3)
&gt; Поставить ему After=systemd-user-sessions.service ?

в https://github.com/systemd-cron/* используют
Requires=systemd-user-sessions.service</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156840</commentid>
    <comment_count>5</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2016-05-17 15:39:56 +0300</bug_when>
    <thetext>(In reply to comment #4)
&gt; (В ответ на комментарий №3)
&gt; &gt; Поставить ему After=systemd-user-sessions.service ?
&gt; 
&gt; в https://github.com/systemd-cron/* используют
&gt; Requires=systemd-user-sessions.service

systemd.git использует только After=systemd-user-sessions.service</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156867</commentid>
    <comment_count>6</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2016-05-19 18:32:54 +0300</bug_when>
    <thetext>vixie-cron-4.1.20060426-alt10 -&gt; sisyphus:

* Thu May 19 2016 Dmitry V. Levin &lt;ldv@altlinux&gt; 4.1.20060426-alt10
- crond.service: fixed race condition that affected user crontabs
  (closes: #32095).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>