[Bug 894031] New: restarting ntp delay due to trigger of systemd-tty-ask-password-agent
https://bugzilla.novell.com/show_bug.cgi?id=894031 https://bugzilla.novell.com/show_bug.cgi?id=894031#c0 Summary: restarting ntp delay due to trigger of systemd-tty-ask-password-agent Classification: openSUSE Product: openSUSE 13.1 Version: Final Platform: x86-64 OS/Version: openSUSE 13.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: diego.ercolani@gmail.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 As I understood reported on http://www.freedesktop.org/software/systemd/man/systemd-tty-ask-password-age... implements Password Agent Specifications (http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents/), a tool that wants to give help to user that when a system software wants a password then a service handled by systemd is going to warning user asking him for a password. This should be very useful for mounting e.g. crypto disk or starting apache with SSL with certificate password.... or something like that. What I see in the opensuse 13.1 distribution is that this utility (/usr/bin/systemd-tty-ask-password-agent --watch) is invoked whenever you try to restart /etc/init.d/ntp. What happen is a temporary hang in the script subroutine: function add_runtime_server() { /usr/sbin/sntp -s $@ NTPC_CMD="keyid $NTP_KEYID\npasswd $NTP_PASSWD\naddserver $@\n" NTPDC_LOG=$(echo -e "${NTPC_CMD}quit" | $NTPDC_BIN) logger -t $0 "runtime configuration: $NTPDC_LOG" } that when is invoked cause the launch of systemd-tty-ask-password-agent process that wait something for a minute (!) until it have a timeout and the init script finish its process. Here it is what I debugged with set -x in bash: [...] Aug 28 14:09:27 linux-zbzu ntp[5092]: + echo -n 'Starting network time protocol daemon (NTPD)' Aug 28 14:09:27 linux-zbzu ntp[5092]: Starting network time protocol daemon (NTPD)+ parse_symlink Aug 28 14:09:27 linux-zbzu ntp[5092]: + '[' -c '' ']' Aug 28 14:09:27 linux-zbzu ntp[5092]: + test no = yes Aug 28 14:09:27 linux-zbzu ntp[5092]: + startproc /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -g -u ntp:ntp -c /etc/ntp.conf Aug 28 14:09:27 linux-zbzu ntp[5092]: + '[' -n /etc/ntp.keys ']' Aug 28 14:09:27 linux-zbzu ntp[5092]: + runtime_configuration Aug 28 14:09:27 linux-zbzu ntp[5092]: + for f in '/var/run/ntp/servers*' Aug 28 14:09:27 linux-zbzu ntp[5092]: + '[' -r /var/run/ntp/servers-netconfig ']' Aug 28 14:09:27 linux-zbzu ntp[5092]: + . /var/run/ntp/servers-netconfig Aug 28 14:09:27 linux-zbzu ntp[5092]: ++ RUNTIME_SERVERS=time Aug 28 14:09:27 linux-zbzu ntp[5092]: + ntp_server=' time' Aug 28 14:09:27 linux-zbzu ntp[5092]: + '[' -n ' time' ']' Aug 28 14:09:27 linux-zbzu ntp[5092]: + for s in '${ntp_server}' Aug 28 14:09:27 linux-zbzu ntp[5092]: + add_runtime_server time Aug 28 14:09:27 linux-zbzu ntp[5092]: + /usr/sbin/sntp -s time Aug 28 14:09:27 linux-zbzu ntp[5092]: 28 Aug 14:09:27 sntp[5106]: Started sntp then I you place a ps auxwwwf: root 2757 0.0 0.4 11460 3632 ? Ss 13:13 0:01 \_ sshd: root@pts/1 root 2761 0.0 0.3 5600 2432 pts/1 Ss 13:13 0:01 | \_ -bash root 5075 0.0 0.1 4580 1080 pts/1 S+ 14:09 0:00 | \_ /usr/bin/systemctl restart ntp.service root 5079 0.0 0.0 2928 708 pts/1 S+ 14:09 0:00 | \_ /usr/bin/systemd-tty-ask-password-agent --watch after a minute the journal log continues: Aug 28 14:10:35 linux-zbzu ntp[5092]: 2014-08-28 14:10:35.611287 (-0100) +0.000002 +/- 0.455688 secs Aug 28 14:10:35 linux-zbzu systemd[1796]: Time has been changed Aug 28 14:10:35 linux-zbzu systemd[1]: Time has been changed Aug 28 14:10:35 linux-zbzu ntp[5092]: + NTPC_CMD='keyid 1\npasswd ee713cf\naddserver time\n' Aug 28 14:10:35 linux-zbzu ntp[5092]: ++ /usr/sbin/ntpdc Aug 28 14:10:35 linux-zbzu ntp[5092]: ++ echo -e 'keyid 1\npasswd ee713cf\naddserver time\nquit' Aug 28 14:10:35 linux-zbzu ntp[5092]: + NTPDC_LOG='keyid 1 Aug 28 14:10:35 linux-zbzu ntp[5092]: passwd ee713cf Aug 28 14:10:35 linux-zbzu ntp[5092]: addserver time Aug 28 14:10:35 linux-zbzu ntp[5092]: done! Aug 28 14:10:35 linux-zbzu ntp[5092]: quit' Aug 28 14:10:35 linux-zbzu ntp[5092]: + logger -t /etc/init.d/ntp 'runtime configuration: keyid 1 Aug 28 14:10:35 linux-zbzu ntp[5092]: passwd ee713cf Aug 28 14:10:35 linux-zbzu ntp[5092]: addserver time Aug 28 14:10:35 linux-zbzu ntp[5092]: done! Aug 28 14:10:35 linux-zbzu ntp[5092]: quit' Aug 28 14:10:35 linux-zbzu ntp[5092]: + rc_status -v Aug 28 14:10:35 linux-zbzu ntp[5092]: + rc_check Aug 28 14:10:35 linux-zbzu ntp[5092]: + _rc_status_ret=0 Aug 28 14:10:35 linux-zbzu ntp[5092]: + test 0 -eq 0 Aug 28 14:10:35 linux-zbzu ntp[5092]: + test 0 -eq 0 Aug 28 14:10:35 linux-zbzu ntp[5092]: + return 0 Aug 28 14:10:35 linux-zbzu ntp[5092]: + test 0 -gt 7 Aug 28 14:10:35 linux-zbzu ntp[5092]: + _rc_status_ret=0 Aug 28 14:10:35 linux-zbzu ntp[5092]: + case "$_rc_todo" in Aug 28 14:10:35 linux-zbzu ntp[5092]: + local i Aug 28 14:10:35 linux-zbzu ntp[5092]: + for i in '"$@"' Aug 28 14:10:35 linux-zbzu ntp[5092]: + case "$i" in Aug 28 14:10:35 linux-zbzu ntp[5092]: + local vrt= Aug 28 14:10:35 linux-zbzu ntp[5092]: + local out=1 Aug 28 14:10:35 linux-zbzu ntp[5092]: + local opt=en Aug 28 14:10:35 linux-zbzu ntp[5092]: + test -n '' Aug 28 14:10:35 linux-zbzu ntp[5092]: + opt=e Aug 28 14:10:35 linux-zbzu ntp[5092]: + case "$_rc_status" in Aug 28 14:10:35 linux-zbzu ntp[5092]: + vrt=..done Aug 28 14:10:35 linux-zbzu ntp[5092]: + echo -e ..done Aug 28 14:10:35 linux-zbzu ntp[5092]: ..done Aug 28 14:10:35 linux-zbzu ntp[5092]: + _rc_status=0 Aug 28 14:10:35 linux-zbzu ntp[5092]: + return 0 Aug 28 14:10:35 linux-zbzu ntp[5092]: + rc_exit Aug 28 14:10:35 linux-zbzu ntp[5092]: + exit 0 Aug 28 14:10:35 linux-zbzu /etc/init.d/ntp[5111]: runtime configuration: keyid 1 passwd ee713cf addserver time done! quit Aug 28 14:10:35 linux-zbzu systemd[1]: Started LSB: Network time protocol daemon (ntpd). This is very annoying! Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=894031
https://bugzilla.novell.com/show_bug.cgi?id=894031#c1
Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=894031
https://bugzilla.novell.com/show_bug.cgi?id=894031#c2
--- Comment #2 from Diego Ercolani
https://bugzilla.novell.com/show_bug.cgi?id=894031
https://bugzilla.novell.com/show_bug.cgi?id=894031#c3
--- Comment #3 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=894031
https://bugzilla.novell.com/show_bug.cgi?id=894031#c4
Diego Ercolani
http://bugzilla.novell.com/show_bug.cgi?id=894031
http://bugzilla.novell.com/show_bug.cgi?id=894031#c7
--- Comment #7 from Bernhard Wiedemann
participants (1)
-
bugzilla_noreply@novell.com