Apt-get post install script issues

This could be triggered by how my deploy setup works, but just in case
others have seen it. I have a self extracting shell archive that I upload
and execute via capistrano, which in turn runs chef solo. chef bombs out
every time when running the post install scripts for mdadm. If I run
apt-get install from my shell script through capistrano or directly from the
command line manually it works fine, but one more layer through chef and it
bombs. Looks like an environment issue.

Chris

** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Setting up mdadm
(2.6.3+200709292116+4450e59-3ubuntu3.1) …
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Generating array
device nodes… done.
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Generating
mdadm.conf… done.
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Removing any system
startup links for /etc/init.d/mdadm-raid …
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] update-initramfs:
deferring update (trigger activated)
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] /etc/init.d/mdadm: 78:
TERM: parameter not set
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] invoke-rc.d:
initscript mdadm, action “start” failed.
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] dpkg: error processing
mdadm (–configure):
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] subprocess
post-installation script returned error exit status 2
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Processing triggers
for initramfs-tools …
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Errors were
encountered while processing:
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] mdadm
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] [Thu, 11 Jun 2009
05:21:40 +0000] DEBUG: STDERR: E: Sub-process /usr/bin/dpkg returned an
error code (1)
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] [Thu, 11 Jun 2009
05:21:40 +0000] DEBUG: ---- End output of apt-get -q -y install
mdadm=2.6.3+200709292116+4450e59-3ubuntu3.1 ----
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] [Thu, 11 Jun 2009
05:21:40 +0000] ERROR: package[mdadm]
(/tmp/server_config/cookbooks/grid/recipes/ec2.rb line 4) had an error:
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] apt-get -q -y install
mdadm=2.6.3+200709292116+4450e59-3ubuntu3.1 returned 100, expected 0

Is this on 0.6.2 or 0.7.0?

Adam

On Wed, Jun 10, 2009 at 10:30 PM, snacktimesnacktime@gmail.com wrote:

This could be triggered by how my deploy setup works, but just in case
others have seen it. I have a self extracting shell archive that I upload
and execute via capistrano, which in turn runs chef solo. chef bombs out
every time when running the post install scripts for mdadm. If I run
apt-get install from my shell script through capistrano or directly from the
command line manually it works fine, but one more layer through chef and it
bombs. Looks like an environment issue.
Chris
** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Setting up mdadm
(2.6.3+200709292116+4450e59-3ubuntu3.1) ...
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Generating array
device nodes... done.
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Generating
mdadm.conf... done.
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Removing any system
startup links for /etc/init.d/mdadm-raid ...
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] update-initramfs:
deferring update (trigger activated)
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] /etc/init.d/mdadm: 78:
TERM: parameter not set
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] invoke-rc.d:
initscript mdadm, action "start" failed.
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] dpkg: error processing
mdadm (--configure):
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] subprocess
post-installation script returned error exit status 2
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Processing triggers
for initramfs-tools ...
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Errors were
encountered while processing:
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] mdadm
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] [Thu, 11 Jun 2009
05:21:40 +0000] DEBUG: STDERR: E: Sub-process /usr/bin/dpkg returned an
error code (1)
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] [Thu, 11 Jun 2009
05:21:40 +0000] DEBUG: ---- End output of apt-get -q -y install
mdadm=2.6.3+200709292116+4450e59-3ubuntu3.1 ----
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] [Thu, 11 Jun 2009
05:21:40 +0000] ERROR: package[mdadm]
(/tmp/server_config/cookbooks/grid/recipes/ec2.rb line 4) had an error:
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] apt-get -q -y install
mdadm=2.6.3+200709292116+4450e59-3ubuntu3.1 returned 100, expected 0

--
Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-4759 E: adam@opscode.com

Turns out it was happening even when I installed mdadm before chef ran, but
it wasn't until chef went to install runit which triggered dpkg again on the
previous mdadm failure where apt actually exited. So it's not a chef issue.
Chris

On Wed, Jun 10, 2009 at 11:39 PM, Adam Jacob adam@opscode.com wrote:

Is this on 0.6.2 or 0.7.0?

Adam

On Wed, Jun 10, 2009 at 10:30 PM, snacktimesnacktime@gmail.com wrote:

This could be triggered by how my deploy setup works, but just in case
others have seen it. I have a self extracting shell archive that I
upload
and execute via capistrano, which in turn runs chef solo. chef bombs out
every time when running the post install scripts for mdadm. If I run
apt-get install from my shell script through capistrano or directly from
the
command line manually it works fine, but one more layer through chef and
it
bombs. Looks like an environment issue.
Chris
** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Setting up mdadm
(2.6.3+200709292116+4450e59-3ubuntu3.1) ...
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Generating array
device nodes... done.
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Generating
mdadm.conf... done.
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Removing any
system
startup links for /etc/init.d/mdadm-raid ...
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] update-initramfs:
deferring update (trigger activated)
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] /etc/init.d/mdadm:
78:
TERM: parameter not set
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] invoke-rc.d:
initscript mdadm, action "start" failed.
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] dpkg: error
processing
mdadm (--configure):
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] subprocess
post-installation script returned error exit status 2
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Processing
triggers
for initramfs-tools ...
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] Errors were
encountered while processing:
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] mdadm
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] [Thu, 11 Jun 2009
05:21:40 +0000] DEBUG: STDERR: E: Sub-process /usr/bin/dpkg returned an
error code (1)
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] [Thu, 11 Jun 2009
05:21:40 +0000] DEBUG: ---- End output of apt-get -q -y install
mdadm=2.6.3+200709292116+4450e59-3ubuntu3.1 ----
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] [Thu, 11 Jun 2009
05:21:40 +0000] ERROR: package[mdadm]
(/tmp/server_config/cookbooks/grid/recipes/ec2.rb line 4) had an error:
*** [err :: ec2-72-44-40-102.compute-1.amazonaws.com] apt-get -q -y
install
mdadm=2.6.3+200709292116+4450e59-3ubuntu3.1 returned 100, expected 0

--
Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-4759 E: adam@opscode.com

On Wed, Jun 10, 2009 at 11:46 PM, snacktime snacktime@gmail.com wrote:

Turns out it was happening even when I installed mdadm before chef ran, but
it wasn't until chef went to install runit which triggered dpkg again on the
previous mdadm failure where apt actually exited. So it's not a chef issue.

Out of curiosity, what distro and release?

ubuntu 8.0.4

On Wed, Jun 10, 2009 at 11:55 PM, Bryan McLellan btm@loftninjas.org wrote:

On Wed, Jun 10, 2009 at 11:46 PM, snacktime snacktime@gmail.com wrote:

Turns out it was happening even when I installed mdadm before chef ran,
but
it wasn't until chef went to install runit which triggered dpkg again on
the
previous mdadm failure where apt actually exited. So it's not a chef
issue.

Out of curiosity, what distro and release?