Fuel 6.1 duplicate sources.list entry after plugin update

Bug #1513956 reported by Alexander Vlasov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Evgeniy L
6.1.x
Won't Fix
Medium
Fuel Python (Deprecated)
7.0.x
Won't Fix
Medium
Fuel Python (Deprecated)
Mitaka
Fix Committed
High
Alexey Shtokolov
Newton
Fix Released
High
Evgeniy L

Bug Description

Hello,
I'm not sure this is the right place to ask this question. If it is not please point me to the right one.
I've faced following minor issue. It is only warning message during apt actions, but we're building better world and it would be nice to have no warnings :)

First of all what we're doing - we're unlocking Fuel environment(nailgun patch) and updating fuel-library and plugin (only minor version changed i.e. 1.3.211 -> 1.3.213). with command
fuel plugins --update plugin_name-1.3.213.rpm

As result we have files updated in plugins directory, and rpm post
action executed(so that we can modify for example some task as this is MOS 6.1).
Then while executing deploy on any node during astute task
upload_core_repos
on each node new repo.list is created so we have
/etc/apt/sources.list.d/plugin_name-1.3.211.list
/etc/apt/sources.list.d/plugin_name-1.3.213.list

but inside each of them has the same url
deb http://10.128.50.2:8080/plugins/plugin_name-1.3/repositories/ubuntu /

and it is correct seems we didn't create new plugin and new directory for it ans so on.
But for example if we execute apt-get update we get following warning

W: Duplicate sources.list entry http://10.128.50.2:8080/plugins/plugin_name-ui-1.3/repositories/ubuntu/ Packages (/var/lib/apt/lists/10.128.50.2:8080_plugins_plugin_name-1.3_repositories_ubuntu_Packages)

If we changed following function in nailgun and replace
  'name': plugin.full_name
wth
  'name': plugin.path_name,

which returns only major version instead of a full version we could avoid this, cause for each major version file with name
/etc/apt/sources.list.d/plugin_name-1.3.list
would exist

 def get_ubuntu_repo(self, plugin):
        return {
            'type': 'deb',
            #'name': plugin.full_name,
            'name': plugin.path_name,
            'uri': plugin.repo_url(self.cluster),
            'suite': '/',
            'section': '',
            'priority': settings.REPO_PRIORITIES['plugins']['ubuntu']}

So I would like to ask if it is right approach and if then this should be done for a long term

Revision history for this message
Artem Roma (aroma-x) wrote :

Please, provide diagnostic snapshot from environment where issue is reproduced

Changed in fuel:
milestone: none → 6.1-updates
milestone: 6.1-updates → 8.0
status: New → Incomplete
Artem Roma (aroma-x)
tags: added: area-plugins area-python
Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
Revision history for this message
Alexander Vlasov (avlasov) wrote :

I'm afraid I can't attach diagnostic snapshot cause it seems to contain passwords (part of lab is shared and it is not allowed reveal this info)

I described how I get that warning . If you're not able to create test env I will create another lab env later

Just in case I'm attaching patch file which might resolve this isseu

Dmitry Pyzhov (dpyzhov)
tags: removed: area-plugins
Changed in fuel:
status: Incomplete → Confirmed
importance: Undecided → Medium
Revision history for this message
Alexander Kislitsky (akislitsky) wrote :

We passed SCF in 8.0. Moving the bug to 9.0.

Changed in fuel:
milestone: 8.0 → 9.0
Dmitry Pyzhov (dpyzhov)
tags: added: feature-plugins
Revision history for this message
Bug Checker Bot (bug-checker) wrote : Autochecker

(This check performed automatically)
Please, make sure that bug description contains the following sections filled in with the appropriate data related to the bug you are describing:

actual result

expected result

steps to reproduce

For more detailed information on the contents of each of the listed sections see https://wiki.openstack.org/wiki/Fuel/How_to_contribute#Here_is_how_you_file_a_bug

tags: added: need-info
Revision history for this message
Evgeniy L (rustyrobot) wrote :

It hit badly one of our users, increasing the priority. Fix requires couple lines of code, I'm wondering how it didn't get fixed for a year.

tags: added: customer-found
removed: need-info
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

Fix proposed to branch: master
Review: https://review.openstack.org/409283

Changed in fuel:
assignee: Fuel Sustaining (fuel-sustaining-team) → Evgeniy L (rustyrobot)
status: Confirmed → In Progress
Evgeniy L (rustyrobot)
Changed in fuel:
importance: Medium → High
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 10.0 → 11.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/409283
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=77e29ab206937efa05746451ebe86f94eb428a7f
Submitter: Jenkins
Branch: master

commit 77e29ab206937efa05746451ebe86f94eb428a7f
Author: Evgeny L <email address hidden>
Date: Wed Dec 7 22:07:15 2016 +0000

    Use only first two number from version in repositories file names

    Otherwise during plugin update it creates multiple repository files.

    Closes-bug: #1513956
    Change-Id: Ie2e8288b3b701f07cb3c180e9b919860b7db562e

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/415267

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (stable/mitaka)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (stable/mitaka)

Reviewed: https://review.openstack.org/415268
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=576666504ee434548936b3788c9262c59bb95356
Submitter: Jenkins
Branch: stable/mitaka

commit 576666504ee434548936b3788c9262c59bb95356
Author: Evgeny L <email address hidden>
Date: Wed Dec 7 22:07:15 2016 +0000

    Use only first two number from version in repositories file names

    Otherwise during plugin update it creates multiple repository files.

    Closes-bug: #1513956
    Change-Id: Ie2e8288b3b701f07cb3c180e9b919860b7db562e
    (cherry picked from commit 77e29ab206937efa05746451ebe86f94eb428a7f)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (stable/newton)

Reviewed: https://review.openstack.org/415267
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=ce32f17bb72abd11581f5ad968680df66b064ecd
Submitter: Jenkins
Branch: stable/newton

commit ce32f17bb72abd11581f5ad968680df66b064ecd
Author: Evgeny L <email address hidden>
Date: Wed Dec 7 22:07:15 2016 +0000

    Use only first two number from version in repositories file names

    Otherwise during plugin update it creates multiple repository files.

    Closes-bug: #1513956
    Change-Id: Ie2e8288b3b701f07cb3c180e9b919860b7db562e
    (cherry picked from commit 77e29ab206937efa05746451ebe86f94eb428a7f)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/fuel-web 11.0.0.0rc1

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

tags: added: on-verification
Revision history for this message
Ilya Bumarskov (ibumarskov) wrote :

Verified by Vladimir Khlyunev on Fuel 10 build #1575

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.