package xymon 4.3.28-3build1 failed to install/upgrade: installed xymon package post-installation script subprocess returned error exit status 1

Bug #1819378 reported by sukhvir
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
xymon (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I was trying to install xymon on ubuntu 18.4 lts, I am getting following error.
chgrp: cannot access 'critical.cfg': No such file or directory
chgrp: cannot access 'critical.cfg.bak': No such file or directory
dpkg: error processing package xymon (--configure):
 installed xymon package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 xymon
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: xymon 4.3.28-3build1
ProcVersionSignature: Ubuntu 4.15.0-39.42-generic 4.15.18
Uname: Linux 4.15.0-39-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.5
AptOrdering:
 xymon-client:amd64: Install
 xymon:amd64: Install
 NULL: ConfigurePending
Architecture: amd64
Date: Sun Mar 10 17:29:57 2019
DpkgHistoryLog:
 Start-Date: 2019-03-10 17:29:42
 Commandline: apt-get install xymon
 Requested-By: satnam (1000)
 Install: xymon:amd64 (4.3.28-3build1), xymon-client:amd64 (4.3.28-3build1, automatic)
ErrorMessage: installed xymon package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2017-03-02 (738 days ago)
InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
Python3Details: /usr/bin/python3.6, Python 3.6.7, python3-minimal, 3.6.7-1~18.04
PythonDetails: /usr/bin/python2.7, Python 2.7.15rc1, python-minimal, 2.7.15~rc1-1
RelatedPackageVersions:
 dpkg 1.19.0.5ubuntu2.1
 apt 1.6.6
SourcePackage: xymon
Title: package xymon 4.3.28-3build1 failed to install/upgrade: installed xymon package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to bionic on 2018-10-08 (152 days ago)
modified.conffile..etc.xymon.alerts.cfg: [deleted]
modified.conffile..etc.xymon.analysis.cfg: [deleted]
modified.conffile..etc.xymon.cgioptions.cfg: [deleted]
modified.conffile..etc.xymon.client-local.cfg: [deleted]
modified.conffile..etc.xymon.columndoc.csv: [deleted]
modified.conffile..etc.xymon.combo.cfg: [deleted]
modified.conffile..etc.xymon.critical.cfg: [deleted]
modified.conffile..etc.xymon.critical.cfg.bak: [deleted]
modified.conffile..etc.xymon.graphs.cfg: [deleted]
modified.conffile..etc.xymon.holidays.cfg: [deleted]
modified.conffile..etc.xymon.protocols.cfg: [deleted]
modified.conffile..etc.xymon.rrddefinitions.cfg: [deleted]
modified.conffile..etc.xymon.snmpmibs.cfg: [deleted]
modified.conffile..etc.xymon.tasks.cfg: [deleted]
modified.conffile..etc.xymon.web.acknowledge_form: [deleted]
modified.conffile..etc.xymon.web.acknowledge_header: [deleted]
modified.conffile..etc.xymon.web.acknowledgements_form: [deleted]
modified.conffile..etc.xymon.web.acknowledgements_header: [deleted]
modified.conffile..etc.xymon.web.chpasswd_form: [deleted]
modified.conffile..etc.xymon.web.chpasswd_header: [deleted]
modified.conffile..etc.xymon.web.columndoc_header: [deleted]
modified.conffile..etc.xymon.web.confreport_back: [deleted]
modified.conffile..etc.xymon.web.confreport_footer: [deleted]
modified.conffile..etc.xymon.web.confreport_front: [deleted]
modified.conffile..etc.xymon.web.confreport_header: [deleted]
modified.conffile..etc.xymon.web.critack_form: [deleted]
modified.conffile..etc.xymon.web.critedit_form: [deleted]
modified.conffile..etc.xymon.web.critedit_header: [deleted]
modified.conffile..etc.xymon.web.critical_footer: [deleted]
modified.conffile..etc.xymon.web.critical_header: [deleted]
modified.conffile..etc.xymon.web.critmulti_header: [deleted]
modified.conffile..etc.xymon.web.divider_footer: [deleted]
modified.conffile..etc.xymon.web.divider_header: [deleted]
modified.conffile..etc.xymon.web.event_form: [deleted]
modified.conffile..etc.xymon.web.event_header: [deleted]
modified.conffile..etc.xymon.web.findhost_form: [deleted]
modified.conffile..etc.xymon.web.findhost_header: [deleted]
modified.conffile..etc.xymon.web.ghosts_header: [deleted]
modified.conffile..etc.xymon.web.graphs_header: [deleted]
modified.conffile..etc.xymon.web.hist_header: [deleted]
modified.conffile..etc.xymon.web.histlog_header: [deleted]
modified.conffile..etc.xymon.web.hostgraphs_form: [deleted]
modified.conffile..etc.xymon.web.hostgraphs_header: [deleted]
modified.conffile..etc.xymon.web.hostlist_form: [deleted]
modified.conffile..etc.xymon.web.hostlist_header: [deleted]
modified.conffile..etc.xymon.web.hostsvc_header: [deleted]
modified.conffile..etc.xymon.web.info_header: [deleted]
modified.conffile..etc.xymon.web.maint_form: [deleted]
modified.conffile..etc.xymon.web.maint_header: [deleted]
modified.conffile..etc.xymon.web.maintact_header: [deleted]
modified.conffile..etc.xymon.web.notify_form: [deleted]
modified.conffile..etc.xymon.web.notify_header: [deleted]
modified.conffile..etc.xymon.web.perfdata_form: [deleted]
modified.conffile..etc.xymon.web.perfdata_header: [deleted]
modified.conffile..etc.xymon.web.replog_header: [deleted]
modified.conffile..etc.xymon.web.repnormal_header: [deleted]
modified.conffile..etc.xymon.web.report_form: [deleted]
modified.conffile..etc.xymon.web.report_form_daily: [deleted]
modified.conffile..etc.xymon.web.report_form_monthly: [deleted]
modified.conffile..etc.xymon.web.report_form_weekly: [deleted]
modified.conffile..etc.xymon.web.report_header: [deleted]
modified.conffile..etc.xymon.web.snapcritical_header: [deleted]
modified.conffile..etc.xymon.web.snapnongreen_header: [deleted]
modified.conffile..etc.xymon.web.snapnormal_header: [deleted]
modified.conffile..etc.xymon.web.snapshot_form: [deleted]
modified.conffile..etc.xymon.web.snapshot_header: [deleted]
modified.conffile..etc.xymon.web.stdcritical_header: [deleted]
modified.conffile..etc.xymon.web.stdnongreen_header: [deleted]
modified.conffile..etc.xymon.web.stdnormal_footer: [deleted]
modified.conffile..etc.xymon.web.stdnormal_header: [deleted]
modified.conffile..etc.xymon.web.topchanges_form: [deleted]
modified.conffile..etc.xymon.web.topchanges_header: [deleted]
modified.conffile..etc.xymon.web.trends_form: [deleted]
modified.conffile..etc.xymon.web.trends_header: [deleted]
modified.conffile..etc.xymon.web.useradm_form: [deleted]
modified.conffile..etc.xymon.web.useradm_header: [deleted]
modified.conffile..etc.xymon.web.zoom.js: [deleted]
modified.conffile..etc.xymon.xymonmenu.cfg: [deleted]
modified.conffile..etc.xymon.xymonserver.cfg: [deleted]

Revision history for this message
sukhvir (sukhvirz) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xymon (Ubuntu):
status: New → Confirmed
Revision history for this message
Thomas (thomaskjones) wrote :

I've seen this twice, once upgrading packages on 18.4.2 and once upgrading to 18.4.2.
coping critical.cfg to critical.cfg.bak bypassed the error.

Axel Beckert (xtaran)
Changed in xymon (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Axel Beckert (xtaran) wrote : Re: [Bug 1819378] [NEW] package xymon 4.3.28-3build1 failed to install/upgrade: installed xymon package post-installation script subprocess returned error exit status 1
Download full text (3.1 KiB)

Dear Sukhvir,

thanks for your bug report.

sukhvir wrote:
> I was trying to install xymon on ubuntu 18.4 lts, I am getting following error.
> chgrp: cannot access 'critical.cfg': No such file or directory
> chgrp: cannot access 'critical.cfg.bak': No such file or directory
> dpkg: error processing package xymon (--configure):
> installed xymon package post-installation script subprocess returned error exit status 1
[...]
> modified.conffile..etc.xymon.alerts.cfg: [deleted]
> modified.conffile..etc.xymon.analysis.cfg: [deleted]
> modified.conffile..etc.xymon.cgioptions.cfg: [deleted]
> modified.conffile..etc.xymon.client-local.cfg: [deleted]
> modified.conffile..etc.xymon.columndoc.csv: [deleted]
> modified.conffile..etc.xymon.combo.cfg: [deleted]
> modified.conffile..etc.xymon.critical.cfg: [deleted]
> modified.conffile..etc.xymon.critical.cfg.bak: [deleted]
> modified.conffile..etc.xymon.graphs.cfg: [deleted]

This is caused by the following (IMHO rather uncommon) case that

* the package xymon had been installed beforehand (not explicitly
  mentioned, but obvious due to the deleted conffiles),
* has been removed again (but not purged, otherwise dpkg wouldn't know
  about the conffiles),
* then someone deleted /etc/xymon/ manually (otherwise not all
  conffiles would have been deleted),
* and tried to install xymon again.

Removing /etc/xymon/ (or any other conffile of any other package)
without purging ("apt-get purge" or "apt-get remove --purge") a
package makes dpkg think that the system administrator on purpose
remove these conffiles and hence respects this decision and doesn't
unpack them again.

While having removed _all_ conffiles manually without purging the
package, too, is theoretically a valid setup, it's nevertheless a
broken setup and breakage has to be expected then IMHO with most
packages.

So I'm not sure if I really should add support to the xymon package
for such a broken environment.

This breakage is btw. easily fixed: Do an "apt-get purge xymon" before
installing the package again. Be aware that this may also remove
monitoring data previously collected with xymon.

Thomas wrote:
> coping critical.cfg to critical.cfg.bak bypassed the error.

I think Thomas' case is slightly different, alone because in the above
case critical.cfg had been deleted, too. I actually expect further
breakage in the above case even if critical.cfg and critical.cfg.bak
are restored.

But Back to Thomas' case:

I though must admit that the file "critical.cfg.bak" (and _only_ that
file) doesn't really look like being relevant and might be deleted by
a local admin.

And this is actually a case we definitely need to handle better. I've
filed https://bugs.debian.org/924665 in Debian for that.

P.S.: Thanks to Thomas' variant of this issue, I became aware of the
fact that this issue might also happen if you just tried to clean up
your /etc/ from seemingly unnecessary backup files.

  Regards, Axel
--
 ,''`. | Axel Beckert <email address hidden>, https://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
  `- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D8...

Read more...

Axel Beckert (xtaran)
Changed in xymon (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xymon - 4.3.28-5

---------------
xymon (4.3.28-5) unstable; urgency=medium

  * xymon.postinst: Check for file existence before calling chgrp/chmod on
    critical.cfg and critical.cfg.bak. (Closes: #924665, LP: #1819378)

 -- Axel Beckert <email address hidden> Mon, 18 Mar 2019 01:28:51 +0100

Changed in xymon (Ubuntu):
status: Fix Committed → Fix Released
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.