The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #1206

aptitude provider does not recognize recovery efforts

Added by Richard Hurt almost 6 years ago. Updated almost 5 years ago.

Status:AcceptedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Debian
Target version:-
Affected Puppet version: Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

The boxbackup 0.10 package from Debian backports is failing to install via Puppet 0.2.24. It looks as though there is an error in the package and the initial configuration fails. However, aptitude (and I assume apt-get) by default tries to recover from the error and in this case succeeds. Subsequent aptitude purge & installs work just fine and only the initial install causes this error.

The problem is that Puppet flags this install as a complete loss for some reason and keeps trying to install the package. I took the command out of the Puppet log file and ran it manually and captured the output as seen below. After I ran this install Puppet accepted the install and everything looks OK. The only problem is the initial install. Is there an option to the apt(itude) providers to allow them to perform the recovery or should I use a force

2D0987B9:~# /usr/bin/aptitude -y -o DPkg::Options::=--force-confold install boxbackup-client=0.10-1~bpo.1
Reading package lists... Done
Building dependency tree... Done
Reading extended state information       
Initializing package states... Done
Writing extended state information... Done
Reading task descriptions... Done         
Building tag database... Done    
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Setting up boxbackup-client (0.10-1~bpo.1) ...

Creating config file /etc/boxbackup/bbackupd.conf with new version

Creating config file /etc/boxbackup/bbackupd/notifyadmin with new version
/etc/init.d/boxbackup-client: line 27: [: too many arguments
/etc/init.d/boxbackup-client: line 30: [: too many arguments
Starting boxbackup-client: Box Backup Client v0.10, (c) Ben Summers and contributors 2003-2006
bbackupd: failed to start: failed to open configuration file: /var/run/bbackupd.pidinvoke-rc.d: initscript boxbackup-client, action "start" failed.
dpkg: error processing boxbackup-client (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 boxbackup-client
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up boxbackup-client (0.10-1~bpo.1) ...
Replacing config file /etc/boxbackup/bbackupd.conf with new version
Replacing config file /etc/boxbackup/bbackupd/notifyadmin with new version

2D0987B9:~#

puppetd.log.gz (2.13 KB) Richard Hurt, 04/28/2008 04:12 pm

History

#1 Updated by Richard Hurt almost 6 years ago

Replying to [comment:5 luke]:

What does dpkg-query show as the status of the package now? That’s what puppet uses to determine what to do.

Here is the output from apt-cache and dpkg-query:

joey-18ABF00D:~# apt-cache policy boxbackup-client boxbackup-client: Installed: 0.10-1~bpo.1 Candidate: 0.10-1~bpo.1 Version table:

 0.11~rc2-3~bpo40+1 0
      1 http://update.kangaroobox.com etch-backports/main Packages

*** 0.10-1~bpo.1 0

    500 http://update.kangaroobox.com stable/main Packages
    100 /var/lib/dpkg/status

joey-18ABF00D:~# /usr/bin/dpkg-query -W —showformat ‘${Status} ${Package} ${Version}\n’ boxbackup-client install ok half-configured boxbackup-client 0.10-1~bpo.1 joey-18ABF00D:~#

#2 Updated by Richard Hurt almost 6 years ago

Darn it! It looks like they have fixed the bug in the Debian BoxBackup package that was causing the install to fail. I’ll have to see if I can reproduce it by using the old package.

#3 Updated by Luke Kanies almost 6 years ago

What does dpkg-query show as the status of the package now? That’s what puppet uses to determine what to do.

#4 Updated by James Turnbull almost 6 years ago

something like puppetd —verbose —debug —trace would be perfect. Don’t forget to use

 
to ensure the wiki format works.

#5 Updated by Richard Hurt almost 6 years ago

Replying to [comment:3 jamtur01]:

something like puppetd —verbose —debug —trace would be perfect. Don’t forget to use

 
to ensure the wiki format works.

Done. The output had quite a bit of control character “noise” so I gzipped & attached it instead of pasting it in the text. I hope that’s alright. I also turned off most of my manifests to keep the output simple and small.

#6 Updated by Richard Hurt almost 6 years ago

Yes. Is there any specific type of output you would like? Do I have to run puppet in standalone with debug on or something? Would it be something like /usr/bin/puppetd —no-daemonize —debug —onetime —verbose? Just let me know and I’ll get it going.

Thanx! Richard

#7 Updated by Richard Hurt almost 6 years ago

Lets try that again.

joey-18ABF00D:~# apt-cache policy boxbackup-client
boxbackup-client:
  Installed: 0.10-1~bpo.1
  Candidate: 0.10-1~bpo.1
  Version table:
     0.11~rc2-3~bpo40+1 0
          1 http://update.kangaroobox.com etch-backports/main Packages
 *** 0.10-1~bpo.1 0
        500 http://update.kangaroobox.com stable/main Packages
        100 /var/lib/dpkg/status
joey-18ABF00D:~# /usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n' boxbackup-client
install ok half-configured boxbackup-client 0.10-1~bpo.1
joey-18ABF00D:~# 

#8 Updated by James Turnbull almost 6 years ago

Can you capture the output from Puppet too?

#9 Updated by Redmine Admin almost 6 years ago

  • Status changed from 1 to Needs More Information
  • 6 set to Needs more information

#10 Updated by Richard Hurt almost 6 years ago

OK, this is marked “Needs more info” but I think I already provided the requested data. If there is something else that is needed please let me know and I’ll do what I can.

NOTE: The original BoxBackup package that was having a problem has been updated and the new one works properly. I think I can still reproduce the but though using my own repository.

#11 Updated by James Turnbull almost 6 years ago

RNHurt wrote:

OK, this is marked “Needs more info” but I think I already provided the requested data. If there is something else that is needed please let me know and I’ll do what I can.

It’s “Needs more information” as I was hoping you could replicate the problem. Can you confirm you can replicate the issue?

#12 Updated by Luke Kanies almost 6 years ago

  • Status changed from Needs More Information to Needs Decision

The package is listed as half-configured, which Puppet does not consider to be equivalent to ‘installed’.

What’s the right solution here? Just consider it == ‘installed’?

#13 Updated by Richard Hurt almost 6 years ago

luke wrote:

The package is listed as half-configured, which Puppet does not consider to be equivalent to ‘installed’.

What’s the right solution here? Just consider it == ‘installed’?

No, the package wont work correctly on Debian if it is half-configured. I would say that you would want to either remove the package and try again or just give up (possibly removing the package in the process). If a package wont install properly then there is something wrong with it and it needs to be fixed, IMHO.

#14 Updated by Luke Kanies almost 6 years ago

  • Status changed from Needs Decision to Accepted

I think the right decision, then, is to recognize the state but throw an exception when it’s in that state. It seems like a bad idea to just uninstall the package and try again; this seems like something the user needs to recover from.

#15 Updated by James Turnbull almost 5 years ago

  • Assignee deleted (Puppet Community)

Also available in: Atom PDF