can't install/upgrade postfix non interactively through apt

Bug #1169044 reported by Andrew Jones
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postfix (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

We install and upgrade our packages via scripts. We had originally install postfix (and possibly) successfully using these scripts in the past without interactive input. When upgrading postfix to 2.9.6-1~12.04.1, we're unable to install it without it hanging during the dpkg --configure step and waiting for interactive input.

We tried to upgrade with the following apt commands:
DEBIAN_FRONTEND=noninteractive sudo apt-get upgrade -y -q --force-yes
sudo apt-get upgrade -y
sudo apt-get upgrade -y -q --force-yes

Revision history for this message
Robie Basak (racb) wrote :

Thank you for reporting this bug and helping to make Ubuntu better.

I was unable to reproduce this issue upgrading from 2.9.1-4 to 2.9.6-1~12.04.1. A simple upgrade (without overriding DEBIAN_FRONTEND, even) didn't prompt me at all.

Can you describe exactly what you are being prompted for?

Please post exact steps to reproduce this problem on a different system. Once done, please change the bug status back to New.

Changed in postfix (Ubuntu):
status: New → Incomplete
Revision history for this message
Andrew Jones (akjones) wrote :

I tested this again on a clone of one of our other machines which hadn't had it's packaged upgraded.

I ran sudo apt-get update, then sudo apt-get upgrade.

The following packages were going to be upgraded:
  accountsservice apache2-utils apt apt-transport-https apt-utils bash bind9-host cloud-init curl dmsetup
  dnsutils gir1.2-gudev-1.0 grub-legacy-ec2 icedtea-6-jre-cacao icedtea-6-jre-jamvm iptables
  language-selector-common libaccountsservice0 libapt-inst1.4 libapt-pkg4.12 libbind9-80 libcurl3
  libcurl3-gnutls libcurl4-openssl-dev libdbus-glib-1-2 libdevmapper1.02.1 libdns81 libdrm-intel1
  libdrm-nouveau1a libdrm-radeon1 libdrm2 libgnutls-dev libgnutls-openssl27 libgnutls26 libgnutlsxx27
  libgudev-1.0-0 libisc83 libisccc80 libisccfg82 liblwres80 libmysqlclient-dev libmysqlclient18 libnspr4
  libnss3 libnss3-1d libpciaccess0 libssl-dev libssl-doc libssl1.0.0 libudev0 libvirt-dev libvirt0 libxml2
  linux-libc-dev openjdk-6-jre-headless openjdk-6-jre-lib openssl percona-server-client-5.5
  percona-server-common-5.5 percona-server-server-5.5 percona-xtrabackup perl perl-base perl-modules
  postfix rsyslog sudo udev

I was presented with a changelog in less, and the upgrades proceeded when i'd closed that.

Other packages upgraded without incident, but when postfix was being upgraded I was presented with a pink screen titled 'Postfix Configuration', even though postfix has already been configured. The options included 'No configuration', 'Internet site', 'Internet with smarthost', 'Satellite system' and 'Local only'. As before, the upgrade would not proceed without user input.

Changed in postfix (Ubuntu):
status: Incomplete → New
Revision history for this message
Robie Basak (racb) wrote :

Thanks for your reply. It's great that you've got a clone - presumably even though I can't reproduce the issue, you can?

Could you please clone again, but perform a few steps differently this time? This will help diagnose the issue.

First, I don't understand what the changelog is in less at all. Please could you describe everything you see around that in more detail? Have you installed any kind of addon or modification that might affect the upgrade process?

Then, from a clone to reproduce the problem, please run "dpkg-query -W postfix" to give me the version number you're upgrading from.

Next, please install the "debconf-tools" package (before upgrading), then run "debconf-get-selections|grep postfix" and paste the output of that here.

Then, to upgrade, run "sudo DEBIAN_FRONTEND=text apt-get upgrade" instead. This will show you the prompt without full screen mode, which will allow you to copy and paste the output more easily. Please try and capture the output of absolutely everything and attach it to this bug. Please don't skip any output - it may be important.

To eliminate the less command to make it easier to capture that, you might try "sudo DEBIAN_FRONTEND=text PAGER=cat apt-get upgrade". I'm not sure what the less invocation is, but this might eliminate it.

Setting Incomplete again - please change to New when done (this is to clear it from the triage queue so that it pops up again when the bug needs attention).

Changed in postfix (Ubuntu):
status: New → Incomplete
Revision history for this message
Robie Basak (racb) wrote :

Actually, instead of installing debconf-tools and running debconf-get-selections, could you please instead run this command:

sed -n '/postfix/,/^$/p' /var/cache/debconf/config.dat > /tmp/postfix-config.txt

And then attach /tmp/postfix-config.txt to this bug? This will provide more information. Thanks!

Revision history for this message
Andrew Jones (akjones) wrote :

I've spun up another clone and have got the info you requested:

The output from dpkg-query -W postfix was postfix 2.9.3-2~12.04.4

I've also attached the output from sed -n '/postfix/,/^$/p' /var/cache/debconf/config.dat

Changed in postfix (Ubuntu):
status: Incomplete → New
Revision history for this message
Robie Basak (racb) wrote :

@Andrew

You missed my request for the full textual output of the upgrade failure when run with DEBIAN_FRONTEND=text. Please could you run through my instructions again, attach this output, and set the bug status back to New?

Thanks!

Changed in postfix (Ubuntu):
status: New → Incomplete
Revision history for this message
Andrew Jones (akjones) wrote :

Whoops, sorry. Here's the output from apt with DEBIAN_FRONTEND=text.

Revision history for this message
Andrew Jones (akjones) wrote :

Also, as of Friday afternoon (Sydney, Australia time), I won't have access to the machines and backups so I won't be able to provide any more debugging info - if there's anything more that I can provide to help out it'd be good to know before then. Thanks!

Changed in postfix (Ubuntu):
status: Incomplete → New
Revision history for this message
Robie Basak (racb) wrote :

Thanks for going through this with me.

It seems that you have two problems:

1) You're asked to accept the changelogs before the upgrade proceeds.
2) You're prompted by debconf for postfix configuration options before the upgrade proceeds.

The first is due to your decision to install apt-listchanges, its local configuration on your system, and possibly bug 788519. Try running "sudo dpkg-reconfigure apt-listchanges" to see if it has any debconf options to stop it prompting you, see the bug for a workaround, or just remove the apt-listchanges package if you don't need it.

The second is the standard debconf prompt. See debconf documentation for details on this. Based on the debconf settings on your system, it looks like the question wasn't answered before and so it is asking it again. This is expected behaviour. To suppress the prompt entirely, try setting DEBIAN_FRONTEND=noninteractive.

For the first issue, please refer to bug 788519, or file a new bug against apt-listchanges if you think you have a different issue with it. The second issue is not a bug in the postfix package, so I'm marking this bug as Invalid in postfix.

If you need more help, please see http://www.ubuntu.com/support/community for community support options.

Changed in postfix (Ubuntu):
status: New → Invalid
Revision history for this message
LaMont Jones (lamont) wrote :

This is specifically caused by having non-default smtp_recipient_restrictions, which changed behavior in 2.10, and postfix needs to know how you want to proceed. The answer to the question can be preseeded if you so desire. There is no bug here.

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.