Upgrade from 11.10 to Precise: resolvconf 1.63ubuntu7 fails to configure with "cp: cannot create regular file `/run/resolvconf/resolv.conf': No such file or directory"

Bug #933035 reported by machak
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
resolvconf (Ubuntu)
Expired
Medium
Unassigned

Bug Description

error after upgrade from 11.10

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: resolvconf 1.63ubuntu7
ProcVersionSignature: Ubuntu 3.2.0-16.25-generic 3.2.6
Uname: Linux 3.2.0-16-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
Date: Wed Feb 15 20:38:25 2012
DuplicateSignature:
 Setting up resolvconf (1.63ubuntu7) ...
 cp: cannot create regular file `/run/resolvconf/resolv.conf': No such file or directory
 dpkg: error processing resolvconf (--configure):
  subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitecture: all
SourcePackage: resolvconf
Title: package resolvconf 1.63ubuntu7 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to precise on 2012-02-15 (0 days ago)

Revision history for this message
machak (machak) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Brian Murray (brian-murray) wrote :

How did you go about installing Ubuntu 11.10? Did you install from a usb stick, if so what software did you use to make that disk?

Additionally, could you please add the log files in /var/log/dist-upgrade to your bug report? Thanks in advance!

Changed in resolvconf (Ubuntu):
status: New → Incomplete
Thomas Hood (jdthood)
Changed in resolvconf (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Thomas Hood (jdthood) wrote :

(Apologies if I'm using "Confirmed" incorrectly. I mean that it seems clear now that this is a real bug. On the other hand we don't yet know exactly what the bug is. Switch the status back if I've misunderstood.)

Please also provide the output of the "mount" command .

Thomas Hood (jdthood)
summary: - package resolvconf 1.63ubuntu7 failed to install/upgrade: subprocess
- installed post-installation script returned error exit status 1
+ Upgrade from 11.10 to Precise: resolvconf 1.63ubuntu7 fails to configure
+ with "cp: cannot create regular file `/run/resolvconf/resolv.conf': No
+ such file or directory"
Revision history for this message
Thomas Hood (jdthood) wrote :

I was able to reproduce the reported behavior by rebooting in the middle of the upgrade, after resolvconf has been unpacked and its preinst run, but before its configuration files have been installed and the package configured. Then the /run/resolvconf that was created in resolvconf.preinst gets lost but the resolvconf upstart job has not been enabled yet (i.e., the file is still called '/etc/init/resolvconf.conf.dpkg-new') so /run/resolvconf is not created on boot either. Then in resolvconf.postinst the line

        cp -a /etc/resolv.conf /run/resolvconf/resolv.conf

which comes *before*

        invoke-rc.d resolvconf start || exit $?

fails with "cp: cannot create regular file `/run/resolvconf/resolv.conf': No such file or directory".

The installation continues and at the end prints that resolvconf failed configuration. Then a new apt operation retries the configuration step resulting in another failure exactly like the one reported here (#933035).

Whether or not both this report (#933035) and its duplicate (#927300) were submitted for systems that were rebooted between preinst and conffile-installation of resolvconf, there is at least one bug. Resolvconf.postinst should not rely upon the presence of /run/resolvconf/interface but should create it, because such reboots are physically possible and the package shouldn't be broken by them. A

    mkdir -p /run/resolvconf/interface

command is needed early in the "configure" code in resolvconf.postinst.

Revision history for this message
Steve Langasek (vorlon) wrote :

it is incomplete, because we need more information from the submitter to make any headway here.

Changed in resolvconf (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote :

(we can guard against the possibility of a reboot between preinst and postinst easily enough, but it's not really clear that this is the cause of the bug people are seeing.)

Steve Langasek (vorlon)
Changed in resolvconf (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Thomas Hood (jdthood) wrote :

> (we can guard against the possibility of a reboot between
> preinst and postinst easily enough[...])

Fix for this has been committed: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/precise/resolvconf/precise/revision/47

Revision history for this message
Thomas Hood (jdthood) wrote :

machak: Can you reproduce this error with the latest Precise (including resolvconf 1.63ubuntu8)?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for resolvconf (Ubuntu) because there has been no activity for 60 days.]

Changed in resolvconf (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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