Postfix being installed as a dependency in Zesty

Bug #1679833 reported by Rod Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Won't Fix
Low
Jeff Lane 

Bug Description

Starting with Ubuntu 17.04 (zesty) beta, Postfix is being installed as a dependency of canonical-certification-server, possibly through mailutils. This is causing deployments through MAAS to fail, since Postfix requires user interaction to configure at installation time. We're working around this by explicitly installing sendmail as part of our MAAS curtin preseed, which works because sendmail doesn't require user interaction at installation time:

https://code.launchpad.net/~rodsmith/maas-cert-server/fix-zesty-deploy/+merge/321917

Depending on where the dependency is, though, this Postfix dependency might affect client systems, too; and of course, whether it's Postfix or sendmail, it's extra software we don't need.

Revision history for this message
Jeff Lane  (bladernr) wrote :

So the issue appears to be due to smartmontools:

ubuntu@certtest:~$ aptitude why postfix
i canonical-certification-server Depends plainbox-provider-certification-server (= 0.33.0+git201703282129+pkg60~ubuntu17.04.1)
i A plainbox-provider-certification-server Depends plainbox-provider-checkbox (>= 0.27~)
i A plainbox-provider-checkbox Recommends smartmontools
i A smartmontools Recommends mailx | mailutils
i A mailutils Depends default-mta | mail-transport-agent
i A postfix Provides mail-transport-agent

Or more specifically, mailutils as you suspect... wonder if there's a way to NOT install mailutils but still install smartmontools.

Changed in plainbox-provider-checkbox:
status: New → Confirmed
Revision history for this message
Jeff Lane  (bladernr) wrote :

As Rod's MR in the summary indicates, you can work around this superficially by forcing the install of sendmail.

The way this was handled in the past was to install the offending package separately and then manipulate it before installing the cert packages via cloud-init (for our stuff). This happened long ago with mysql being installed as a dependency of something else (mysql was never even used, it was just a dependency of a dependency of a dependency, IIRC).

Looking back in time, this is how it was handled before:

echo " Installing debconf-utils...";
      apt-get install -y debconf-utils;
      echo " Setting up and install mysql-server...";
      echo mysql-server mysql-server/root_password password insecure | debconf-set-selections;
      echo mysql-server mysql-server/root_password_again password insecure | debconf-set-selections;
      apt-get install -y mysql-server;

in the installcert bucket in curtin_userdata. I imagine something similar could be done here to automate choosing the "no configuration" option for postfix.

That said, we could also just as easily continue to force sendmail to be installed as well.

Revision history for this message
Rod Smith (rodsmith) wrote :

I tried something similar to your example of setting Postfix options via debconf in our preseed, but it didn't work. There may well have been an error in the way I was doing it, but I gave up on it quickly because it took about two dozen lines. (I extracted the debconf settings from an install of Postfix, and there were a couple dozen settings.) It was therefore much simpler, from a scripting point of view, to just add "sendmail" to the already-short list of packages to be installed.

In terms of a broader solution, adding sendmail as an explicit dependency of Checkbox should take care of it; however, that may be fragile -- as it may well be in my maas-cert-server patch. If sendmail should start requiring interactive configuration or if the tangle of dependencies should change, we might be back here again.

Maybe using the --no-install-recommends option to apt would work around the problem...?

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

IIRC we dropped disk/smart tests from client test plans. If you don't need them as well in server cert, we could remove smartmontools from the provider recommended packages.

@Jeff please advise

Changed in plainbox-provider-checkbox:
assignee: nobody → Jeff Lane (bladernr)
status: Confirmed → Incomplete
importance: Undecided → Low
Revision history for this message
Rod Smith (rodsmith) wrote :

We're still doing disk/smart tests, so removing that would not be an option. (Unless Jeff is thinking of dropping those tests...?)

Revision history for this message
Jeff Lane  (bladernr) wrote : Re: [Bug 1679833] Re: Postfix being installed as a dependency in Zesty

On Mon, Feb 5, 2018 at 9:03 AM, Rod Smith <email address hidden> wrote:
> We're still doing disk/smart tests, so removing that would not be an
> option. (Unless Jeff is thinking of dropping those tests...?)

I've vacillated about that for a while. On the one hand, the only
useful thing we've really ever gotten from it is catching a couple
failing HDDs.

I wouldn't lose sleep over removing them, to be honest, especially
since they only work on direct-attached disks (and even then not all
disks support it, like some SSDs).

Changed in plainbox-provider-checkbox:
status: Incomplete → Triaged
milestone: none → 0.47.0
Changed in plainbox-provider-checkbox:
milestone: 0.47.0 → none
Changed in plainbox-provider-checkbox:
status: Triaged → Won't Fix
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.