Skip to content

[FEATURE REQUEST] Add flag to pkg.installed to force dpkg usage instead of apt #65315

@devin-cpg

Description

@devin-cpg

Existing Problem:
After updating from 3003.5 to 3006.3, we experienced failure to install some packages that were sourced from the salt server, as well as one from an https:// repository. These failures all seem to stem from the change from dpkg to apt-get as seen in #62934 and #63126

First, the storcli .deb package, which lives on the salt master:

Function: pkg.installed
  Result: False
 Comment: Problem encountered installing package(s). Additional info follows:

          errors:
              - Running scope as unit: run-red1bb222c4c2490197650686c372ab6a.scope
                E: Problem parsing Provides line of storcli:all=007.2002.0000.0000
                E: Error occurred while processing storcli (NewVersion2)
                E: Problem with MergeList /var/cache/salt/minion/files/base/files/pkgs/storcli_007.2002.0000.0000_all.deb
                E: The package lists or status file could not be parsed or opened.
 Started: 10:28:05.898741
Duration: 2603.801 ms
 Changes:

Next would be the sumologic collector. The state is extremely simple:

install sumocollector:
  pkg.installed:
    - sources: 
      - sumocollector: https://collectors.sumologic.com/rest/download/deb/64

However, in 3006 this fails:

errors:
    - Running scope as unit: run-rf1a49f307b2141348111e17aedfa5ea9.scope
      E: Unsupported file /var/cache/salt/minion/extrn_files/base/collectors.sumologic.com/rest/download/deb/64 given on commandline
[ERROR   ] Parent directory not present
local:
----------
          ID: install sumocollector
    Function: pkg.installed
      Result: False
     Comment: Problem encountered installing package(s). Additional info follows:

              errors:
                  - Running scope as unit: run-rf1a49f307b2141348111e17aedfa5ea9.scope
                    E: Unsupported file /var/cache/salt/minion/extrn_files/base/collectors.sumologic.com/rest/download/deb/64 given on commandline
     Started: 10:42:39.815159
    Duration: 9146.275 ms
     Changes:
----------

Requested Solution:
A parameter for the pkg.installed (or rather, I guess salt.modules.aptpkg.install) to revert back to the old pre #62934 behavior and just use dpkg instead of apt-get.

Alternatives:
With regards to the storcli package, this was resolved by unpacking, deleting the Provides: line from the control file, and repacking. It seems that Broadcom is not building these properly, or at least not well enough for apt to install.

The sumologic collector requires a change to the state where instead of the simple version as seen above, I need to use a chain of cmd.run to download and install.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Featurenew functionality including changes to functionality and code refactors, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions