[Bug 1824341] [NEW] NoAllowedOrigin cause package removal

Anderson Luiz Alves 1824341 at bugs.launchpad.net
Thu Apr 11 11:49:11 UTC 2019


Public bug reported:

unattended-upgrades remove packages that shouldn't when there is a
NoAllowedOrigin exception.

Version:
unattended-upgrades=1.1ubuntu1.18.04.10
Ubuntu 18.04.2 LTS

Description of problem:
We have a internal package cliente-ldap that depends on samba, when u-u check for upgrade samba-common it raise a NoAllowedOrigin exception, then it doesn't clear apt.cache and it removes packages that shouldn't.

Log of dry-run with the problem:
$ sudo unattended-upgrade -d --dry-run
[...]
Option --dry-run given, *not* performing real actions
Packages that will be upgraded: libsmbclient libwbclient0 python-samba samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules smbclient
Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
debug: call_adjusted samba-common
debug: marked_pkg: samba: install=False, upgrade=False, delete=True
debug: marked_pkg: cliente-ldap: install=False, upgrade=True, delete=False
Traceback (most recent call last):
  File "/usr/bin/unattended-upgrade", line 259, in call_adjusted
    self.allowed_origins)
  File "/usr/bin/unattended-upgrade", line 775, in ver_in_allowed_origin
    raise NoAllowedOriginError()
NoAllowedOriginError
debug: marked_pkg: samba-common: install=False, upgrade=True, delete=False
debug: marked_pkg: smbclient: install=False, upgrade=False, delete=True
debug: marked_pkg: samba-common-bin: install=False, upgrade=False, delete=True
Exception: 
marking ibverbs-providers for removal
Keeping auto-removable ibverbs-providers package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap samba-common
marking samba-common-bin for removal
Keeping auto-removable samba-common-bin package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap samba-common
marking samba-vfs-modules for removal
marking python-crypto for removal
Keeping auto-removable python-crypto package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking attr for removal
marking smbclient for removal
Keeping auto-removable smbclient package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking python-ldb for removal
Keeping auto-removable python-ldb package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking python-tdb for removal
Keeping auto-removable python-tdb package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking samba-dsdb-modules for removal
marking librados2 for removal
marking libibverbs1 for removal
marking samba for removal
Keeping auto-removable samba package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking python-samba for removal
Keeping auto-removable python-samba package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking libcephfs2 for removal
marking tdb-tools for removal
Keeping auto-removable tdb-tools package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap samba-common
marking python-dnspython for removal
Keeping auto-removable python-dnspython package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
Packages that were successfully auto-removed: 
Packages that are kept back: ibverbs-providers python-crypto python-dnspython python-ldb python-samba python-tdb samba samba-common-bin smbclient tdb-tools
InstCount=0 DelCount=0 BrokenCount=0


Log of what should happen:
$ sudo unattended-upgrade -d --dry-run
[...]
Option --dry-run given, *not* performing real actions
Packages that will be upgraded: libsmbclient libwbclient0 python-samba samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules smbclient
Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
debug: call_adjusted samba-common
debug: marked_pkg: samba: install=False, upgrade=False, delete=True
debug: marked_pkg: cliente-ldap: install=False, upgrade=True, delete=False
Traceback (most recent call last):
  File "/usr/bin/unattended-upgrade", line 259, in call_adjusted
    self.allowed_origins)
  File "/usr/bin/unattended-upgrade", line 775, in ver_in_allowed_origin
    raise NoAllowedOriginError()
NoAllowedOriginError
debug: marked_pkg: samba-common: install=False, upgrade=True, delete=False
debug: marked_pkg: smbclient: install=False, upgrade=False, delete=True
debug: marked_pkg: samba-common-bin: install=False, upgrade=False, delete=True
debug: call_adjusted libsmbclient
debug: marked_pkg: python-samba: install=False, upgrade=True, delete=False
debug: marked_pkg: libwbclient0: install=False, upgrade=True, delete=False
debug: marked_pkg: samba: install=False, upgrade=True, delete=False
debug: marked_pkg: samba-dsdb-modules: install=False, upgrade=True, delete=False
debug: marked_pkg: samba-libs: install=False, upgrade=True, delete=False
debug: marked_pkg: samba-common: install=False, upgrade=True, delete=False
debug: marked_pkg: samba-vfs-modules: install=False, upgrade=True, delete=False
debug: marked_pkg: libsmbclient: install=False, upgrade=True, delete=False
debug: marked_pkg: smbclient: install=False, upgrade=True, delete=False
debug: marked_pkg: samba-common-bin: install=False, upgrade=True, delete=False
applying set ['python-samba', 'libwbclient0', 'samba', 'samba-dsdb-modules', 'samba-libs', 'samba-common', 'samba-vfs-modules', 'libsmbclient', 'smbclient', 'samba-common-bin']
Preconfiguring packages ...
/usr/bin/dpkg --status-fd 9 --no-triggers --unpack --auto-deconfigure --recursive /tmp/apt-dpkg-install-ZHXRWe 
/usr/bin/dpkg --status-fd 9 --configure --pending 
left to upgrade set()
All upgrades installed
InstCount=0 DelCount=0 BrokenCount=0

** Affects: unattended-upgrades (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to unattended-upgrades in Ubuntu.
https://bugs.launchpad.net/bugs/1824341

Title:
  NoAllowedOrigin cause package removal

Status in unattended-upgrades package in Ubuntu:
  New

Bug description:
  unattended-upgrades remove packages that shouldn't when there is a
  NoAllowedOrigin exception.

  Version:
  unattended-upgrades=1.1ubuntu1.18.04.10
  Ubuntu 18.04.2 LTS

  Description of problem:
  We have a internal package cliente-ldap that depends on samba, when u-u check for upgrade samba-common it raise a NoAllowedOrigin exception, then it doesn't clear apt.cache and it removes packages that shouldn't.

  Log of dry-run with the problem:
  $ sudo unattended-upgrade -d --dry-run
  [...]
  Option --dry-run given, *not* performing real actions
  Packages that will be upgraded: libsmbclient libwbclient0 python-samba samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules smbclient
  Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
  debug: call_adjusted samba-common
  debug: marked_pkg: samba: install=False, upgrade=False, delete=True
  debug: marked_pkg: cliente-ldap: install=False, upgrade=True, delete=False
  Traceback (most recent call last):
    File "/usr/bin/unattended-upgrade", line 259, in call_adjusted
      self.allowed_origins)
    File "/usr/bin/unattended-upgrade", line 775, in ver_in_allowed_origin
      raise NoAllowedOriginError()
  NoAllowedOriginError
  debug: marked_pkg: samba-common: install=False, upgrade=True, delete=False
  debug: marked_pkg: smbclient: install=False, upgrade=False, delete=True
  debug: marked_pkg: samba-common-bin: install=False, upgrade=False, delete=True
  Exception: 
  marking ibverbs-providers for removal
  Keeping auto-removable ibverbs-providers package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap samba-common
  marking samba-common-bin for removal
  Keeping auto-removable samba-common-bin package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap samba-common
  marking samba-vfs-modules for removal
  marking python-crypto for removal
  Keeping auto-removable python-crypto package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
  marking attr for removal
  marking smbclient for removal
  Keeping auto-removable smbclient package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
  marking python-ldb for removal
  Keeping auto-removable python-ldb package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
  marking python-tdb for removal
  Keeping auto-removable python-tdb package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
  marking samba-dsdb-modules for removal
  marking librados2 for removal
  marking libibverbs1 for removal
  marking samba for removal
  Keeping auto-removable samba package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
  marking python-samba for removal
  Keeping auto-removable python-samba package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
  marking libcephfs2 for removal
  marking tdb-tools for removal
  Keeping auto-removable tdb-tools package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap samba-common
  marking python-dnspython for removal
  Keeping auto-removable python-dnspython package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
  Packages that were successfully auto-removed: 
  Packages that are kept back: ibverbs-providers python-crypto python-dnspython python-ldb python-samba python-tdb samba samba-common-bin smbclient tdb-tools
  InstCount=0 DelCount=0 BrokenCount=0

  
  Log of what should happen:
  $ sudo unattended-upgrade -d --dry-run
  [...]
  Option --dry-run given, *not* performing real actions
  Packages that will be upgraded: libsmbclient libwbclient0 python-samba samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules smbclient
  Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
  debug: call_adjusted samba-common
  debug: marked_pkg: samba: install=False, upgrade=False, delete=True
  debug: marked_pkg: cliente-ldap: install=False, upgrade=True, delete=False
  Traceback (most recent call last):
    File "/usr/bin/unattended-upgrade", line 259, in call_adjusted
      self.allowed_origins)
    File "/usr/bin/unattended-upgrade", line 775, in ver_in_allowed_origin
      raise NoAllowedOriginError()
  NoAllowedOriginError
  debug: marked_pkg: samba-common: install=False, upgrade=True, delete=False
  debug: marked_pkg: smbclient: install=False, upgrade=False, delete=True
  debug: marked_pkg: samba-common-bin: install=False, upgrade=False, delete=True
  debug: call_adjusted libsmbclient
  debug: marked_pkg: python-samba: install=False, upgrade=True, delete=False
  debug: marked_pkg: libwbclient0: install=False, upgrade=True, delete=False
  debug: marked_pkg: samba: install=False, upgrade=True, delete=False
  debug: marked_pkg: samba-dsdb-modules: install=False, upgrade=True, delete=False
  debug: marked_pkg: samba-libs: install=False, upgrade=True, delete=False
  debug: marked_pkg: samba-common: install=False, upgrade=True, delete=False
  debug: marked_pkg: samba-vfs-modules: install=False, upgrade=True, delete=False
  debug: marked_pkg: libsmbclient: install=False, upgrade=True, delete=False
  debug: marked_pkg: smbclient: install=False, upgrade=True, delete=False
  debug: marked_pkg: samba-common-bin: install=False, upgrade=True, delete=False
  applying set ['python-samba', 'libwbclient0', 'samba', 'samba-dsdb-modules', 'samba-libs', 'samba-common', 'samba-vfs-modules', 'libsmbclient', 'smbclient', 'samba-common-bin']
  Preconfiguring packages ...
  /usr/bin/dpkg --status-fd 9 --no-triggers --unpack --auto-deconfigure --recursive /tmp/apt-dpkg-install-ZHXRWe 
  /usr/bin/dpkg --status-fd 9 --configure --pending 
  left to upgrade set()
  All upgrades installed
  InstCount=0 DelCount=0 BrokenCount=0

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1824341/+subscriptions



More information about the foundations-bugs mailing list