EXTRA_DEB_REPOS_PRIORITY is applied to base MOS repository

Bug #1510516 reported by Aleksandra Fedorova
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Alexander Evseev

Bug Description

When we add extra repository for system tests via exporting EXTRA_DEP_REPOS variable, those repositories get the same priority as base MOS repository, thus we can not test extra packages properly.

Setting EXTRA_DEB_REPOS_PRIORITY parameter explicitly doesn't help, as the same priority is applied to the base MOS repo as well as for extra repositories.

See logs for BVT triggered with
EXTRA_DEP_REPOS="deb http://perestroika-repo-tst.infra.mirantis.net/review/CR-13037/mos-repos/ubuntu/8.0/ mos8.0 main"
EXTRA_DEB_REPOS_PRIORITY =1152

root@node-1:~# apt-cache policy neutron-common
neutron-common:
  Installed: 2:7.0.0.0b2-1~u14.04+mos6282
  Candidate: 2:7.0.0.0b2-1~u14.04+mos6282
  Version table:
 *** 2:7.0.0.0b2-1~u14.04+mos6282 0
       1152 http://10.109.10.2:8080/2015.1.0-8.0/ubuntu/x86_64/ mos8.0/main amd64 Packages
        100 /var/lib/dpkg/status
     2:7.0.0-1~u14.04+mos6283+git.3600957.1740cde 0
       1152 http://perestroika-repo-tst.infra.mirantis.net/review/CR-13037/mos-repos/ubuntu/8.0/ mos8.0/main amd64 Packages
     1:2014.1.5-0ubuntu1 0
       1001 http://mirror-pkgs.vm.mirantis.net/ubuntu-2015-10-26-170158/ trusty-updates/main amd64 Packages
     1:2014.1.3-0ubuntu1.1 0
       1001 http://mirror-pkgs.vm.mirantis.net/ubuntu-2015-10-26-170158/ trusty-security/main amd64 Packages
     1:2014.1-0ubuntu1 0
       1001 http://mirror-pkgs.vm.mirantis.net/ubuntu-2015-10-26-170158/ trusty/main amd64 Packages

Tags: area-ci
Maciej Relewicz (rlu)
Changed in fuel:
milestone: none → 8.0
Maciej Relewicz (rlu)
Changed in fuel:
assignee: nobody → Fuel Library Team (fuel-library)
importance: Undecided → Low
Revision history for this message
Aleksandra Fedorova (bookwar) wrote :

This bug has high priority as it affects the possibility to run custom tests and can lead to false positives, because changed packages are not applied on the environment

Changed in fuel:
importance: Low → High
Revision history for this message
Dennis Dmitriev (ddmitriev) wrote :

According to sys_test.log , priority for repositories were set correctly in cluster attributes for Nailgun.

See on Jenkins product the job 8.0.custom.ubuntu.bvt_2/130/artifact/logs/sys_test.log :

================
2015-10-27 11:06:41,075 - DEBUG __init__.py:55 -- Calling: update_cluster_attributes with args: ...

Formatted repositories list from this request: http://paste.openstack.org/show/477474/ :

        u'name':u'mos',
        u'section':u'main restricted',
        u'uri':u'http://10.109.10.2:8080/2015.1.0-8.0/ubuntu/x86_64',
        u'priority':1050,
...
        u'name':u'extra-6',
        u'section':u'main',
        u'uri':u'http://perestroika-repo-tst.infra.mirantis.net/review/CR-13037/mos-repos/ubuntu/8.0/',
        u'priority':1152,

summary: - EXTRA_DEP_REPOS_PRIORITY is applied to base MOS repository
+ EXTRA_DEB_REPOS_PRIORITY is applied to base MOS repository
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

This repo content gets uploaded by fuel-qa, not by anything related to fuel library. Kindly do not move this back to fuel-library

Changed in fuel:
assignee: Fuel Library Team (fuel-library) → Fuel QA Team (fuel-qa)
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

Sorry, I wrote that hastily. The value is set correctly as defined, but updates the priority for the other repo. http://paste.openstack.org/show/26BP8HS2mLONUnG9Kc4C/
To investigate further, we need a live env or a copy of /etc/apt*

Revision history for this message
Aleksandra Fedorova (bookwar) wrote :
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

Configuring the extra repository adds a new preference file that takes preference over the mos.pref file:
Package: *
Pin: release n=mos8.0,o=Mirantis,l=mos8.0,a=mos8.0
Pin-Priority: 1050

with the extra-0.pref file:
Package: *
Pin: release n=mos8.0,a=mos8.0,l=mos8.0
Pin-Priority: 1152

The problem is the pinning criteria are the same. The difference here is the origin. We should solve the repo pinning dilemma this way:
Add origin into the prefs file for each repo pref file. The new format should be as follows:
Package: *
Pin: release n=mos8.0,a=mos8.0,l=mos8.0
Pin: origin $hostname_or_ip_of_repository
Pin-Prority: $priority

And we should fix this in fuel-agent where this config is generated

Revision history for this message
Alexander Gordeev (a-gordeev) wrote :

Folks, i'm pretty sure that it's https://bugs.launchpad.net/fuel/+bug/1483768 once again. So feel free to re-open it, or mark this one a duplicate.

Also, http://perestroika-repo-tst.infra.mirantis.net/review/CR-13230/mos-repos/ubuntu/8.0/dists/mos8.0/Release doesn't contain "Origin: <MEANINGFUL VALUE>" line.

So, for now it affects 8.0 repos.

Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

Test repositories need to have an Origin field so that it differentiates itself from others. This must be fixed so that the metadata "n=mos8.0,a=mos8.0,l=mos8.0" is different slightly enough so we can write a proper pref file.

Secondly, after this is fixed, we could add a check into nailgun that compares the metadata between configured repositories and looks for conflicts. This may be a large amount of work, however.

Changed in fuel:
status: New → Confirmed
assignee: Fuel QA Team (fuel-qa) → Fuel build team (fuel-build)
Revision history for this message
Dmitry Burmistrov (dburmistrov) wrote :

The ORIGIN parameter hadn't been passed to publisher from build job

Changed in fuel:
assignee: Fuel build team (fuel-build) → Fuel CI team (fuel-ci)
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Related fix merged to fuel-infra/jenkins-jobs (master)

Reviewed: https://review.fuel-infra.org/13264
Submitter: Alexander Evseev <email address hidden>
Branch: master

Commit: 35d00ff69bdd97b78334de3641cafa1fbb52870f
Author: Alexander Evseev <email address hidden>
Date: Wed Oct 28 15:46:16 2015

Add missed origin for Ubuntu packages

Related-Bug: 1510516

Change-Id: I879108c3d11f2beb7fbe98cd496e4d9617dc6926

Dmitry Pyzhov (dpyzhov)
tags: added: area-ci
Revision history for this message
Aleksandra Fedorova (bookwar) wrote :

Fixed on CI, filed a separate issue https://bugs.launchpad.net/fuel/+bug/1514920

Changed in fuel:
assignee: Fuel CI team (fuel-ci) → Fuel Python Team (fuel-python)
assignee: Fuel Python Team (fuel-python) → Alexander Evseev (aevseev-h)
status: Confirmed → Fix Released
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.