Project

General

Profile

Actions

User story #11589

open

Add a "latest" version criteria for local file install in package modules

Added by Janos Mattyasovszky about 7 years ago. Updated about 3 years ago.

Status:
New
Priority:
N/A
Assignee:
-
Category:
Generic methods
Target version:
-
UX impact:
Suggestion strength:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Large
Name check:
Fix check:
Regression:

Description

I tried to use "Package present" for a locally downloaded rpm file, and it failed:

rudder  verbose: P:    From parameterized bundle: ncf_package( {"/var/rudder/tmp/keepalived.rpm","latest","","","present",""})

[...]

 warning: Unsupported 'latest' version for package promise of type file.
   error: Package data and policy doesn't match
   error: Error installing package '/var/rudder/tmp/keepalived.rpm'
Actions #1

Updated by Alexis Mousset about 7 years ago

  • Project changed from Rudder to 41
  • Category set to Generic methods - Package Management
  • Target version set to 1.1
Actions #2

Updated by Alexis Mousset about 7 years ago

I guess it happens because the use of "latest" version is not expected on a package file, but only on a package coming from a repo. Does it work with the "any" version (or a specific version)?

Actions #3

Updated by Janos Mattyasovszky about 7 years ago

I believe the problem is that I want to install a file-based RPM but use zypper. It is a valid usecase for me at the moment because rpm does not handle dependencies, and zypper in to pull in the dependencies of it.

...

Apparently the issue's origin is here:

rudder    debug: Opened fds 4 and 7 for command '/var/rudder/cfengine-community/modules/packages/zypper get-package-data'.
rudder    debug: Data read from application pipe: 17 [PackageType=file
]

Which causes it to be installed as file, which then defaults to using rpm:

rudder    debug: Installing file type package.
rudder    debug: Installing package '/var/rudder/tmp/keepalived.rpm'
rudder    debug: Installing file type package: 'File=/var/rudder/tmp/keepalived.rpm
'
rudder    debug: Sending install command to package module: 'options=
File=/var/rudder/tmp/keepalived.rpm
'
rudder    debug: Opened fds 4 and 7 for command '/var/rudder/cfengine-community/modules/packages/zypper file-install'.

And in /var/rudder/cfengine-community/modules/packages/zypper

def file_install():
    cmd_line = [rpm_cmd] + rpm_quiet_option + ["--force", "-U"]
    found = False

This is the full run trace of the technique call (NB: The stderr output with the installation error appears to be a little bit out of sync with the regular output, probably somekind of caching and displaying race condition).

rudder  verbose: P: .........................................................
rudder  verbose: P: BEGIN promise 'promise_package_lib_cf_250' of type "packages" (pass 1)
rudder  verbose: P:    Promiser/affected object: '/var/rudder/tmp/keepalived.rpm'
rudder  verbose: P:    From parameterized bundle: ncf_package( {"/var/rudder/tmp/keepalived.rpm","any","","zypper","present",""})
rudder  verbose: P:    Base context class: use_zypper_provider.!architecture_specified.!version_specified
rudder  verbose: P:    Stack path: /default/rudder_directives/methods/'High Availability/HA_KeepAliveD'/default/HA_KeepAliveD/methods/'method_call'/default/pa
ckage_present/methods/'action'/default/ncf_package/packages/'/var/rudder/tmp/keepalived.rpm'[1]
rudder    debug: Getting supported API version.
rudder    debug: Opened fds 4 and 7 for command '/var/rudder/cfengine-community/modules/packages/zypper supports-api-version'.
rudder    debug: Data read from application pipe: 2 [1
]
rudder    debug: cf_pwait - Waiting for process 21539
rudder    debug: package wrapper API version: 1
rudder    debug: Successfully created package module wrapper for 'zypper' package module.
rudder    debug: Starting evaluating present action promise.
rudder    debug: Getting package '/var/rudder/tmp/keepalived.rpm' data.
rudder    debug: Opened fds 4 and 7 for command '/var/rudder/cfengine-community/modules/packages/zypper get-package-data'.
rudder    debug: Data read from application pipe: 17 [PackageType=file
]
rudder    debug: Data read warning: /var/rudder/tmp/keepalived.rpm: Header V3 RSA/SHA256 Signature, key ID 17280ddf: NOKEY
error: Failed dependencies:
        libnetsnmp.so.30()(64bit) is needed by keepalived-1.3.3-39.1.x86_64
        libnetsnmpagent.so.30()(64bit) is needed by keepalived-1.3.3-39.1.x86_64
        libnetsnmpmibs.so.30()(64bit) is needed by keepalived-1.3.3-39.1.x86_64
from application pipe: 55 [Name=keepalived
Version=1.3.3-39.1
Architecture=x86_64
]
rudder    debug: cf_pwait - Waiting for process 21540
rudder    debug: Trying to update cache type: 0.
rudder  verbose: Skipping installed packages package cache update.
rudder    debug: Looking for key in installed packages cache: N<keepalived>V<1.3.3-39.1>A<x86_64>
rudder    debug: Looking for package keepalived in cache returned: 0
rudder    debug: Installing file type package.
rudder    debug: Installing package '/var/rudder/tmp/keepalived.rpm'
rudder    debug: Installing file type package: 'File=/var/rudder/tmp/keepalived.rpm
'
rudder    debug: Sending install command to package module: 'options=
File=/var/rudder/tmp/keepalived.rpm
'
rudder    debug: Opened fds 4 and 7 for command '/var/rudder/cfengine-community/modules/packages/zypper file-install'.
rudder    debug: cf_pwait - Waiting for process 21543
rudder  verbose: Command '/var/rudder/cfengine-community/modules/packages/zypper file-install' returned with non zero return code: 1
rudder     info: Some error occurred while communicating with package module while installing package.
rudder    debug: Evaluating present action promise status: f
   error: Error installing package '/var/rudder/tmp/keepalived.rpm'
rudder  verbose: C:    + promise outcome class 'repair_failed_ncf_package_present__var_rudder_tmp_keepalived_rpm'
rudder    debug: Setting class: default:repair_failed_ncf_package_present__var_rudder_tmp_keepalived_rpm
rudder  verbose: C:    + promise outcome class 'ncf_package_present__var_rudder_tmp_keepalived_rpm_failed'
rudder    debug: Setting class: default:ncf_package_present__var_rudder_tmp_keepalived_rpm_failed
rudder  verbose: C:    + promise outcome class 'ncf_package_present__var_rudder_tmp_keepalived_rpm_not_ok'
rudder    debug: Setting class: default:ncf_package_present__var_rudder_tmp_keepalived_rpm_not_ok
rudder  verbose: C:    + promise outcome class 'ncf_package_present__var_rudder_tmp_keepalived_rpm_error'
rudder    debug: Setting class: default:ncf_package_present__var_rudder_tmp_keepalived_rpm_error
rudder  verbose: C:    + promise outcome class 'ncf_package_present__var_rudder_tmp_keepalived_rpm_not_kept'
rudder    debug: Setting class: default:ncf_package_present__var_rudder_tmp_keepalived_rpm_not_kept
rudder  verbose: C:    + promise outcome class 'ncf_package_present__var_rudder_tmp_keepalived_rpm_not_repaired'
rudder    debug: Setting class: default:ncf_package_present__var_rudder_tmp_keepalived_rpm_not_repaired
rudder  verbose: C:    + promise outcome class 'ncf_package_present__var_rudder_tmp_keepalived_rpm_reached'
rudder    debug: Setting class: default:ncf_package_present__var_rudder_tmp_keepalived_rpm_reached
rudder  verbose: A: Promise NOT KEPT!
rudder  verbose: P: END packages promise (/var/rudder/tmp/keepalived.rpm)
rudder  verbose: V: .........................................................
Actions #4

Updated by Benoît PECCATTE about 7 years ago

  • Severity set to Minor - inconvenience | misleading | easy workaround
  • User visibility set to Operational - other Techniques | Technique editor | Rudder settings
  • Effort required set to Large
  • Priority changed from 0 to 2

This is a complex issue because the package management is deeply embedded in the agent logic. So changing this behaviour needs a lot work and discussion with cfengine.

Actions #5

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 1.1 to 4.1.9
Actions #6

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 4.1.9 to 4.1.10
Actions #7

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 4.1.10 to 4.1.11
Actions #8

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.1.11 to 4.1.12
Actions #9

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.1.12 to 4.1.13
Actions #10

Updated by Benoît PECCATTE over 6 years ago

  • Target version changed from 4.1.13 to 411
Actions #11

Updated by Benoît PECCATTE over 6 years ago

  • Target version changed from 411 to 4.1.13
Actions #12

Updated by Alexis Mousset over 6 years ago

  • Tracker changed from Bug to User story
  • Subject changed from Package present with local rpm on version "latest" fails to install to Add a "latest" version criteria for local file install in package modules
  • Severity deleted (Minor - inconvenience | misleading | easy workaround)
  • Priority deleted (2)

Setting to user story as it is not actually a bug, but a feature that is not currently possible with package methods.

Actions #13

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.1.13 to 4.1.14
Actions #14

Updated by Benoît PECCATTE over 6 years ago

  • Target version changed from 4.1.14 to 4.1.15
Actions #15

Updated by Vincent MEMBRÉ about 6 years ago

  • Target version changed from 4.1.15 to 4.1.16
Actions #16

Updated by Vincent MEMBRÉ about 6 years ago

  • Target version changed from 4.1.16 to 4.1.17
Actions #17

Updated by Vincent MEMBRÉ about 6 years ago

  • Target version changed from 4.1.17 to 4.1.18
Actions #18

Updated by Vincent MEMBRÉ almost 6 years ago

  • Target version changed from 4.1.18 to 4.1.19
Actions #19

Updated by Alexis Mousset almost 6 years ago

  • Target version changed from 4.1.19 to 4.1.20
Actions #20

Updated by François ARMAND almost 6 years ago

  • Target version changed from 4.1.20 to 4.1.21
Actions #21

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 4.1.21 to 4.1.22
Actions #22

Updated by Benoît PECCATTE over 5 years ago

  • Target version changed from 4.1.22 to 5.0.10
Actions #23

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 5.0.10 to 5.0.11
Actions #24

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 5.0.11 to 5.0.12
Actions #25

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 5.0.12 to 5.0.13
Actions #26

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 5.0.13 to 5.0.14
Actions #27

Updated by Vincent MEMBRÉ about 5 years ago

  • Target version changed from 5.0.14 to 5.0.15
Actions #28

Updated by Vincent MEMBRÉ about 5 years ago

  • Target version changed from 5.0.15 to 5.0.16
Actions #29

Updated by Alexis Mousset almost 5 years ago

  • Target version changed from 5.0.16 to 5.0.17
Actions #30

Updated by Vincent MEMBRÉ over 4 years ago

  • Target version changed from 5.0.17 to 5.0.18
Actions #31

Updated by Benoît PECCATTE over 4 years ago

  • Target version changed from 5.0.18 to 6.2.0~beta1
Actions #32

Updated by Vincent MEMBRÉ about 4 years ago

  • Target version changed from 6.2.0~beta1 to 6.2.0~rc1
Actions #33

Updated by François ARMAND about 4 years ago

  • Target version deleted (6.2.0~rc1)
Actions #34

Updated by Benoît PECCATTE about 3 years ago

  • Project changed from 41 to Rudder
  • Category changed from Generic methods - Package Management to Generic methods
Actions

Also available in: Atom PDF