[SRU] package nis 3.17-32ubuntu1.2 failed to install/upgrade: invoke-rc.d: unknown initscript, /etc/init.d/nis not found.

Bug #993291 reported by Sean Whitney on 2012-05-02
58
This bug affects 8 people
Affects Status Importance Assigned to Milestone
nis (Ubuntu)
Medium
James Page
Oneiric
Medium
Steve Langasek
Precise
Medium
James Page
Quantal
Medium
James Page

Bug Description

[Impact]
Users running the version of nis currently in oneiric-proposed will experience an upgrade failure to 12.04. This version (3.17-32ubuntu1.2) already converts systems to upstart; the package in 12.04 checks for < 3.17-32ubuntu2 resulting in an error when trying to stop the nis service (which no longer exists).

I considered checking for 3.17-32ubuntu1.1 in the precise SRU; however if this gets bumped out of -proposed then upgrades will start to break again; moving the calls to invoke-rc.d and update-rc.d inside the block which checks for the existence of the init.d script should resolve this in a slightly more resilient fashion,

[Test Case]
Enable oneiric-proposed
sudo apt-get update
sudo apt-get install nis
sudo apt-get install update-manager-core (if not already installed)
sudo do-release-upgrade
...
nis pre-installation script will fail with error code 100.

[Regression Potential]
Minimal; this is purely a maintainer script change to make the upgrade process from oneiric-proposed work.

[Original Bug Report]
During upgrade from 11.10 to 12.04 the nis package failed to install

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: nis 3.17-32ubuntu1.2
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic i686
ApportVersion: 2.0.1-0ubuntu7
Architecture: i386
Date: Tue May 1 12:56:35 2012
ErrorMessage: ErrorMessage: subprocess new pre-installation script returned error exit status 100
SourcePackage: nis
Title: package nis 3.17-32ubuntu1.2 failed to install/upgrade: ErrorMessage: subprocess new pre-installation script returned error exit status 100
UpgradeStatus: Upgraded to precise on 2012-05-01 (0 days ago)

Sean Whitney (sean-whitney) wrote :
James Page (james-page) wrote :

(Reading database ... 646980 files and directories currently installed.)
Preparing to replace nis 3.17-32ubuntu1.2 (using .../nis_3.17-32ubuntu4_i386.deb) ...
invoke-rc.d: unknown initscript, /etc/init.d/nis not found.
dpkg: error processing /var/cache/apt/archives/nis_3.17-32ubuntu4_i386.deb (--unpack):
 subprocess new pre-installation script returned error exit status 100

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nis (Ubuntu):
status: New → Confirmed
James Page (james-page) on 2012-05-17
Changed in nis (Ubuntu):
importance: Undecided → Medium
summary: - package nis 3.17-32ubuntu1.2 failed to install/upgrade: ErrorMessage:
- subprocess new pre-installation script returned error exit status 100
+ package nis 3.17-32ubuntu1.2 failed to install/upgrade: invoke-rc.d:
+ unknown initscript, /etc/init.d/nis not found.

Thanks for taking the time to report this bug in Ubuntu.

For some reason the /etc/init.d/nis init script is not present when the preinst script for the new version of nis is executed during the upgrade process.

Please can you provide the output from the following commands on this bug report:

     ls -l /etc/init.d/nis

Marking 'Incomplete' pending your response.

Please note that any of the reporters of duplicate bugs can also provide this information.

Thanks

Changed in nis (Ubuntu):
status: Confirmed → Incomplete

ls -l /etc/init.d/nis
ls: cannot access /etc/init.d/nis: No such file or directory

Sean

On 05/17/2012 03:09 AM, James Page wrote:
> Thanks for taking the time to report this bug in Ubuntu.
>
> For some reason the /etc/init.d/nis init script is not present when the
> preinst script for the new version of nis is executed during the upgrade
> process.
>
> Please can you provide the output from the following commands on this
> bug report:
>
> ls -l /etc/init.d/nis
>
> Marking 'Incomplete' pending your response.
>
> Please note that any of the reporters of duplicate bugs can also provide
> this information.
>
> Thanks
>
>
> ** Changed in: nis (Ubuntu)
> Importance: Undecided => Medium
>
> ** Summary changed:
>
> - package nis 3.17-32ubuntu1.2 failed to install/upgrade: ErrorMessage: subprocess new pre-installation script returned error exit status 100
> + package nis 3.17-32ubuntu1.2 failed to install/upgrade: invoke-rc.d: unknown initscript, /etc/init.d/nis not found.
>
> ** Changed in: nis (Ubuntu)
> Status: Confirmed => Incomplete
>

--
Science is not an exercise in consensus.

the Output you requested is as follows:
 ls -l /etc/init.d/nis
ls: cannot access /etc/init.d/nis: No such file or directory

thanks in advance

> Thanks for taking the time to report this bug in Ubuntu.
>
> For some reason the /etc/init.d/nis init script is not present when the
> preinst script for the new version of nis is executed during the upgrade
> process.
>
> Please can you provide the output from the following commands on this
> bug report:
>
> ls -l /etc/init.d/nis
>
> Marking 'Incomplete' pending your response.
>
> Please note that any of the reporters of duplicate bugs can also provide
> this information.
>
> Thanks
>
>
> ** Changed in: nis (Ubuntu)
> Importance: Undecided => Medium
>
> ** Summary changed:
>
> - package nis 3.17-32ubuntu1.2 failed to install/upgrade: ErrorMessage:
> subprocess new pre-installation script returned error exit status 100
> + package nis 3.17-32ubuntu1.2 failed to install/upgrade: invoke-rc.d:
> unknown initscript, /etc/init.d/nis not found.
>
> ** Changed in: nis (Ubuntu)
> Status: Confirmed => Incomplete
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (999101).
> https://bugs.launchpad.net/bugs/993291
>
> Title:
> package nis 3.17-32ubuntu1.2 failed to install/upgrade: invoke-rc.d:
> unknown initscript, /etc/init.d/nis not found.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/nis/+bug/993291/+subscriptions
>

Download full text (5.1 KiB)

This really an easy work around please a dummy nis script in the /etc/init.d/ directory, when you run update of the update package it changes the name of the nis script to nis.dpkg-bak which allows the upgrade to succeed.

place the following contents in /etc/init.d/nis and chmod it 755.
Then run the upgrade to package nis_3.17-32ubuntu4_i386.deb

script::

#!/bin/sh
#
# /etc/init.d/nis Start NIS (formerly YP) daemons.
#
### BEGIN INIT INFO
# Provides: ypbind ypserv ypxfrd yppasswdd
# Required-Start: $network $portmap
# Required-Stop: $portmap
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: Start NIS client and server daemons.
# Description: Start NIS client and server daemons. NIS is mostly
# used to let several machines in a network share the
# same account information (eg the password file).
### END INIT INFO

# Customize the variables in /etc/default/nis rather than here
NISSERVER=false
NISMASTER=
YPPWDDIR=/etc
YPCHANGEOK=chsh
YPSERVARGS=""
YPBINDARGS=""
YPPASSWDDARGS=""
YPXFRDARGS=""
YPPWDDIRARGS=""

[ -f /etc/default/nis ] && . /etc/default/nis

. /lib/lsb/init-functions

NET="/usr/sbin"
test -f ${NET}/ypbind -a -f /etc/defaultdomain || exit 0

#
# If ypbind broadcasts for the default domain, we may not be bound to
# any server yet (note that you can set broadcast in yp.conf for the
# default domain without ypbind being run with -broadcast)
#
bind_wait()
{
 [ "`ypwhich 2>/dev/null`" = "" ] && sleep 1

 if [ "`ypwhich 2>/dev/null`" = "" ]
 then
  bound=""
  log_action_begin_msg "binding to YP server"
  for i in 1 2 3 4 5 6 7 8 9 10
  do
   sleep 1
   log_action_cont_msg "."
   if [ "`ypwhich 2>/dev/null`" != "" ]
   then
    echo -n " done] "
    bound="yes"
    break
   fi
  done
  # This should potentially be an error
  if [ "$bound" ] ; then
   log_action_end_msg 0
  else
   log_action_end_msg 1 "backgrounded"
  fi
 fi
}

#
# Do we want ypbind to be started? On a laptop without ethernet
# maybe not just yet - /etc/network/if-up.d will take care of it.
#
want_ypbind()
{
 # NIS servers always get ypbind since yppush wants it.
 case "$NISSERVER" in
  master|slave|[Yy]*)
   return 0
   ;;
 esac

 # Do we want to run as a NIS client anyway?
 case "$NISCLIENT" in
  false|[nN]*)
   return 1
   ;;
 esac

 # Executable present ?
 if ! [ -x ${NET}/ypbind ]
 then
  return 1
 fi

 # Started manually?
 if [ "$manual" != "" ]
 then
  return 0
 fi

 #
 # For now, we do not use the /etc/network/if-{up,down}.d
 # stuff yet. Not sure if it is useful for NIS or how
 # it should work, exactly.
 #
 return 0

 #
 # If the network is not up yet, do not start ypbind.
 # We assume that /etc/network/ifup.d will start ypbind.
 # It doesn't matter if it already did.
 #
 network=`route -n | sed -ne '/^224/d' -e '/^127/d' -e '/^[0-9]/p'`
 if [ "$network" = "" ]
 then
  return 1
 fi

 return 0
}

do_start ()
{
 oname=`domainname`
 nname=`cat /etc/defaultdomain`
 if [ "$oname" != "$nname" ]; then
  log_action_msg "Setting NIS domainname to: $nname"
  domainname "$nname"
 fi
 log_daemon_msg "Starting NIS services"
 if [ "$NISSERVER" != "false" ]
 then
  log_progress_msg "ypserv"
  start-stop-daemon --start --quiet \
   --pidfile /var/run/...

Read more...

James Page (james-page) wrote :

I've not been able to reproduce the specific upgrade scenario which produces this bug but the nis preinst script could handle return codes from invoke-rc.d better than it does at the moment to deal with this problem.

Marking 'Confirmed' and Importance 'Medium' due to the number of bug reports about this issue.

Nominating for precise and quantal as this should be SRU'ed once fixed in dev.

Changed in nis (Ubuntu):
status: Incomplete → Confirmed
Changed in nis (Ubuntu Precise):
status: New → Confirmed
importance: Undecided → Medium
summary: - package nis 3.17-32ubuntu1.2 failed to install/upgrade: invoke-rc.d:
- unknown initscript, /etc/init.d/nis not found.
+ [SRU] package nis 3.17-32ubuntu1.2 failed to install/upgrade: invoke-
+ rc.d: unknown initscript, /etc/init.d/nis not found.
Changed in nis (Ubuntu Precise):
status: Confirmed → Triaged
Changed in nis (Ubuntu Quantal):
status: Confirmed → Triaged
James Page (james-page) on 2012-05-31
Changed in nis (Ubuntu Precise):
milestone: none → ubuntu-12.04.1
James Page (james-page) on 2012-06-11
Changed in nis (Ubuntu Quantal):
assignee: nobody → James Page (james-page)
Changed in nis (Ubuntu Precise):
assignee: nobody → James Page (james-page)
James Page (james-page) wrote :

nis 3.17-32ubuntu1 -> 3.17-32ubuntu4 : OK
nis 3.17-32ubuntu1.2 -> 3.17-32ubuntu4 : FAIL

3.17-32ubuntu1.2 is still in -proposed which is why I could not reproduce easily...

James Page (james-page) wrote :

1.1 switch to upstart - hence why it fails from upgrade from -proposed.

nis (3.17-32ubuntu1.2) oneiric-proposed; urgency=low

  * debian/nis.ypbind.upstart: don't try to start ypserv if NISSERVER=false.

nis (3.17-32ubuntu1.1) oneiric-proposed; urgency=low

  * Convert to native upstart jobs, with a versioned dependency on
    upstart (>= 0.9.7-2) because we use the wait-for-state job. LP: #569757.
  * Depend on rpcbind (>= 0.2.0-6ubuntu1) instead of portmap to ensure our
    upstart job dependencies are satisfied.

I still think the maintainer script could be more resilient to this condition.

James Page (james-page) on 2012-06-25
Changed in nis (Ubuntu Quantal):
status: Triaged → In Progress
Changed in nis (Ubuntu Precise):
status: Triaged → In Progress
James Page (james-page) on 2012-06-25
description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nis - 3.17-32ubuntu5

---------------
nis (3.17-32ubuntu5) quantal; urgency=low

  * debian/preinst: Check for existence of /etc/init.d/nis before
    attempting to stop nis and remove its init.d script (LP: #993291).
 -- James Page <email address hidden> Mon, 25 Jun 2012 16:55:01 +0100

Changed in nis (Ubuntu Quantal):
status: In Progress → Fix Released
James Page (james-page) wrote :

Uploaded to precise-proposed for SRU team review.

Hello Sean, or anyone else affected,

Accepted nis into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/nis/3.17-32ubuntu4.1 in a few hours and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case details of your testing will help us make a better decision. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in nis (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Sebastien Bacher (seb128) wrote :

Could somebody confirm that fix?

The fix seems to have worked. There is no /etc/init.d/nis and no error.
 The package has installed without error and is functional.

Sean

On 07/09/2012 01:29 PM, Sebastien Bacher wrote:
> Could somebody confirm that fix?
>

--
Science is not an exercise in consensus.

Stéphane Graber (stgraber) wrote :

Marking verification-done based on comment above. Thanks for testing.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nis - 3.17-32ubuntu4.1

---------------
nis (3.17-32ubuntu4.1) precise-proposed; urgency=low

  * Fix upgrades from nis 3.17-32ubuntu1.2 (in oneiric-proposed) which
    have already converted to upstart (LP: #993291):
    - debian/preinst: Check for existence of /etc/init.d/nis before
      attempting to stop nis and remove its init.d script.
 -- James Page <email address hidden> Mon, 25 Jun 2012 16:56:29 +0100

Changed in nis (Ubuntu Precise):
status: Fix Committed → Fix Released
Steve Langasek (vorlon) wrote :

This also affects the natty->oneiric SRU upgrade path, so I've uploaded this fix to oneiric-proposed too.

Changed in nis (Ubuntu Oneiric):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Steve Langasek (vorlon)

Hello Sean, or anyone else affected,

Accepted nis into oneiric-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/nis/3.17-32ubuntu1.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in nis (Ubuntu Oneiric):
status: In Progress → Fix Committed
tags: removed: verification-done
tags: added: verification-needed

Sorry, I've verified this as completed for precise, but I don't have an
oneiric installation to test.

Sean

On 08/09/2012 02:56 PM, Brian Murray wrote:
> Hello Sean, or anyone else affected,
>
> Accepted nis into oneiric-proposed. The package will build now and be
> available at http://launchpad.net/ubuntu/+source/nis/3.17-32ubuntu1.3 in
> a few hours, and then in the -proposed repository.
>
> Please help us by testing this new package. See
> https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
> enable and use -proposed. Your feedback will aid us getting this update
> out to other Ubuntu users.
>
> If this package fixes the bug for you, please change the bug tag from
> verification-needed to verification-done. If it does not, change the
> tag to verification-failed. In either case, details of your testing
> will help us make a better decision.
>
> Further information regarding the verification process can be found at
> https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
> advance!
>
> ** Changed in: nis (Ubuntu Oneiric)
> Status: In Progress => Fix Committed
>
> ** Tags removed: verification-done
>
> ** Tags added: verification-needed
>

--
You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to
do something about it. From out there on the moon, international
politics look so petty. You want to grab a politician by the scruff of
the neck and drag him a quarter of a million miles out and say, "Look at
that, you son of a bitch."
 - Edgar Mitchell, Apollo 14 astronaut, People magazine, 8 April 1974.

Brian Murray (brian-murray) wrote :

The fix for the this bug has been awaiting testing feedback in the -proposed repository for oneiric for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now the package will be removed from the -proposed repository.

tags: added: removal-candidate
Brian Murray (brian-murray) wrote :

The version of nis in oneiric-proposed has been removed as the bugs it was fixing (including this one) were not verified in a timely fashion.

tags: removed: verification-needed
tags: removed: removal-candidate
Changed in nis (Ubuntu Oneiric):
status: Fix Committed → Triaged
dino99 (9d9) wrote :

Oneiric is EOL out now

Changed in nis (Ubuntu Oneiric):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers