devstructure/blueprint — Issue #117: MySQL package install hangs `blueprint apply`
Author: abrookins
Created: 2012-02-27 19:12:16+00:00
State: open

I'm using blueprint 3.4.1-1py2.6 to apply a cookbook captured on an Ubuntu 10.04 server to another Ubuntu 10.04 server.

When usign `blueprint apply {blueprint_name}`, I have a problem with MySQL package installs.They appear to hang -- possibly due to a MySQL configuration error.

Here is the output of the hung session just before it hangs:

```The following extra packages will be installed:
mysql-server mysql-server-5.1 mysql-server-core-5.1
Suggested packages:
tinyca mailx
The following NEW packages will be installed:
mysql-server mysql-server-5.1 mysql-server-core-5.1
0 upgraded, 3 newly installed, 0 to remove and 5 not upgraded.
Need to get 11.8MB of archives.
After this operation, 27.1MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main mysql-server-core-5.1 5.1.41-3ubuntu12.10 [4,714kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main mysql-server-5.1 5.1.41-3ubuntu12.10 [7,009kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main mysql-server 5.1.41-3ubuntu12.10 [94.8kB]
Fetched 11.8MB in 12s (960kB/s)
Preconfiguring packages ...
Selecting previously deselected package mysql-server-core-5.1.
(Reading database ... 57640 files and directories currently installed.)
Unpacking mysql-server-core-5.1 (from .../mysql-server-core-5.1_5.1.41-3ubuntu12.10_i386.deb) ...
Selecting previously deselected package mysql-server-5.1.
Unpacking mysql-server-5.1 (from .../mysql-server-5.1_5.1.41-3ubuntu12.10_i386.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.1.41-3ubuntu12.10_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up mysql-server-core-5.1 (5.1.41-3ubuntu12.10) ...
Setting up mysql-server-5.1 (5.1.41-3ubuntu12.10) ...

Configuration file `/etc/init/mysql.conf'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
==> Using current old file as you requested.
```

And here's `ps` output for the process that remains after I control-c:

```root 1194 0.0 0.1 1832 592 ? S 13:37 0:00 sh bootstrap-name/bootstrap.sh
root 15766 0.0 3.9 24192 19996 ? S 13:44 0:00 \_ apt-get -y -q -o DPkg::Options::=--force-confold install mysql-server=5.1.
root 15957 0.0 0.5 6036 3024 pts/1 Ss+ 13:44 0:00 \_ /usr/bin/dpkg --force-confold --status-fd 22 --configure mysql-server-
root 15958 0.0 1.3 9892 6828 pts/1 S+ 13:44 0:00 \_ /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/my
root 15964 0.0 0.2 4316 1516 pts/1 S+ 13:44 0:00 \_ /bin/bash -e /var/lib/dpkg/info/mysql-server-5.1.postinst conf
root 16091 0.0 0.2 3796 1116 pts/1 S+ 13:44 0:00 \_ start mysql
```

So, mysql can't start.

When I check the MySQL log, I see that there is an error:

120227 14:05:32 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
120227 14:05:32 [ERROR] Do you already have another mysqld server running on port: 3306 ?

Ah, right. The my.cnf captured when I took the blueprint bound the server to an IP address that won't work with the VM on which I'm installing the blueprint.

It makes sense. But should this scenario hang the entire `apply`?