Bug 837064

Summary: named -t /chroot/named doesn't work
Product: [Fedora] Fedora Reporter: udo <udovdh>
Component: systemdAssignee: systemd-maint
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: johannbg, lnykryn, metherid, mschmidt, msekleta, notting, plautrba, systemd-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-03 14:13:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description udo 2012-07-02 16:14:42 UTC
Description of problem: chrooting named does not work


Version-Release number of selected component (if applicable):
systemd-44-14.fc17.i686

How reproducible:
named.service:
[Unit]
Description=Berkeley Internet Name Domain (DNS)
Wants=nss-lookup.target
Before=nss-lookup.target
After=network.target

[Service]
Type=forking
EnvironmentFile=-/etc/sysconfig/named
Environment=KRB5_KTNAME=/etc/named.keytab
PIDFile=/run/named/named.pid

#ExecStartPre=/usr/sbin/named-checkconf -z $ROOTDIR/etc/named.conf
ExecStart=/usr/sbin/named -u named -t $ROOTDIR $OPTIONS

ExecReload=/bin/sh -c '/usr/sbin/rndc reload > /dev/null 2>&1 || /bin/kill -HUP $MAINPID'

ExecStop=/bin/sh -c '/usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID'

PrivateTmp=true
TimeoutSec=25

[Install]
WantedBy=multi-user.target


Steps to Reproduce:
1.systemctl start named.service
2. names starts very well, but systemd concludes:
3. systemd[1]: named.service operation timed out. Terminating.

  
Actual results:
systemd[1]: named.service operation timed out. Terminating.


Expected results:
no such systemd[1]: named.service operation timed out. Terminating.


Additional info:
This worked very well without systemd.

Comment 1 Michal Schmidt 2012-07-02 17:10:18 UTC
Is the PIDFile correct? Is it perhaps stored in the chroot?

Comment 2 udo 2012-07-02 17:13:53 UTC
PIDFile=/chroot/named/var/run/named.pid
and a reload improve things

Comment 3 udo 2012-07-03 14:13:04 UTC
Works for me(tm) now...