[IBP] implement pinning by origin

Bug #1438783 reported by Alexander Gordeev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Nikolay Markov

Bug Description

The current implementation fails to address a basic use case, that is, installing a package from a 3rd party repository.

Say, a user would like to install ceph from http://ceph.com/debian-firefly (no matter what its version is) and adds Inktank APT repo

deb http://ceph.com/debian-firefly trusty main

with a priority 1100.

The pinning rules produced by the current code (with this patch applied) are

Package: *
Pin: a=trusty, c=main
Pin-Priority: 1100

These rules match *both* ceph packages from Canonical repo (http://archive.ubuntu.com/ubuntu trusty main) and from Inktank one (http://ceph.com/debian-firefly trusty main). As a result the newest package will be installed, which is not what the user wants. In fact installing the newest available version of a package is a default behavior, it does not require any pinning at all.

The correct approach is to make use of the APT repo metadata (Origin, Label, Codename, etc) in the pinning rules. For instance for the above mentioned Inktank repo the following rules should be produced:

Package: *
Pin: release o=Inktank, n=trusty
Pin-Priority: 1100

Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: none → 6.1
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

Needs to be documented

Changed in fuel:
milestone: 6.1 → 7.0
status: New → Confirmed
tags: added: feature-remote-repos
Revision history for this message
Dmitry Borodaenko (angdraug) wrote :

I don't think we can postpone this to 7.0, this bug makes adding extra deb repositories (which is a requirement for this feature according to https://review.openstack.org/#/c/154973/7/specs/6.1/consume-external-ubuntu.rst) so unreliable that it's almost useless.

Changed in fuel:
milestone: 7.0 → 6.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-web (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/175358

Revision history for this message
Vladimir Kozhukalov (kozhukalov) wrote :

The same change needs to be added to Fuel Agent (image building)

Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Igor Kalnitsky (ikalnitsky)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/175358
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=46cd6a8d8e943669e4cb7557551a3e4eeae0019c
Submitter: Jenkins
Branch: master

commit 46cd6a8d8e943669e4cb7557551a3e4eeae0019c
Author: Igor Kalnitsky <email address hidden>
Date: Wed Apr 15 18:05:45 2015 +0300

    Implement advanced apt pinning

    Current approach is an error prone, because Debian repos may contain
    metadata that doesn't fit our pinning template. Yes, in some cases
    our template will work (and it does with upstream Ubuntu and Fuel),
    but we want to be flexible and cover all cases.

    In order to set corrent pinning, we have to use repo's metadata and
    that means download repo's Release file, parse it and create pinning
    based on it. In that case we'll use all available pinning rules, so
    all possible issues will be up to repo maintainer and not because
    we're using error prone approach.

    Related-Bug: #1435892
    Related-Bug: #1438783
    Closes-Bug: #1446686

    Change-Id: I5279b7f414f831503fd993109dd5c91bef51a9ef
    Signed-off-by: Igor Kalnitsky <email address hidden>

Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: Igor Kalnitsky (ikalnitsky) → Nikolay Markov (nmarkov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/175813
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=997478796b5c76d5da54edf4ee56312c501c48d8
Submitter: Jenkins
Branch: master

commit 997478796b5c76d5da54edf4ee56312c501c48d8
Author: Nikolay Markov <email address hidden>
Date: Tue Apr 21 14:22:17 2015 +0300

    Correct APT pinning

    In order to set corrent pinning, we have to use repo's metadata and
    that means download repo's Release file, parse it and create pinning
    based on it. In that case we'll use all available pinning rules, so
    all possible issues will be up to repo maintainer and not because
    we're using error prone approach.

    Port-Of: https://review.openstack.org/#/c/175358/

    Co-Authored-By: Igor Kalnitsky <email address hidden>
    Related-Bug: #1438783

    Change-Id: I71f2b72d914a39bbdf3f094e6b8fdd407fdc725b

Nikolay Markov (nmarkov)
Changed in fuel:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.