priorities for plugins repositories doesn't work

Bug #1602719 reported by Maciej Relewicz on 2016-07-13
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
High
Vladimir Kuklin
Mitaka
High
Vladimir Kuklin

Bug Description

in /etc/nailgun/settings.yaml I have:
REPO_PRIORITIES:
  plugins:
    centos: 10
    ubuntu: 1100

I try to replace package fuel-ha-utils (with changed ocf script). I already have prepared package, delivered by my plugin, but fuel installing packaged from iso. Package from plugin have default (500) priority.

root@node-1:~# apt-cache policy fuel-ha-utils
fuel-ha-utils:
  Installed: 9.0.0-1~u14.04+mos8460
  Candidate: 9.0.0-1~u14.04+mos8460
  Version table:
 *** 9.0.0-1~u14.04+mos8460 0
       1050 http://10.109.0.2:8080/mitaka-9.0/ubuntu/x86_64/ mos9.0/main amd64 Packages
        500 http://10.109.0.2:8080/plugins/networking-sfc-1.0/repositories/ubuntu/ Packages
        100 /var/lib/dpkg/status

According to this document https://wiki.openstack.org/wiki/Fuel/Plugins#Prioritization_of_Repositories it should be working

Maciej Relewicz (rlu) on 2016-07-13
Changed in fuel:
assignee: nobody → Fuel Sustaining (fuel-sustaining-team)
status: New → Confirmed
importance: Undecided → Medium
milestone: none → 9.1
Vladimir Kuklin (vkuklin) wrote :

So this seems to be due to the fact that we do not configure apt::pins in plugin_setup_repositories.pp file- we only configure apt::sources there. So what we need to do is simply run generate_apt_pins for each list of repos of each plugin and call create_resources for apt::pin with these hashes.

Maciej Relewicz (rlu) on 2016-07-13
description: updated
tags: added: area-plugins
summary: - priorities for plugins repositories dosen't work
+ priorities for plugins repositories doesn't work
Dmitry Pyzhov (dpyzhov) on 2016-09-07
Changed in fuel:
milestone: 9.1 → 10.0
Vladimir Kuklin (vkuklin) wrote :

This bug is essential for plugins functioning. It needs to be marked as high and fixed ASAP

Changed in fuel:
importance: Medium → High
tags: added: customer-found
tags: added: area-library
Dmitry Pyzhov (dpyzhov) on 2016-09-08
Changed in fuel:
assignee: Fuel Sustaining (fuel-sustaining-team) → Vladimir Kuklin (vkuklin)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/370219

Changed in fuel:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/370219
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=6c941ce5e6b1f0f346d2387a08418e4c37814f0a
Submitter: Jenkins
Branch: stable/mitaka

commit 6c941ce5e6b1f0f346d2387a08418e4c37814f0a
Author: Vladimir Kuklin <email address hidden>
Date: Wed Sep 14 18:25:05 2016 +0300

    Fix plugins repositories pins generation

    Generate apt pins for repositories. Had to change plugin related
    functions as repo uri is slightly different - there is no 'dists'
    directory

    Change-Id: I064a145d07cd482c0f9602b3e87a07340c4bab8c
    Closes-bug: #1602719

Vladimir Kuklin (vkuklin) wrote :

The patch for stable/mitaka was reverted. Reopening

Changed in fuel:
status: In Progress → Triaged
Andrew Maksimov (maximov) wrote :

Moving to 9.2, it doesn't affect our major plugins (f.e. murano), also the workaround is available.

Kirill Zaitsev (kzaitsev) wrote :

Well, looks like we're affected by this bug, https://bugs.launchpad.net/fuel-plugin-murano/+bug/1624723 this bug seems to be caused by exactly this. The bug is not reproduced when installing murano from plugin on a clean installation (no stock murano). Only happens when murano is installed on top of pre-existing 9.0 murano.
The client's version is 0.8.4 after installation, while it should be 0.11

Kirill Zaitsev (kzaitsev) wrote :

ok, I'm currently confused a bit. this might be an error on our side since some of thepackages are updated and some are not

root@node-1:~# apt-cache policy murano-api
murano-api:
  Installed: 1:3.0.0~b3.dev30-1~u14.04+mos2
  Candidate: 1:3.0.0~b3.dev30-1~u14.04+mos2
  Version table:
 *** 1:3.0.0~b3.dev30-1~u14.04+mos2 0
       1200 http://10.20.0.2:8080/plugins/detach-murano-1.0/repositories/ubuntu/ Packages
        100 /var/lib/dpkg/status
     1:2.0.0-9~u14.04+mos25 0
       1050 http://10.20.0.2:8080/mitaka-9.0/ubuntu/x86_64/ mos9.0/main amd64 Packages
root@node-1:~# apt-cache policy python-muranoclient
python-muranoclient:
  Installed: 0.8.4-3~u14.04+mos11
  Candidate: 0.11.0.dev6-1~u14.04+mos2
  Version table:
     0.11.0.dev6-1~u14.04+mos2 0
       1200 http://10.20.0.2:8080/plugins/detach-murano-1.0/repositories/ubuntu/ Packages
 *** 0.8.4-3~u14.04+mos11 0
       1050 http://10.20.0.2:8080/mitaka-9.0/ubuntu/x86_64/ mos9.0/main amd64 Packages
        100 /var/lib/dpkg/status

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/373230

Changed in fuel:
status: Triaged → In Progress
Changed in fuel:
assignee: Vladimir Kuklin (vkuklin) → Maksim Malchuk (mmalchuk)
Changed in fuel:
assignee: Maksim Malchuk (mmalchuk) → Vladimir Kuklin (vkuklin)

Reviewed: https://review.openstack.org/410918
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=6aff0ce1f4b0108e31421c1e6f0940724915e0b6
Submitter: Jenkins
Branch: stable/newton

commit 6aff0ce1f4b0108e31421c1e6f0940724915e0b6
Author: Vladimir Kuklin <email address hidden>
Date: Wed Sep 14 18:25:05 2016 +0300

    Fix plugins repositories pins generation

    Generate apt pins for repositories. Had to change plugin related
    functions as repo uri is slightly different - there is no 'dists'
    directory

    Change-Id: I064a145d07cd482c0f9602b3e87a07340c4bab8c
    Depends-On: I4d4ccbd43fb9ccff13196ff92671f07d143905a5
    Closes-bug: #1602719

tags: added: in-stable-newton
Changed in fuel:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/370222
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=f87432590535a179b05088f23901c2edee11891f
Submitter: Jenkins
Branch: master

commit f87432590535a179b05088f23901c2edee11891f
Author: Vladimir Kuklin <email address hidden>
Date: Wed Sep 14 18:25:05 2016 +0300

    Fix plugins repositories pins generation

    Generate apt pins for repositories. Had to change plugin related
    functions as repo uri is slightly different - there is no 'dists'
    directory

    Change-Id: I064a145d07cd482c0f9602b3e87a07340c4bab8c
    Depends-On: I4d4ccbd43fb9ccff13196ff92671f07d143905a5
    Closes-bug: #1602719

Reviewed: https://review.openstack.org/373230
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=2b8ef6b89ddb1bbc04f1be2258a229fbcff3df80
Submitter: Jenkins
Branch: stable/mitaka

commit 2b8ef6b89ddb1bbc04f1be2258a229fbcff3df80
Author: Vladimir Kuklin <email address hidden>
Date: Wed Sep 14 18:25:05 2016 +0300

    Fix plugins repositories pins generation

    Generate apt pins for repositories. Had to change plugin related
    functions as repo uri is slightly different - there is no 'dists'
    directory

    cherry-picked from https://review.openstack.org/#/c/370222/

    Change-Id: If24633d4b438b1884d18bd83e70ff413ab4e8e30
    Depends-On: I4d4ccbd43fb9ccff13196ff92671f07d143905a5
    Closes-bug: #1602719

tags: added: on-verification

Verified on 9.2 snapshot #801.

Steps to verify:
1. Deploy ubuntu cluster with any plugin, for example ldap plugin
2. ssh to slave node and check priority of plugin's repo in 'apt-cache policy' output

Actual results:
Priority is 1100:
1100 http://10.109.25.2:8080/plugins/ldap-3.0/repositories/ubuntu/ Packages
     release v=3.0,l=ldap,c=
     origin 10.109.25.2

tags: removed: on-verification

This issue was fixed in the openstack/fuel-library 11.0.0.0rc1 release candidate.

tags: added: on-verification

Verified on 10.0 snapshot #1566.

Priority of plugin's repo is 1100.

tags: removed: on-verification
Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers