resolvconf 1.63ubuntu12 failed to install/upgrade -- "lsattr: Inappropriate ioctl for device While reading flags on /etc/resolv.conf"

Bug #994539 reported by fer
44
This bug affects 6 people
Affects Status Importance Assigned to Milestone
resolvconf (Ubuntu)
Fix Released
High
Stéphane Graber
Precise
Fix Released
High
Stéphane Graber
Quantal
Fix Released
High
Stéphane Graber

Bug Description

upgrading from 11.10 and it show error on upgrade resolvconf package

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: resolvconf 1.63ubuntu12
ProcVersionSignature: Ubuntu 3.2.0-24.38-generic-pae 3.2.16
Uname: Linux 3.2.0-24-generic-pae i686
ApportVersion: 2.0.1-0ubuntu7
Architecture: i386
Date: Fri May 4 19:58:05 2012
ErrorMessage: ErrorMessage: subprocess installed post-installation script returned error exit status 20
InstallationMedia: Ubuntu 10.04.3 LTS "Lucid Lynx" - Release i386 (20110720.1)
PackageArchitecture: all
SourcePackage: resolvconf
Title: package resolvconf 1.63ubuntu12 failed to install/upgrade: ErrorMessage: subprocess installed post-installation script returned error exit status 20
UpgradeStatus: Upgraded to precise on 2012-05-04 (0 days ago)

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

VarLogDistupgradeTermlog:

Setting up resolvconf (1.63ubuntu12) ...
lsattr: Inappropriate ioctl for device While reading flags on /etc/resolv.conf
dpkg: error processing resolvconf (--configure):
 subprocess installed post-installation script returned error exit status 20

summary: - package resolvconf 1.63ubuntu12 failed to install/upgrade: ErrorMessage:
- subprocess installed post-installation script returned error exit status
- 20
+ resolvconf 1.63ubuntu12 failed to install/upgrade -- "lsattr:
+ Inappropriate ioctl for device While reading flags on /etc/resolv.conf"
Revision history for this message
Stéphane Graber (stgraber) wrote :

Are you using reiserfs by any chance? or any non-ext filesystem?

root@castiana:~/Desktop/test/mnt# ls
root@castiana:~/Desktop/test/mnt# touch bla
root@castiana:~/Desktop/test/mnt# lsattr bla
lsattr: Inappropriate ioctl for device While reading flags on bla
root@castiana:~/Desktop/test/mnt# grep reiserfs /proc/mounts
/dev/loop0 /home/stgraber/Desktop/test/mnt reiserfs rw,relatime 0 0
root@castiana:~/Desktop/test/mnt# ls
bla
root@castiana:~/Desktop/test/mnt# lsattr bla
lsattr: Inappropriate ioctl for device While reading flags on bla
root@castiana:~/Desktop/test/mnt# echo $?
1

From their manpage lsattr/chattr are designed for ext filesystems, there isn't any guarantee that they'll work on something else.

Based on that, it should be safe to ignore that specific error as chattr wouldn't have worked on such a system either and so resolv.conf can't possibly be immutable.

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

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

Changed in resolvconf (Ubuntu):
status: New → Confirmed
Steve Langasek (vorlon)
Changed in resolvconf (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Changed in resolvconf (Ubuntu Precise):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Stéphane Graber (stgraber)
Changed in resolvconf (Ubuntu Quantal):
assignee: nobody → Stéphane Graber (stgraber)
Revision history for this message
Steve Langasek (vorlon) wrote :

Stéphane, can you please follow through on this? This seems to be a regression from the version in precise, for a non-obvious reason - the subshell created by use of echo_first_arg $(lsattr ...) doesn't trigger the set -e handling. But I think we should address that explicitly here rather than relying on the side effect of a subshell.

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

And worse, I managed to botch the syntax of db_input here, which is why we're getting the strange exit code (exit 20) - that much at least I've fixed now, and pushed to Ubuntu trunk, but the lsattr still needs to be handled correctly so that we don't wind up on this code path on !ext.

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

Scott, out of curiosity, what filesystem are you using in these cloud images such that lsattr is not supported?

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

Steve: Does the db_input issue explain #995778?

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 994539] Re: resolvconf 1.63ubuntu12 failed to install/upgrade -- "lsattr: Inappropriate ioctl for device While reading flags on /etc/resolv.conf"

On Mon, May 07, 2012 at 06:25:57AM -0000, Thomas Hood wrote:
> Steve: Does the db_input issue explain #995778?

No. 995778 looks like a broken system - and the submitter has noticed this
himself now.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello fer, or anyone else affected,

Accepted resolvconf into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in resolvconf (Ubuntu Precise):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package resolvconf - 1.65ubuntu2

---------------
resolvconf (1.65ubuntu2) quantal; urgency=low

  [ Stéphane Graber ]
  * In is_immutable_file, if lsattr doesn't return anything on stdout,
    return 1 and hide stderr. This fixes lsattr failing on non-ext
    filesystems. (LP: #994539)

  [ Steve Langasek ]
  * Fix syntax of db_input command, which is part of why we're seeing
    failures in bug #994539.
 -- Stephane Graber <email address hidden> Mon, 07 May 2012 16:01:08 -0700

Changed in resolvconf (Ubuntu Quantal):
status: Triaged → Fix Released
Revision history for this message
Leonardo Ludueña (elnomade) wrote :
Download full text (3.2 KiB)

Fix worked fine

Need to get 53.5 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://espelhos.edugraf.ufsc.br/ubuntu/ precise-proposed/main resolvconf all 1.63ubuntu13 [53.5 kB]
Fetched 53.5 kB in 2s (21.6 kB/s)
Setting up resolvconf (1.63ubuntu12) ...
lsattr: Inappropriate ioctl for device While reading flags on /etc/resolv.conf
dpkg: error processing resolvconf (--configure):
 subprocess installed post-installation script returned error exit status 20
Errors were encountered while processing:
 resolvconf
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@mycomputer:/etc/apt# cd /var/cache/apt/archives/
root@mycomputer:/var/cache/apt/archives# ls -lha resolvconf_1.63ubuntu1*
-rw-r--r-- 1 root root 53K May 3 09:34 resolvconf_1.63ubuntu12_all.deb
-rw-r--r-- 1 root root 53K May 7 21:03 resolvconf_1.63ubuntu13_all.deb
root@mycomputer:/var/cache/apt/archives# dpkg -i resolvconf_1.63ubuntu13_all.deb
(Reading database ... 613053 files and directories currently installed.)
Preparing to replace resolvconf 1.63ubuntu12 (using resolvconf_1.63ubuntu13_all.deb) ...
Unpacking replacement resolvconf ...
Setting up resolvconf (1.63ubuntu13) ...
resolvconf start/running
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Processing triggers for resolvconf ...

root@mycomputer:/# dpkg -s resolvconf; date
Package: resolvconf
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 237
Maintainer: Ubuntu Developers <email address hidden>
Architecture: all
Version: 1.63ubuntu13
Depends: lsb-base, debconf (>= 0.5) | debconf-2.0, upstart-job
Pre-Depends: initscripts (>= 2.88dsf-13.10)
Breaks: dhcp3-client (<< 4.1.1-P1-15+squeeze1), dnscache-run
Enhances: bind9, dhcpcd, dnsmasq, ifupdown, isc-dhcp-client, libc6, network-manager, nscd, pdnsd, ppp, pump, totd, udhcpc
Conffiles:
 /etc/network/if-up.d/000resolvconf a2f1e5660e827944e6b8956b6a23eafa
 /etc/network/if-down.d/resolvconf ff6457564bdc53d244529166804a076f
 /etc/dhcp/dhclient-enter-hooks.d/resolvconf e33c0fb778b7a0994e3a7e6a83b4034f
 /etc/resolvconf/interface-order 33e6b76aa10b1cbe72c6c050df536560
 /etc/resolvconf/resolv.conf.d/base d41d8cd98f00b204e9800998ecf8427e
 /etc/resolvconf/resolv.conf.d/head 5aee5a60350035d958401da5c0432be3
 /etc/resolvconf/update.d/dnscache 981435dcc6f7b53a9fa7a0bdfbdaf5e0
 /etc/resolvconf/update.d/libc 9d46e648e13f96e1d67f2fec9ec20a58
 /etc/init/resolvconf.conf 355033f68372631d1b72b039347ec3a0
 /etc/ppp/ip-up.d/000resolvconf 9b176005cabc49225a6f44761e40bab2
 /etc/ppp/ip-down.d/000resolvconf 125638dbca92100af3f8a289d85c5d85
Description: name server information handler
 Resolvconf is a framework for keeping up to date the system's
 information about name servers. It sets itself up as the intermediary
 between programs that supply this information (such as ifup and
 ifdown, DHCP clients, the PPP daemon and local name servers) and
 programs that use this information (such as DNS caches and resolver
 libraries).
 .
 This package may require some manual configuration. Please
 read the README file for detailed instructions.
Homepage: http://alioth.debian.org/projects/res...

Read more...

tags: added: verification-done
removed: verification-needed
Revision history for this message
Stéphane Graber (stgraber) wrote :

Fix is still good with ubuntu14.

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

This bug was fixed in the package resolvconf - 1.63ubuntu14

---------------
resolvconf (1.63ubuntu14) precise-proposed; urgency=low

  * Call db_go after the db_input command so that the debconf error
    message is actually shown to the user.

resolvconf (1.63ubuntu13) precise-proposed; urgency=low

  [ Stéphane Graber ]
  * In is_immutable_file, if lsattr doesn't return anything on stdout,
    return 1 and hide stderr. This fixes lsattr failing on non-ext
    filesystems. (LP: #994539)

  [ Steve Langasek ]
  * Fix syntax of db_input command, which is part of why we're seeing
    failures in bug #994539.

resolvconf (1.63ubuntu12) precise-proposed; urgency=low

  * Instead of throwing an error that aborts the upgrade when
    /etc/resolv.conf is immutable, pop a debconf error message to let the
    user know what's happening, then clear the immutable flag and continue
    with the installation. LP: #989585.
 -- Stephane Graber <email address hidden> Mon, 14 May 2012 12:31:58 -0400

Changed in resolvconf (Ubuntu Precise):
status: Fix Committed → Fix Released
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.