I've been working on some basic Puppet manifests to install Aegir on a Debian system via the .debs, using Vagrant. However, I've noticed that the install process (sometimes) prompts for the mysql password twice, which seems to be part of the issue with the pre-seeding. I suspect this is due to having to gracefully handle both installs and upgrades.

I found this bit: http://drupalcode.org/project/provision.git/blob/d2848af48e5939918131b97..., which I *think* tosses out the pre-seeded mysql password, and so the install hangs. I know we want to remove the db_password from the debconf db as soon as possible, but maybe we could do it a little later?

I'm marking this is a 'bug report' rather than a support request, as I discussed this with mig5 on IRC (ref.: http://hefring.mig5.net/bot/log/aegir/2011-10-04#T123718) , and he mentioned similar issues with getting Jenkins to build based on the .debs. Specifically, that they had to do this: http://drupalcode.org/sandbox/darthsteven/1286014.git/blob/HEAD:/aegir_6....

Comments

anarcat’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

line #81 is fine - it forgets the password after getting it, from preseed or prompts.

I do not understand why this is a bug report - jenkins is able to install aegir non-interactively without problems, as the last URL you provided explains quite clearly. The trick is to preseed the passwords and other settings properly and run the install non-interactively (which puppet should do out of the box).

Can you explain more clearly what errors/issues you're getting when installing through puppet?

deekayen’s picture

I'm trying to do a headless install using a StackScript on a Linode. The script I'm building is at:

https://github.com/deekayen/dcatl2012/blob/d70313631b59a5d156a5251a8e90f...

The StackScript loads on the console before the command prompt is ready. I noted that the server wouldn't finish installing because the StackScript would halt and prompt for a password twice during install, even though I thought I had sufficiently supplied it through

echo "aegir-hostmaster aegir/db_password password ${DB_PASSWORD}" | debconf-set-selections

The install of the entire process basically hangs waiting for someone to go to the console and type the root database password. If you ask in the next week or so, I'll set you up with access to that linode and StackScript so you can rebuild the VM and see what it's doing if you want.

I un-ar'ed the 1.9 deb and found the aegir/db_password instance in config, postinst, and templates.

In postinst, I'm curious about

            db_reset aegir/db_password || true
            db_fset aegir/db_password "seen" "true" || true

but I haven't made sense of it with the stuff in config:

db_fset aegir/db_password "seen" "false" || true
db_input high aegir/db_password || true

The next thing I'm going to try seems a bit unorthodox:

echo "aegir-hostmaster aegir/db_password seen true" | debconf-set-selections
deekayen’s picture

adding

echo "aegir-hostmaster aegir/db_password seen true" | debconf-set-selections

didn't improve the situation

deekayen’s picture

Status: Postponed (maintainer needs more info) » Active

Just curious - is the implied advice here to not pass variables around in memory and through debconf-set-selections, meaning this is intentionally an interactive-only install? Otherwise, this seems like a bug, not a support request.

steven jones’s picture

Status: Active » Fixed

@deekayen Sorry that you've had such troubles installing non-interactively.

We have scripts that install Aegir without prompting, so this certainly should be possible. We set the DB password using debconf-set-selections, here:
http://drupalcode.org/project/vagrant_scripts_aegir.git/blob/refs/heads/...

And then we finally install it here:
http://drupalcode.org/project/vagrant_scripts_aegir.git/blob/refs/heads/...

I suspect that the 'DEBIAN_FRONTEND=noninteractive' is the magic here?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.