Project

General

Profile

User story #11589

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

Added by Janos Mattyasovszky almost 3 years ago. Updated 4 months ago.

Status:
New
Priority:
N/A
Assignee:
-
Category:
Generic methods - Package Management
Target version:
Pull Request:
Suggestion strength:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Large

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'
#1

Updated by Alexis MOUSSET almost 3 years ago

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

Updated by Alexis MOUSSET almost 3 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)?

#3

Updated by Janos Mattyasovszky almost 3 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: .........................................................
#4

Updated by Benoît PECCATTE almost 3 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.

#5

Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 1.1 to 4.1.9
#6

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 4.1.9 to 4.1.10
#7

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 4.1.10 to 4.1.11
#8

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 4.1.11 to 4.1.12
#9

Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 4.1.12 to 4.1.13
#10

Updated by Benoît PECCATTE about 2 years ago

  • Target version changed from 4.1.13 to 411
#11

Updated by Benoît PECCATTE about 2 years ago

  • Target version changed from 411 to 4.1.13
#12

Updated by Alexis MOUSSET about 2 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.

#13

Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 4.1.13 to 4.1.14
#14

Updated by Benoît PECCATTE about 2 years ago

  • Target version changed from 4.1.14 to 4.1.15
#15

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 4.1.15 to 4.1.16
#16

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 4.1.16 to 4.1.17
#17

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.1.17 to 4.1.18
#18

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.1.18 to 4.1.19
#19

Updated by Alexis MOUSSET over 1 year ago

  • Target version changed from 4.1.19 to 4.1.20
#20

Updated by François ARMAND over 1 year ago

  • Target version changed from 4.1.20 to 4.1.21
#21

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.1.21 to 4.1.22
#22

Updated by Benoît PECCATTE over 1 year ago

  • Target version changed from 4.1.22 to 5.0.10
#23

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 5.0.10 to 5.0.11
#24

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 5.0.11 to 5.0.12
#25

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 5.0.12 to 5.0.13
#26

Updated by Vincent MEMBRÉ 12 months ago

  • Target version changed from 5.0.13 to 5.0.14
#27

Updated by Vincent MEMBRÉ 11 months ago

  • Target version changed from 5.0.14 to 5.0.15
#28

Updated by Vincent MEMBRÉ 8 months ago

  • Target version changed from 5.0.15 to 5.0.16
#29

Updated by Alexis MOUSSET 6 months ago

  • Target version changed from 5.0.16 to 5.0.17
#30

Updated by Vincent MEMBRÉ 4 months ago

  • Target version changed from 5.0.17 to 5.0.18
#31

Updated by Benoît PECCATTE 4 months ago

  • Target version changed from 5.0.18 to 6.2.0~alpha1

Also available in: Atom PDF