user "ntp" does not created

Bug #33351 reported by Cristian Aravena Romero
60
Affects Status Importance Assigned to Milestone
ntp (Debian)
Fix Released
Unknown
ntp (Ubuntu)
Fix Released
Medium
Adam Conrad

Bug Description

Subject: ntp-server: Error in services: action "start" failed action "restart" failed.and
Package: ntp-server
Version: 1:4.2.0a+stable-8.1ubuntu3
Severity: normal

* Add in applet of gnome install ntp:

Seleccionando el paquete ntp previamente no seleccionado.
(Leyendo la base de datos ...
98428 ficheros y directorios instalados actualmente.)
Desempaquetando ntp (de .../ntp_1%3a4.2.0a+stable-8.1ubuntu3_i386.deb) ...
Seleccionando el paquete ntp-simple previamente no seleccionado.
Desempaquetando ntp-simple (de .../ntp-simple_1%3a4.2.0a+stable-8.1ubuntu3_i386.deb) ...
Seleccionando el paquete ntp-server previamente no seleccionado.
Desempaquetando ntp-server (de .../ntp-server_1%3a4.2.0a+stable-8.1ubuntu3_i386.deb) ...
 Removing any system startup links for /etc/init.d/ntp-simple ...
 Removing any system startup links for /etc/init.d/ntp-refclock ...
 Removing any system startup links for /etc/init.d/ntp ...
ntpd: no process killed
Configurando ntp (4.2.0a+stable-8.1ubuntu3) ...

Configurando ntp-server (4.2.0a+stable-8.1ubuntu3) ...
User ntp does not exist
invoke-rc.d: initscript ntp-server, action "start" failed.

Configurando ntp-simple (4.2.0a+stable-8.1ubuntu3) ...
 * Stopping NTP server... invoke-rc.d: initscript ntp-server, action "restart" failed.

-- System Information:
Ubuntu Release: Flight 4
  APT prefers dapper
  APT policy: (500, 'dapper')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-16-386
Locale: LANG=es_CL.UTF-8, LC_CTYPE=es_CL.UTF-8 (charmap=UTF-8)

Versions of packages ntp-server depends on:
ii lsb-base 3.0-12ubuntu3 Linux Standard Base 3.0 init scrip
ii ntp 1:4.2.0a+stable-8.1ubuntu3 Network Time Protocol: network uti
ii ntp-simple 1:4.2.0a+stable-8.1ubuntu3 Network Time Protocol: daemon for

ntp-server recommends no packages.

-- no debconf information

Revision history for this message
In , Joey Hess (joeyh) wrote : me too

Hmm, no followup on this bug for 3 months?

I installed the pcakage today and saw the same problem.
This is a two part bug, part 1 is that this error message is wrong:

if [ -z "$UGID" ]; then
  echo "User $USER does not exist" >&2
  exit 1
fi

(Should be $RUNASUSER.)

Part 2 is that the ntp user is created by the ntp-simple package, but
the ntp package installs an init script that needs that user to exist.
Since ntp does not depend on ntp-simple, ntp is configured before
ntp-simple and so the ntp user is not created in time. The fix for this
is probably moving the adduser call to the ntp package.

--
see shy jo

Revision history for this message
In , =?utf-8?q?Vincent_L=C3=B6nngren?= (bice77-malmo2) wrote : ntp-server: Same error today

Package: ntp-server
Version: 1:4.2.0a+stable-8.1
Followup-For: Bug #329746

I got the same error today when upgrading from 4.2.0a+2sarge1 to
4.2.0a+stable-8.1.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/dash
Kernel: Linux 2.6.12
Locale: LANG=sv_SE.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8)

Versions of packages ntp-server depends on:
ii ntp 1:4.2.0a+stable-8.1 Network Time Protocol: network uti
ii ntp-simple 1:4.2.0a+stable-8.1 Network Time Protocol: daemon for

ntp-server recommends no packages.

-- no debconf information

Revision history for this message
Cristian Aravena Romero (caravena) wrote : error in services: action "start" failed action "restart" failed.and

Subject: ntp-server: Error in services: action "start" failed action "restart" failed.and
Package: ntp-server
Version: 1:4.2.0a+stable-8.1ubuntu3
Severity: normal

* Add in applet of gnome install ntp:

Seleccionando el paquete ntp previamente no seleccionado.
(Leyendo la base de datos ...
98428 ficheros y directorios instalados actualmente.)
Desempaquetando ntp (de .../ntp_1%3a4.2.0a+stable-8.1ubuntu3_i386.deb) ...
Seleccionando el paquete ntp-simple previamente no seleccionado.
Desempaquetando ntp-simple (de .../ntp-simple_1%3a4.2.0a+stable-8.1ubuntu3_i386.deb) ...
Seleccionando el paquete ntp-server previamente no seleccionado.
Desempaquetando ntp-server (de .../ntp-server_1%3a4.2.0a+stable-8.1ubuntu3_i386.deb) ...
 Removing any system startup links for /etc/init.d/ntp-simple ...
 Removing any system startup links for /etc/init.d/ntp-refclock ...
 Removing any system startup links for /etc/init.d/ntp ...
ntpd: no process killed
Configurando ntp (4.2.0a+stable-8.1ubuntu3) ...

Configurando ntp-server (4.2.0a+stable-8.1ubuntu3) ...
User ntp does not exist
invoke-rc.d: initscript ntp-server, action "start" failed.

Configurando ntp-simple (4.2.0a+stable-8.1ubuntu3) ...
 * Stopping NTP server... invoke-rc.d: initscript ntp-server, action "restart" failed.

-- System Information:
Ubuntu Release: Flight 4
  APT prefers dapper
  APT policy: (500, 'dapper')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-16-386
Locale: LANG=es_CL.UTF-8, LC_CTYPE=es_CL.UTF-8 (charmap=UTF-8)

Versions of packages ntp-server depends on:
ii lsb-base 3.0-12ubuntu3 Linux Standard Base 3.0 init scrip
ii ntp 1:4.2.0a+stable-8.1ubuntu3 Network Time Protocol: network uti
ii ntp-simple 1:4.2.0a+stable-8.1ubuntu3 Network Time Protocol: daemon for

ntp-server recommends no packages.

-- no debconf information

Matt Zimmerman (mdz)
Changed in ntp:
assignee: nobody → adconrad
Revision history for this message
x (xk2c-deactivatedaccount) wrote :
Download full text (3.6 KiB)

the user "ntp" does not created when LANG=C isn´t set.

# aptitude install ntp-server
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut... Fertig
Lese erweiterte Statusinformationen
Initialisiere Paketstatus... Fertig
Building tag database... Fertig
Die folgenden Pakete werden zusätzlich automatisch installiert:
  ntp [1:4.2.0a+stable-8.1ubuntu3] (H: ntp-server, S: gnome-system-tools, S: ntp-simple, S: ntpdate)
  ntp-simple [1:4.2.0a+stable-8.1ubuntu3] (H: ntp-server)
Die folgenden Pakete werden zusätzlich installiert:
  ntp [1:4.2.0a+stable-8.1ubuntu3] ntp-server [1:4.2.0a+stable-8.1ubuntu3]
  ntp-simple [1:4.2.0a+stable-8.1ubuntu3]

<snip>

.../ntp_1%3a4.2.0a+stable-8.1ubuntu3_i386.deb) ...
Wähle vormals abgewähltes Paket ntp-simple.
Entpacke ntp-simple (aus .../ntp-simple_1%3a4.2.0a+stable-8.1ubuntu3_i386.deb) ...
Wähle vormals abgewähltes Paket ntp-server.
Entpacke ntp-server (aus .../ntp-server_1%3a4.2.0a+stable-8.1ubuntu3_i386.deb) ...
 Removing any system startup links for /etc/init.d/ntp-simple ...
 Removing any system startup links for /etc/init.d/ntp-refclock ...
 Removing any system startup links for /etc/init.d/ntp ...
ntpd: Kein Prozess beendet
Richte ntp ein (4.2.0a+stable-8.1ubuntu3) ...

Richte ntp-server ein (4.2.0a+stable-8.1ubuntu3) ...
User ntp does not exist
invoke-rc.d: initscript ntp-server, action "start" failed.

Richte ntp-simple ein (4.2.0a+stable-8.1ubuntu3) ...
 * Stopping NTP server... invoke-rc.d: initscript ntp-server, action "restart" failed.

------------------------------------------------------------------------------------
# aptitude purge ntp-server
------------------------------------------------------------------------------------

# LANG=C aptitude install ntp-server
Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following NEW packages will be automatically installed:
  ntp [1:4.2.0a+stable-8.1ubuntu3] (D: ntp-server, S: gnome-system-tools, S: ntp-simple, S: ntpdate)
  ntp-simple [1:4.2.0a+stable-8.1ubuntu3] (D: ntp-server)
The following NEW packages will be installed:
  ntp [1:4.2.0a+stable-8.1ubuntu3] ntp-server [1:4.2.0a+stable-8.1ubuntu3]
  ntp-simple [1:4.2.0a+stable-8.1ubuntu3]
0 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/410kB of archives. After unpacking 930kB will be used.
Do you want to continue? [Y/n/?]
Writing extended state information... Done
Selecting previously deselected package ntp.
(Reading database ... 110977 files and directories currently installed.)
Unpacking ntp (from .../ntp_1%3a4.2.0a+stable-8.1ubuntu3_i386.deb) ...
Selecting previously deselected package ntp-simple.
Unpacking ntp-simple (from .../ntp-simple_1%3a4.2.0a+stable-8.1ubuntu3_i386.deb) ...
Selecting previously deselected package ntp-server.
Unpacking ntp-server (from .../ntp-server_1%3a4.2.0a+stable-8.1ubuntu3_i386.deb) ...
 Removing any system startup links for /etc/init.d/ntp-simple ...
 Removing any system startup links for /etc/init.d/ntp-refclock ...
 Removing any syst...

Read more...

Changed in ntp:
status: Unconfirmed → Confirmed
Revision history for this message
In , Steve Langasek (vorlon) wrote : Re: Bug#365950: ntp-simple must be configured before ntp-server

tags 365950 -moreinfo unreproducible
severity 329746 serious
severity 365950 serious
merge 329746 365950
thanks

On Thu, May 04, 2006 at 03:46:48AM +0200, Laurent Bigonville wrote:
> > Package: ntp-server
> > Priority: optional
> > Section: net
> > Installed-Size: 176
> > Maintainer: Debian NTP Team <email address hidden>
> > Architecture: i386
> > Source: ntp
> > Version: 1:4.2.0a+stable-8.1
> > Replaces: xntp, xntp3, ntp (<= 1:4.1.0-2)
> > Depends: ntp-simple (>> 1:4.2.0a+stable-6) | ntp-refclock (>> 1:4.2.0a+stable-6)
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> > Could you please explain how ntp-server was configured on your system
> > without this dependency being satisfied first? Both ntp-refclock and
> > ntp-simple create the ntp system user in their postinsts in the current
> > unstable version.

> This is the same bug a this one (http://bugs.debian.org/329746)...

> The problem is that ntp-server may be configured before ntp-simple or
> ntp-refclock.

No, a package cannot be configured before the packages it depends on.

Except... that ntp-server and ntp-simple have a circular dependency
relationship. This explains all the symptoms you've described, as well as
those in bug #329746.

Circular dependencies result in an undefined package configuration order,
which defeats one of the main purposes of the Depends: field. So this needs
to be fixed by breaking the loop, not by adding a Pre-Depends.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
<email address hidden> http://www.debian.org/

Revision history for this message
In , Zrin (zrin-it) wrote : ntp: User root does not exist

Package: ntp
Version: 1:4.2.0a+stable-8.1
Followup-For: Bug #329746

The problem lies in the script /etc/init.d/ntp-server
It is buggy.
If the user "ntp" does not exist it will
 echo "User $USER does not exist" >&2
which will print
 User <current user> does not exist
...

This one is kind of amusing but serious bug.
It can provoke a heavy existence crisis.
;))

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (650, 'testing'), (1, 'unstable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.5-amd64-k8-smp
Locale: LANG=C, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)

Versions of packages ntp depends on:
ii libc6 2.3.6-7 GNU C Library: Shared libraries
ii libcap1 1:1.10-14 support for getting/setting
POSIX.
ii libreadline5 5.1-7 GNU readline and history
libraries
ii libssl0.9.8 0.9.8a-8 SSL shared libraries
ii perl-modules 5.8.8-4 Core Perl modules
ii psmisc 22.2-1 Utilities that use the proc
filesy

Versions of packages ntp recommends:
pn ntp-server <none> (no description available)

-- no debconf information

Revision history for this message
Adam Conrad (adconrad) wrote : Re: user "ntp" does not created when LANG=C isn´t set

This has nothing to do with your LANG. It's just that the postinst for ntp-simple ran on the first run, creating the user, so the second run succeeded.

Revision history for this message
Adam Conrad (adconrad) wrote :

 ntp (1:4.2.0a+stable-8.1ubuntu5) dapper; urgency=low
 .
   * Attempt to create the ntp user in ntp-server's postinst, as the
     dependency loops between ntp-server and ntp-* means we have no
     way of knowing which gets configured first (launchpad.net/33351)

Changed in ntp:
status: Confirmed → Fix Released
Revision history for this message
Thijs N (thijsn) wrote : ntp (1:4.2.0a+stable-8.1ubuntu5) did not solve the problem

After updating the system (sudo apt-get update/upgrade), the error was "your system-index has been damaged, try sudo apt-get install -f".

[In Dutch, sorry.]

thijs@Mattheus:~$ sudo apt-get install -f
Password:
Pakketlijsten worden ingelezen... Klaar
Boom van vereisten wordt opgebouwd... Klaar
De volgende extra pakketten zullen geïnstalleerd worden:
  ntp-server
Voorgestelde pakketten:
  ntp-doc
De volgende pakketten zullen opgewaardeerd worden:
  ntp-server
1 pakketten opgewaardeerd, 0 nieuwe pakketten geïnstalleerd, 0 verwijderen en 0 niet opgewaardeerd.
2 pakketten niet volledig geïnstalleerd of verwijderd.
Er moeten 0B/33,3kB aan archieven opgehaald worden.
Na het uitpakken zal er 0B extra schijfruimte gebruikt worden.
Wilt u doorgaan [J/n]? j
(Database inlezen ... 84484 bestanden en mappen geïnstalleerd.)
Voorbereiden om ntp-server 1:4.2.0a+stable-8.1ubuntu4 te vervangen (met .../ntp-server_1%3a4.2.0a+stable-8.1ubuntu5_i386.deb) ...
User ntp does not exist
invoke-rc.d: initscript ntp-server, action "stop" failed.
dpkg: waarschuwing - verouderd pre-removal script gaf een foutcode 1
dpkg - script uit het nieuwe pakket wordt geprobeerd ...
User ntp does not exist
invoke-rc.d: initscript ntp-server, action "stop" failed.
dpkg: fout bij afhandelen van /var/cache/apt/archives/ntp-server_1%3a4.2.0a+stable-8.1ubuntu5_i386.deb (--unpack):
 subproces nieuw pre-removal script gaf een foutwaarde 1 terug
User ntp does not exist
invoke-rc.d: initscript ntp-server, action "start" failed.
dpkg: fout tijdens opruimen:
 subproces post-installation script gaf een foutwaarde 1 terug
Fouten gevonden tijdens behandelen van:
 /var/cache/apt/archives/ntp-server_1%3a4.2.0a+stable-8.1ubuntu5_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
thijs@Mattheus:~$

Revision history for this message
Thijs N (thijsn) wrote :

Sorry, it's "your software-index", not system-index.

Revision history for this message
Bruce Miller (brm0423) wrote :

The fix appears not to work:

bruce@Herodotus:/dev$ sudo apt-get install --reinstall ntp-server
Reading package lists... Done
Building dependency tree... Done
The following packages will be upgraded:
  ntp-server
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 0B/33.3kB of archives.
After unpacking, 0B of additional disk space will be used.
Selecting previously deselected package ntp-server.
(Reading database ... 131874 files and directories currently installed.)
Preparing to replace ntp-server 1:4.2.0a+stable-8.1ubuntu4 (using .../ntp-server_1%3a4.2.0a+stable-8.1ubuntu5_i386.deb) ...
User ntp does not exist
invoke-rc.d: initscript ntp-server, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
User ntp does not exist
invoke-rc.d: initscript ntp-server, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/ntp-server_1%3a4.2.0a+stable-8.1ubuntu5_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
User ntp does not exist
invoke-rc.d: initscript ntp-server, action "start" failed.
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/ntp-server_1%3a4.2.0a+stable-8.1ubuntu5_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
bruce@Herodotus:/dev$ sudo apt-get remove --purge ntp-server
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
  ntp-server* ntp-simple*
0 upgraded, 0 newly installed, 2 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 0B of archives.
After unpacking, 455kB disk space will be freed.
Do you want to continue [Y/n]? y
dpkg: error processing ntp-server (--purge):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
terminate called after throwing an instance of 'std::logic_error'
  what(): basic_string::_S_construct NULL not valid
Aborted
bruce@Herodotus:/dev$ (Reading database ... 131873 files and directories currently installed.)
Removing ntp-simple ...

bruce@Herodotus:/dev$

dpkg at this point hangs and has to be manually aborted (Ctrl-C), necessitating a sudo dpkg --configure -a.

Changed in ntp:
status: Fix Released → Unconfirmed
Revision history for this message
Adam Conrad (adconrad) wrote :

The fix works if you remove the broken versions before installing the new one. The new one didn't attempt to upgrade from the broken one, just fix the breakage. Weighing whether I should fix that now.

Revision history for this message
Thijs N (thijsn) wrote :

Which packages should be removed and reinstalled exactly?
Thanks.

Revision history for this message
E-B (ebelt9hf) wrote :

The fix works for me. I have just made a apt-get upgrade...

Revision history for this message
Bruce Miller (brm0423) wrote : Re: [Bug 33351] Re: user "ntp" does not created

On my up-to-date Dapper system, it is not possible either to remove the package ntp-server because the "package is in a badly inconsistent state" or to re-install it. I attempted to illustrate this with the screen output which I posted earlier today. It is a "chicken-and-egg" problem: which comes first?

Revision history for this message
Thijs N (thijsn) wrote :

I have the same problem as Bruce. I cannot upgrade, remove or reinstall ntp packages.

The update manager has also quit, because of the ntp update problems.

Revision history for this message
Nicklas Svanteson (nicklas-teknister) wrote :

What if you do:

sudo apt-get remove ntp-server ntp-simple
sudo dpkg --purge ntp-server ntp-simple

Revision history for this message
Nicklas Svanteson (nicklas-teknister) wrote :

Forgot to mention that the fix worked for me. However I purged the configuration and removed the old packages before the upgrade.
It should work on a "clean" system.

Revision history for this message
Bruce Miller (brm0423) wrote :
Download full text (4.3 KiB)

> What if you do:

> sudo apt-get remove ntp-server ntp-simple
> sudo dpkg --purge ntp-server ntp-simple

The screen output is reproduced below. In summary:

apt-get remove generates the re-install message for ntp-server, errors out and then hangs while attempting to remove ntp-simple.
Hard aborting (Ctrl-C) requires a dpkg --configure -a which configured a new version of ntp.
dpkg --purge finally purged ntp-simple but left the problems of ntp-server unresolved.

As mentioned earlier, this system is a recent install of Dapper Drake Flight 7 with dist-upgrades at least daily. I am no developer, but have been a "command line hound" since 1982 and CP/M 2.2 so I feel confident when I say that I have done nothing unusual with this particular installation.

bruce@Herodotus:~$ sudo apt-get remove ntp-server ntp-simple && sudo dpkg --purge ntp-server ntp-simple
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
  ntp-server ntp-simple
0 upgraded, 0 newly installed, 2 to remove and 1 not upgraded.
3 not fully installed or removed.
Need to get 0B of archives.
After unpacking, 455kB disk space will be freed.
Do you want to continue [Y/n]? y
dpkg: error processing ntp-server (--remove):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
terminate called after throwing an instance of 'std::logic_error'
  what(): basic_string::_S_construct NULL not valid
Aborted
bruce@Herodotus:~$ (Reading database ... 131873 files and directories currently installed.)
Removing ntp-simple ...

bruce@Herodotus:~$ sudo dpkg --configure -a
Setting up ntp (4.2.0a+stable-8.1ubuntu5) ...

bruce@Herodotus:~$ sudo apt-get install --reinstall ntp-simple
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  ntp-server
The following packages will be upgraded:
  ntp-server
1 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 0B/33.3kB of archives.
After unpacking, 0B of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.
bruce@Herodotus:~$ sudo apt-get install --reinstall ntp-server
Reading package lists... Done
Building dependency tree... Done
The following packages will be upgraded:
  ntp-server
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 0B/33.3kB of archives.
After unpacking, 0B of additional disk space will be used.
Selecting previously deselected package ntp-server.
(Reading database ... 131874 files and directories currently installed.)
Preparing to replace ntp-server 1:4.2.0a+stable-8.1ubuntu4 (using .../ntp-server_1%3a4.2.0a+stable-8.1ubuntu5_i386.deb) ...
User ntp does not exist
invoke-rc.d: initscript ntp-server, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
User ntp does not exist
invoke-rc.d: initscript ntp-server, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/ntp-server_1%3a4.2.0a+stable-8.1ubuntu5_i386.deb (--unpack):
 subprocess new p...

Read more...

Revision history for this message
Adam Conrad (adconrad) wrote :

Fixed harder in ntp_4.2.0a+stable-8.1ubuntu6.

Changed in ntp:
status: Unconfirmed → Fix Released
Revision history for this message
Thijs N (thijsn) wrote :

On 5/29/06, Adam Conrad <adconrad@0c3.net> wrote:
>
> Fixed harder in ntp_4.2.0a+stable-8.1ubuntu6.

It worked for me, thanks!

Revision history for this message
Bruce Miller (brm0423) wrote :

The fix in version 4.2.0a+stable-8.1ubuntu6 worked here. Thank you very much.

Revision history for this message
x (xk2c-deactivatedaccount) wrote :

Thank you Adam.

Revision history for this message
In , Martin Schuster (martin-schuster) wrote : simple workaround

Hope this helps if someone has the same problem:

After getting the above error, put an
exit 0
in the second line of /etc/init.d/ntp-server

Then do an
dpkg --configure -a
which should then happily configure ntp-simple,
thus creating the user

Afterwards, remove the exit-statement from the
initscript,
/etc/init.d/ntp-server start
and everything should be fine :)

hth,
--
Martin Schuster <email address hidden>
CenterPoint http://www.centerpoint.eu.com/

Revision history for this message
In , Peter Eisentraut (petere) wrote : unmerging 348744, severity of 348744 is serious, merging 348744 365950

# Automatically generated email from bts, devscripts version 2.9.20
unmerge 348744
severity 348744 serious
merge 348744 365950

Revision history for this message
In , Peter Eisentraut (petere) wrote : setting package to ntp ntpdate ntp-doc ntp-refclock ntp-server ntp-simple, tagging 302127 ... ... ... ...

# Automatically generated email from bts, devscripts version 2.9.20
package ntp ntpdate ntp-doc ntp-refclock ntp-server ntp-simple
tags 302127 + pending
tags 308496 + pending
tags 312331 + pending
tags 327012 + pending
tags 365950 + pending

Revision history for this message
In , Peter Eisentraut (petere) wrote : setting package to ntp ntpdate ntp-doc ntp-refclock ntp-server ntp-simple, tagging 269572 ... ... ... ... ... ...

# Automatically generated email from bts, devscripts version 2.9.20
package ntp ntpdate ntp-doc ntp-refclock ntp-server ntp-simple
tags 269572 + pending
tags 302127 + pending
tags 308496 + pending
tags 312331 + pending
tags 327012 + pending
tags 349392 + pending
tags 365950 + pending

Revision history for this message
In , Kurt Roeckx (kurt-roeckx) wrote : Re: ntp-simple must be configured before ntp-server.

Hi,

Current svn looks like:
Package: ntp-server
Depends: ntp-simple (>> 1:4.2.0a+stable-6) | ntp-refclock (>> 1:4.2.0a+stable-6), ntp

Package: ntp-refclock
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
Recommends: ntp-server (= ${Source-Version})

Package: ntp-simple
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
Recommends: ntp-server (= ${Source-Version})

And this seems to be about what the bug suggest, but I'm not sure
this really is what we want.

I think we want ntp-server to:
Recommends: ntp-simple | ntp-refclock

And ntp-refclock and ntp-simple to:
Depends: ntp-server

ntp-server does not create the user, but it's useless without an
ntp-simple or ntp-refclock. Nothing in ntp-server itself
_should_ be needing the init.d script, it just provides it. It's
like a "-common" package.

ntp-server provides things like the init.d script, the ntp.conf
file, and those are needed by ntp-simple and ntp-refclock. So it
makes more sense to have those depend on ntp-server.

The bug seems to suggest that this won't work, and I don't know
why exactly yet. Setting up ntp-server before ntp-simple works
without problems here. So, I'll need to take a closer look.

Kurt

Revision history for this message
In , Peter Eisentraut (petere) wrote : Re: Bug#329746: ntp-simple must be configured before ntp-server.

Kurt Roeckx wrote:
> ntp-server does not create the user, but it's useless without an
> ntp-simple or ntp-refclock. Nothing in ntp-server itself
> _should_ be needing the init.d script, it just provides it. It's
> like a "-common" package.

Well, I outlined the two possibilities earlier. If you want the
dependencies to be the other way around, then the user creation stuff
needs to be moved to the ntp-server package and the init script needs
to be made safe against the ntpd binary not existing. The current
state just needed a tweak in the dependency declaration, which
indicates that this is the setup that was originally intended.

The other advantage is that "apt-get install ntp-server" now does
something useful for the user, namely install an NTP server, whereas
the other way around people would have to dig into the package
descriptions to figure out what they need.

Another thought is to fold the ntp-simple and ntp-refclock packages into
ntp-server and handle the choice via alternatives or some other simple
switch. Because this package splitting is altogether too complicated.
But the problem at hand is to fix the circular dependency, in this does
it.

Revision history for this message
In , Kurt Roeckx (kurt-roeckx) wrote :

On Sat, Jun 17, 2006 at 12:29:25AM +0200, Peter Eisentraut wrote:
> Another thought is to fold the ntp-simple and ntp-refclock packages into
> ntp-server and handle the choice via alternatives or some other simple
> switch.

I actually have no idea why it was splitted in 2 packages. Afaik
the only difference is that one has all the clocks build in, and
the other doesn't. This results in a difference of the size of
the binary, 200K versus 400K, and I guess a difference in memory
usage. The later seems to be the actual reason why it was split,
and seems to be 450K difference in RAM used.

Anyway, I think we should either go for having 1 package
providing both, or have ntp-server be a dummy and empty packages
just having the depends. Maybe we should move those binaries in
ntp-server to the ntp package?

Kurt

Revision history for this message
In , Peter Eisentraut (petere) wrote :

Kurt Roeckx wrote:
> Anyway, I think we should either go for having 1 package
> providing both, or have ntp-server be a dummy and empty packages
> just having the depends. Maybe we should move those binaries in
> ntp-server to the ntp package?

I think dropping ntp-simple and ntp-refclock and putting the binary into
ntp-server is a good idea. It's not like a resource-strapped system
would use ntp-server anyway; they can use ntpdate.

But perhaps such a change should be made on the second upload when we
have a little more handle on this. ;-)

Revision history for this message
In , Bdale Garbee (bdale) wrote : Re: [debian-ntp] Bug#329746: ntp-simple must be configured before ntp-server.

On Sat, 2006-06-17 at 01:24 +0200, Kurt Roeckx wrote:

> I actually have no idea why it was splitted in 2 packages. Afaik
> the only difference is that one has all the clocks build in, and
> the other doesn't. This results in a difference of the size of
> the binary, 200K versus 400K, and I guess a difference in memory
> usage. The later seems to be the actual reason why it was split,
> and seems to be 450K difference in RAM used.

Yes.

Actually, originally there was just an ntp (or xntp, depending on when
in history) package. When I turned on all the refclocks, someone
complained that the daemon was now large and consumed a lot of memory
for the client case... so, I split it into three packages, ntp-simple
and ntp-refclock with just the daemon binary, and ntp had the rest. The
split of ntp and ntp-server was another step in giving more control over
which user space binaries and so forth are present.

I personally don't find the 'ntp-server' package name obvious at all.
If I'm going to do an apt-get, 'ntp' seems much more natural to me.
Don't know that it matters much, but if someone installs 'ntp', it'd be
nice if they're left with a system that's time-synced in at least a
trivial way.

It wouldn't bother me at all if this all went back to just one package,
'ntp', which used a debconf question and either an /etc/defaults/ntp
entry or alternatives to control which daemon binary gets run. Keeping
two versions of the daemon binary probably makes sense, but any real
time lord is going to generate a kernel with the nano patchset and
rebuild the daemon against that kernel's nano interface, so the
ntp-refclock package is to my mind of only mild interest these days.

Hope that helps.

Bdale

Changed in ntp-server:
status: Unconfirmed → Fix Committed
Changed in ntp-server:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.