repos from perestroika-repo-tst.infra.mirantis.net don't have Origin in Release file

Bug #1483768 reported by Timur Sufiev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Dmitry Burmistrov

Bug Description

Seems that repo priority in Fuel doesn't work as expected.

root@node-4:/etc/apt/preferences.d# cat LP-1478567.pref
Package: *
Pin: release a=mos7.0,n=mos7.0,l=mos7.0,c=main
Pin-Priority: 1500root

@node-4:/etc/apt/preferences.d# cat mos.pref
Package: *
Pin: release o=Mirantis,a=mos7.0,n=mos7.0,l=mos7.0,c=main
Pin-Priority: 1050

Package: *
Pin: release o=Mirantis,a=mos7.0,n=mos7.0,l=mos7.0,c=restricted

root@node-4:/etc/apt/preferences.d# apt-cache policy openstack-dashboard
openstack-dashboard:
  Installed: 1:2015.1.1-1~u14.04+mos4282
  Candidate: 1:2015.1.1-1~u14.04+mos4282
  Version table:
 *** 1:2015.1.1-1~u14.04+mos4282 0
       1500 http://10.109.31.2:8080/2015.1.0-7.0/ubuntu/x86_64/ mos7.0/main amd64 Packages
        100 /var/lib/dpkg/status
     1:2015.1.0-1~u14.04+mos4277+git.838f25c.f0e8367 0
       1500 http://perestroika-repo-tst.infra.mirantis.net/review/LP-1478567/mos-repos/ubuntu/ mos7.0/main amd64 Packages
     1:2014.1.5-0ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
     1:2014.1.2-0ubuntu1.1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     1:2014.1-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

But we want 1:2015.1.0-1~u14.04+mos4277+git.838f25c.f0e8367 instead of 1:2015.1.1-1~u14.04+mos4282

Workaround:
change /etc/apt/preferences.d/LP-1478567.pref
Pin: release a=mos7.0,n=mos7.0,l=mos7.0,c=main
->
Pin: origin perestroika-repo-tst.infra.mirantis.net

Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

Please provide more details.

Changed in fuel:
status: New → Incomplete
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :
Revision history for this message
Igor Yozhikov (iyozhikov) wrote :

root@node-4:/etc/apt/preferences.d# cat LP-1478567.pref
Package: *
Pin: release a=mos7.0,n=mos7.0,l=mos7.0,c=main
Pin-Priority: 1500root

@node-4:/etc/apt/preferences.d# cat mos.pref
Package: *
Pin: release o=Mirantis,a=mos7.0,n=mos7.0,l=mos7.0,c=main
Pin-Priority: 1050

Package: *
Pin: release o=Mirantis,a=mos7.0,n=mos7.0,l=mos7.0,c=restricted

root@node-4:/etc/apt/preferences.d# apt-cache policy openstack-dashboard
openstack-dashboard:
  Installed: 1:2015.1.1-1~u14.04+mos4282
  Candidate: 1:2015.1.1-1~u14.04+mos4282
  Version table:
 *** 1:2015.1.1-1~u14.04+mos4282 0
       1500 http://10.109.31.2:8080/2015.1.0-7.0/ubuntu/x86_64/ mos7.0/main amd64 Packages
        100 /var/lib/dpkg/status
     1:2015.1.0-1~u14.04+mos4277+git.838f25c.f0e8367 0
       1500 http://perestroika-repo-tst.infra.mirantis.net/review/LP-1478567/mos-repos/ubuntu/ mos7.0/main amd64 Packages
     1:2014.1.5-0ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
     1:2014.1.2-0ubuntu1.1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     1:2014.1-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

But we want 1:2015.1.0-1~u14.04+mos4277+git.838f25c.f0e8367 instead of 1:2015.1.1-1~u14.04+mos4282

Workaround:
change /etc/apt/preferences.d/LP-1478567.pref
Pin: release a=mos7.0,n=mos7.0,l=mos7.0,c=main
->
Pin: origin perestroika-repo-tst.infra.mirantis.net

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Updated summary with Igor's comment. Roman, is the current info in summary sufficient?

description: updated
Changed in fuel:
status: Incomplete → New
Revision history for this message
Alexander Gordeev (a-gordeev) wrote :

man apt_preferences

"If any specific-form records match an available package version then the first such record determines the priority of the package version. Failing that, if any general-form records match an available package version then the first such record determines the priority of the package version."

So, i don't think it's a bug. It's just a misunderstanding of how preferences works.

I see 2 ways to solve:

1) I think that perestroika-repo-tst.infra.mirantis.net should have different component name not just 'main'.

it could be 'main-testing' or something, it should n't interfere with already existent 'main'.

2) Also, you could provide proper 'Release' file, so pinning by origin will work. Just add something like
"Origin: MirantisTesting" to the beginning of Release file.

 Eg: http://perestroika-repo-tst.infra.mirantis.net/review/LP-1478567/mos-repos/ubuntu/dists/mos7.0/Release
doesnt contain any Origin

Forwarding to devops.

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

Forgot to mention, I'm up to 2 option :-)

Changed in fuel:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Fuel DevOps (fuel-devops)
milestone: none → 7.0
summary: - High custom repo priorities don't cause Fuel to install the package from
- this specific repo
+ repos from perestroika-repo-tst.infra.mirantis.net don't have Origin in
+ Release file
Changed in fuel:
assignee: Fuel DevOps (fuel-devops) → Dmitry Burmistrov (dburmistrov)
Roman Vyalov (r0mikiam)
Changed in fuel:
importance: Medium → High
Revision history for this message
Dmitry Burmistrov (dburmistrov) wrote :

Origin tag added to Release file
https://review.fuel-infra.org/10133/

Changed in fuel:
status: Confirmed → Fix Committed
Revision history for this message
Dmitry Tyzhnenko (dtyzhnenko) wrote :

Still reproduced on 7.0-301 GA

Cluster repos config - http://paste.openstack.org/show/475451/
behavior of apt - http://paste.openstack.org/show/475452/

Log snapshot - https://drive.google.com/a/mirantis.com/file/d/0B8U7EvTbuAOlb00tYkxLMm1GcjA/view?usp=sharing

Fuel version
{
    'build_id': '301',
    'build_number': '301',
    'release_versions': {'2015.1.0-7.0': {'VERSION': {
        'build_id': '301',
        'build_number': '301',
        'api': '1.0',
        'fuel-library_sha': '5d50055aeca1dd0dc53b43825dc4c8f7780be9dd',
        'nailgun_sha': '4162b0c15adb425b37608c787944d1983f543aa8',
        'feature_groups': ['mirantis'],
        'fuel-nailgun-agent_sha': 'd7027952870a35db8dc52f185bb1158cdd3d1ebd',
        'openstack_version': '2015.1.0-7.0',
        'fuel-agent_sha': '50e90af6e3d560e9085ff71d2950cfbcca91af67',
        'production': 'docker',
        'python-fuelclient_sha': '486bde57cda1badb68f915f66c61b544108606f3',
        'astute_sha': '6c5b73f93e24cc781c809db9159927655ced5012',
        'fuel-ostf_sha': '2cd967dccd66cfc3a0abd6af9f31e5b4d150a11c',
        'release': '7.0',
        'fuelmain_sha': 'a65d453215edb0284a2e4761be7a156bb5627677',
        }}},
    'auth_required': true,
    'api': '1.0',
    'fuel-library_sha': '5d50055aeca1dd0dc53b43825dc4c8f7780be9dd',
    'nailgun_sha': '4162b0c15adb425b37608c787944d1983f543aa8',
    'feature_groups': ['mirantis'],
    'fuel-nailgun-agent_sha': 'd7027952870a35db8dc52f185bb1158cdd3d1ebd',
    'openstack_version': '2015.1.0-7.0',
    'fuel-agent_sha': '50e90af6e3d560e9085ff71d2950cfbcca91af67',
    'production': 'docker',
    'python-fuelclient_sha': '486bde57cda1badb68f915f66c61b544108606f3',
    'astute_sha': '6c5b73f93e24cc781c809db9159927655ced5012',
    'fuel-ostf_sha': '2cd967dccd66cfc3a0abd6af9f31e5b4d150a11c',
    'release': '7.0',
    'fuelmain_sha': 'a65d453215edb0284a2e4761be7a156bb5627677',
    }

Changed in fuel:
status: Fix Committed → Confirmed
Revision history for this message
Nastya Urlapova (aurlapova) wrote :
Changed in fuel:
status: Confirmed → Fix Committed
Revision history for this message
Dmitry Tyzhnenko (dtyzhnenko) wrote :

Verified on 7.0-301 GA

Use http://perestroika-repo-tst.infra.mirantis.net/review/LP-1461036/mos-repos/ubuntu/7.0/

# ssh node-1 apt-cache policy keystone
Warning: Permanently added 'node-1' (RSA) to the list of known hosts.
keystone:
  Installed: 1:2015.1.0-1~u14.04+mos4434+git.1272e57.02dc682
  Candidate: 1:2015.1.0-1~u14.04+mos4434+git.1272e57.02dc682
  Version table:
 *** 1:2015.1.0-1~u14.04+mos4434+git.1272e57.02dc682 0
       1500 http://perestroika-repo-tst.infra.mirantis.net/review/LP-1461036/mos-repos/ubuntu/7.0/ mos7.0/main amd64 Packages
        100 /var/lib/dpkg/status
     1:2015.1.0-1~u14.04+mos4434 0
       1500 http://10.109.0.2:8080/2015.1.0-7.0/ubuntu/x86_64/ mos7.0/main amd64 Packages
     1:2014.1.5-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
     1:2014.1.3-0ubuntu2.1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     1:2014.1-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

Fuel version
{
    'build_id': '301',
    'build_number': '301',
    'release_versions': {'2015.1.0-7.0': {'VERSION': {
        'build_id': '301',
        'build_number': '301',
        'api': '1.0',
        'fuel-library_sha': '5d50055aeca1dd0dc53b43825dc4c8f7780be9dd',
        'nailgun_sha': '4162b0c15adb425b37608c787944d1983f543aa8',
        'feature_groups': ['mirantis'],
        'fuel-nailgun-agent_sha': 'd7027952870a35db8dc52f185bb1158cdd3d1ebd',
        'openstack_version': '2015.1.0-7.0',
        'fuel-agent_sha': '50e90af6e3d560e9085ff71d2950cfbcca91af67',
        'production': 'docker',
        'python-fuelclient_sha': '486bde57cda1badb68f915f66c61b544108606f3',
        'astute_sha': '6c5b73f93e24cc781c809db9159927655ced5012',
        'fuel-ostf_sha': '2cd967dccd66cfc3a0abd6af9f31e5b4d150a11c',
        'release': '7.0',
        'fuelmain_sha': 'a65d453215edb0284a2e4761be7a156bb5627677',
        }}},
    'auth_required': true,
    'api': '1.0',
    'fuel-library_sha': '5d50055aeca1dd0dc53b43825dc4c8f7780be9dd',
    'nailgun_sha': '4162b0c15adb425b37608c787944d1983f543aa8',
    'feature_groups': ['mirantis'],
    'fuel-nailgun-agent_sha': 'd7027952870a35db8dc52f185bb1158cdd3d1ebd',
    'openstack_version': '2015.1.0-7.0',
    'fuel-agent_sha': '50e90af6e3d560e9085ff71d2950cfbcca91af67',
    'production': 'docker',
    'python-fuelclient_sha': '486bde57cda1badb68f915f66c61b544108606f3',
    'astute_sha': '6c5b73f93e24cc781c809db9159927655ced5012',
    'fuel-ostf_sha': '2cd967dccd66cfc3a0abd6af9f31e5b4d150a11c',
    'release': '7.0',
    'fuelmain_sha': 'a65d453215edb0284a2e4761be7a156bb5627677',
    }

Changed in fuel:
status: Fix Committed → 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.