Project

General

Profile

Bug #7777

Rudder-agent provides rudder-agent without a version

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

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Infrequent - complex configurations | third party integrations
Effort required:
Priority:
61
Tags:

Description

Currently there is a problem, that the rudder-agent rpm is not updated on SLES to the latest version by 'zypper up rudder-agent', even if available in the repository. (Fails on SLES11 SP1, works on SP2 and SP3)

Consulted SUSE, and apparently it is not good to provide the package name without a version by hand:

1) The packages self provides without version; i.e. 'in any version'

This is a time bomb. The package claims to provide a property which it does not
posses. It does not provide every version of custom-dnsmasq; only one specific.
Though the self-provides without version is obviously wrong, it's impossible to
tell whether the imposture will be detected or leads to trouble.

Even in an update scenario, where the package claims to be able to provide
versions higher than any other, this malformed provides is not the only
constraint. But it bears the risk that the package is elected and later not
able to keep its promise.

2) The way zypper translates the CLI arg 'custom-dnsmasq=2.0-2_g5e58fdc' into a
package.

Zypper looks for a package resolving the requirement
'custom-dnsmasq=2.0-2_g5e58fdc'. All packages proving 'custom-dnsmasq'
unversioned claim to be valid candidates.

The difference between SP1 and SP3 is just the way zypper elects a candidate.
SP3 has faster indices so it exploits the fact that every package provides
'name=version' and
does a quick check for package 'name' and' version' first.

If the quick check would not deliver a hit, SP3 would continue checking the
provides of all packages like SP1 does. SP3 seems to deliver what you expect,
but in fact the quick check just disguises the actual problem.

# rpm -q --provides -p 3.1.5/SLES_11_SP1/x86_64/rudder-agent-3.1.5.release-1.SLES.11.x86_64.rpm
warning: 3.1.5/SLES_11_SP1/x86_64/rudder-agent-3.1.5.release-1.SLES.11.x86_64.rpm: Header V3 RSA/SHA1 signature: NOKEY, key ID 6f07d355
rudder-agent
rudder-cfengine-community
rudder-agent = 1398866025:3.1.5.release-1.SLES.11

This was introduced by #5059, and the idea is also not bad, the problem is, this Provides: tag should be used to provide "virtual" packages, and not one, that actually exists in the repository as an RPM package by the same name...

I'd recommend to change the Provides to something more abstract, like "Rudder(agent)" or Rudder::Agent", otherwise the regular update mechanism will not work (at least on SLES11 SP1)...

Even if fixed, every current RPM installed on SP1, still containing the "Provides: rudder-agent" feature will have to be updated by hand by rpm -Uvh, since zypper will not find the update in this means...


Related issues

Related to Rudder - Bug #5059: rudder-agent rpm is obsoleted by rudder-agent-thin and therefore cannot be installedReleased2014-06-18
Related to Rudder - Bug #8914: Broken dependencies in 4.0 RPM because of epochReleased2016-09-05
Related to Rudder - Bug #3535: RPM packages: upgrades from one major branch to another don't always work because of the Epoch fieldReleased2013-04-25

Associated revisions

Revision 3ef4fbd4 (diff)
Added by Alexis MOUSSET 6 months ago

Fixes #7777: Rudder-agent provides rudder-agent without a version

History

#1 Updated by Janos Mattyasovszky almost 3 years ago

PS: This quote from SUSE came regarding a different RPM, but has the same Problem.

#2 Updated by Jonathan CLARKE almost 3 years ago

  • Related to Bug #5059: rudder-agent rpm is obsoleted by rudder-agent-thin and therefore cannot be installed added

#3 Updated by Jonathan CLARKE almost 3 years ago

  • Target version set to 2.11.18

That is indeed poor packaging. I don't know how that slipped in, but we should indeed not "provide" the same name as the package itself.

We need both rudder-agent and rudder-agent-thin to "provide" an identical string, so that other packages (rudder-server-root, rudder-server-relay) can depend on it.

#4 Updated by Jonathan CLARKE almost 3 years ago

  • Status changed from New to In progress
  • Assignee set to Jonathan CLARKE

#5 Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 2.11.18 to 2.11.19

#6 Updated by Janos Mattyasovszky almost 3 years ago

This would be a quick win ;-)

#7 Updated by Jonathan CLARKE almost 3 years ago

  • Tags set to Quick and important

Janos Mattyasovszky wrote:

This would be a quick win ;-)

Oops, apparently I forgot all about this! Thanks for the reminder, Janos.

#8 Updated by Nicolas CHARLES almost 3 years ago

  • Tags changed from Quick and important to Quick and important, sponsored

This issue is really important

#9 Updated by Janos Mattyasovszky almost 3 years ago

  • Pull Request set to https://github.com/Normation/rudder-packages/pull/891

#10 Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 2.11.19 to 2.11.20

#11 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 2.11.20 to 2.11.21

#12 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 2.11.21 to 2.11.22

#13 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 2.11.22 to 2.11.23

#14 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 2.11.23 to 2.11.24

#15 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 2.11.24 to 308

#16 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 308 to 3.1.14

#17 Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 3.1.14 to 3.1.15

#18 Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 3.1.15 to 3.1.16

#19 Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 3.1.16 to 3.1.17

#20 Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 3.1.17 to 3.1.18

#21 Updated by Nicolas CHARLES almost 2 years ago

  • Assignee changed from Jonathan CLARKE to Alexis MOUSSET

Alexis, you have insight on this one, especially on why it works on some sles and not on others
Could you list here on which versions of SLES it is supposed to work as it is now, and where we need to use something else, so that we can decide of a proper course of action ?

Thank you

#22 Updated by Janos Mattyasovszky almost 2 years ago

yaaay, we just had 1 year's anniversary a couple of days ago... Any ideas? I mean, the problem is known, the solution might be pretty easy...

#23 Updated by Florian Heigl almost 2 years ago

Yeah, like bump
This just ruined my night.

Had forgotten there was an issue.
What I can recap:
- The epoch is 2014... that seems just totally wrong.
- The epoch is used to compare versions IF RPM was unable to find the version.

So that means the base thing is wrong, and the fallback is wrong, too.

My suggestion would be

1) fix the epoch, it needs to be updated if you bump version. This is not some optional thing to just do when the time is right
2) add this

Obsoletes: %{name} <= %{version}
Provides: %{name} = %{version}

-> You can test with any SUSE version except ancient on SUSE Studio
-> It's definitely not OK rpm-wise
-> I don't think it's really important which versions are more accepting of this
-> Best path is to fix it - then it'll be accepted by any version
-> You can offload testing for us, but please in a defined way so we can complete fully cooperate and track / cover cases.

TL;DR
Please, could you deliver packages of Rudder for SLES that can be updated using Rudder, on SLES, using the most basic means of Rudder... :-)

#24 Updated by Florian Heigl almost 2 years ago

And yeah, I know. Enterprise distros and their old RPM / libzypp.

But we discussed this internally and due to 3rd party support issues, especially Rudder, and certification issues, especially Oracle and just about everything else in the world, we won't be able to switch to AlpineLinux in Q1, to my big sad disappointment :)

#25 Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 3.1.18 to 3.1.19

#26 Updated by Alexis MOUSSET almost 2 years ago

  • Status changed from In progress to New

#27 Updated by Jonathan CLARKE over 1 year ago

  • Severity set to Major - prevents use of part of Rudder | no simple workaround
  • User visibility set to Operational - other Techniques | Technique editor | Rudder settings

#28 Updated by Benoît PECCATTE over 1 year ago

  • Priority set to 51

#29 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 3.1.19 to 3.1.20

#30 Updated by Jonathan CLARKE over 1 year ago

  • Assignee deleted (Alexis MOUSSET)

#31 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 3.1.20 to 3.1.21

#32 Updated by Benoît PECCATTE over 1 year ago

  • Tags changed from Quick and important, Sponsored to Sponsored

#33 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 3.1.21 to 3.1.22

#34 Updated by Benoît PECCATTE over 1 year ago

  • Priority changed from 51 to 64

#35 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 3.1.22 to 3.1.23

#36 Updated by François ARMAND over 1 year ago

  • Related to Bug #8914: Broken dependencies in 4.0 RPM because of epoch added

#37 Updated by François ARMAND over 1 year ago

  • Related to Bug #3535: RPM packages: upgrades from one major branch to another don't always work because of the Epoch field added

#38 Updated by Janos Mattyasovszky over 1 year ago

Please note, that the line

Provides: %{name} = %{version}

is automatically included by the rpmbuild process. You can check it with rpm -q --provides -p <rpm_package_name> for any RPM you have built.

#39 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 3.1.23 to 3.1.24

#40 Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 3.1.24 to 3.1.25

#41 Updated by François ARMAND about 1 year ago

  • User visibility changed from Operational - other Techniques | Technique editor | Rudder settings to Infrequent - complex configurations | third party integrations
  • Priority changed from 64 to 55

After more test&try, it was found that the problem only happen when rudder-agent is part of a zypper "pattern" and is used like that:
(say we have a rudder agent 4.1.6 installed):

This will find the newer version:

zypper install rudder-agent=4.1.7

But that won't:

zypper install --type=pattern Rudder-Server=4.1.7

#42 Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 3.1.25 to 387
  • Priority changed from 55 to 61

#43 Updated by Vincent MEMBRÉ 12 months ago

  • Target version changed from 387 to 4.1.10

#44 Updated by Vincent MEMBRÉ 10 months ago

  • Target version changed from 4.1.10 to 4.1.11

#45 Updated by Vincent MEMBRÉ 8 months ago

  • Target version changed from 4.1.11 to 4.1.12

#46 Updated by Vincent MEMBRÉ 7 months ago

  • Target version changed from 4.1.12 to 4.1.13

#47 Updated by Alexis MOUSSET 6 months ago

I think I just reproduced the problem:

zypper install rudder-agent=4.56.3
Loading repository data...
Reading installed packages...
'rudder-agent=4.56.3' not found in package names. Trying capabilities.
Resolving package dependencies...

The following NEW package is going to be installed:
  rudder-agent 

The problem is that the capabilities resolution ignores other parameters if a capability matches the name of the required package.

#48 Updated by Alexis MOUSSET 6 months ago

  • Status changed from New to In progress
  • Assignee set to Alexis MOUSSET

I'm taking over this issue!

#49 Updated by Alexis MOUSSET 6 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis MOUSSET to Jonathan CLARKE

#50 Updated by Alexis MOUSSET 6 months ago

  • Status changed from Pending technical review to In progress
  • Assignee changed from Jonathan CLARKE to Alexis MOUSSET
  • Pull Request changed from https://github.com/Normation/rudder-packages/pull/891 to https://github.com/Normation/rudder-packages/pull/1607

#51 Updated by Alexis MOUSSET 6 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis MOUSSET to Jonathan CLARKE

#52 Updated by Alexis MOUSSET 6 months ago

  • Status changed from Pending technical review to Pending release

#53 Updated by Janos Mattyasovszky 6 months ago

I suggest you keep an eye on this, as adding a Provides line with the same version that's added by rpmbuild itself is... well... something worth to have a look on :-)

#54 Updated by Vincent MEMBRÉ 5 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.13, 4.2.7 and 4.3.3 which were released today.

Also available in: Atom PDF