Extra and main ubuntu repos priority issue

Bug #1446686 reported by Bogdan Dobrelya
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Ihor Kalnytskyi
6.0.x
Invalid
Undecided
Unassigned

Bug Description

When some extra Ubuntu repo is added in UI with some priority, deployed Ubuntu nodes show unexpected priorities in apt-cache policy output. For example (see attached screenshot), the external repo is:

# cat /etc/apt/sources.list.d/mos-test.list
deb http://obs-1.mirantis.com:82/trusty-fuel-6.1-stable-5388/reprepro/ trusty main

# cat /etc/apt/preferences.d/mos-test
Package: *
Pin: release a=trusty,c=main
Pin-Priority: 1150

# apt-cache policy corosync
corosync:
  Installed: 2.3.3-1ubuntu1
  Candidate: 2.3.3-1ubuntu1
  Version table:
     2.3.4-0u~u14.04+mos1 0
        500 http://obs-1.mirantis.com:82/trusty-fuel-6.1-stable-5388/reprepro/ trusty/main amd64 Packages
 *** 2.3.3-1ubuntu1 0
       1100 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

But if I changed the preferences pinning to:

# cat /etc/apt/preferences.d/mos-test
Package: *
Pin: release n=trusty*
Pin-Priority: 1150

It would show an expected candidate now:

# apt-cache policy corosync
corosync:
  Installed: 2.3.3-1ubuntu1
  Candidate: 2.3.4-0u~u14.04+mos1
  Package pin: 2.3.4-0u~u14.04+mos1
  Version table:
     2.3.4-0u~u14.04+mos1 1150
        500 http://obs-1.mirantis.com:82/trusty-fuel-6.1-stable-5388/reprepro/ trusty/main amd64 Packages
 *** 2.3.3-1ubuntu1 1150
       1100 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Bogdan Dobrelya (bogdando) wrote :
Changed in fuel:
assignee: nobody → MOS Linux (mos-linux)
importance: Undecided → High
milestone: none → 6.1
Changed in fuel:
assignee: MOS Linux (mos-linux) → Fuel Library Team (fuel-library)
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

Note, this issue may be not valid for official mirrors, but our QA team should have a clearly documented way to test OBS test repos

Changed in fuel:
assignee: Fuel Library Team (fuel-library) → MOS Linux (mos-linux)
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

@Aleksandr, please explain why you assign this to Fuel library. Puppet does not configure Ubuntu repos in Fuel currently

Revision history for this message
Alexei Sheplyakov (asheplyakov) wrote :

nailgun generates a broken pinning rules. MOS Linux has nothing to do with that.

Changed in fuel:
assignee: MOS Linux (mos-linux) → Vladimir Kozhukalov (kozhukalov)
Revision history for this message
Alexei Sheplyakov (asheplyakov) wrote :

The code which generates broken pinning rules: https://review.openstack.org/166774

Revision history for this message
Alexei Sheplyakov (asheplyakov) wrote :
Changed in fuel:
assignee: Vladimir Kozhukalov (kozhukalov) → Igor Kalnitsky (ikalnitsky)
status: New → In Progress
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : 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>

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

I tested this fix with the ISO #338 and now the pinning looks good, as for me. Thank you!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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