Invalid apt preference file for Fuel plugins

Bug #1435892 reported by Simon Pasquier
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Evgeniy L

Bug Description

This is on a fresh Ubuntu node with the elasticsearch_kibana plugin enabled but I presume that the issue exists for all Fuel plugins.

When the plugin ships a more recent version of a package that also exists in the MOS repository, apt won't install the newer package. Eventually this can fail the plugin's installation.

# apt-get install tzdata-java
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 tzdata-java : Depends: tzdata (= 2015b-0ubuntu0.14.04) but 2015a-0ubuntu0.14.04 is to be installed
N: Ignoring file 'elasticsearch_kibana-6.1.0' in directory '/etc/apt/preferences.d/' as it has an invalid filename extension
E: Unable to correct problems, you have held broken packages.

See the error above about the invalid filename extension for the elasticsearch_kibana plugin. Here is a copy of the preference files:

# cat preferences.d/elasticsearch_kibana
Package: *
Pin: release a=/
Pin-Priority: 1100

# cat preferences.d/MOS
Package: *
Pin: release a=trusty
Pin-Priority: 1001

Even after renaming the elasticsearch_kibana preference file, the output of 'apt-cache policy' highlights that pinning is ineffective (see how elasticsearch_kibana packages have a lower priority than MOS):

# apt-cache policy
Package files:
1100 /var/lib/dpkg/status
     release a=now
 500 http://10.20.0.2:8080/plugins/elasticsearch_kibana-6.1/repositories/ubuntu/ Packages
     origin 10.20.0.2
1001 http://10.20.0.2:8080/2014.2-6.1/ubuntu/x86_64/ trusty/main i386 Packages
     release o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=main
     origin 10.20.0.2
1001 http://10.20.0.2:8080/2014.2-6.1/ubuntu/x86_64/ trusty/main amd64 Packages
     release o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=main
     origin 10.20.0.2
Pinned packages:

Workaround:
===========

In our Puppet manifests, we force the installation of the offending package by specifying its version. See https://github.com/stackforge/fuel-plugin-elasticsearch-kibana/commit/9e56a544ade03e34b8727d5c517941148745b947

tags: added: plugins
description: updated
description: updated
description: updated
Changed in fuel:
assignee: nobody → Evgeniy L (rustyrobot)
milestone: none → 6.1
importance: Undecided → High
status: New → Confirmed
Dmitry Pyzhov (dpyzhov)
tags: added: feature-plugins
removed: plugins
Changed in fuel:
assignee: Evgeniy L (rustyrobot) → Igor Kalnitsky (ikalnitsky)
Dmitry Pyzhov (dpyzhov)
tags: added: tricky
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-web (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/175358

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related 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>

Revision history for this message
Ihor Kalnytskyi (ikalnytskyi) wrote :

Well, Nailgun patch is in master. So now it's time to implement appreciate changes in fuel plugin builder part.

It should be done by adding "Release" file to Ubuntu repo with the following content:

    Origin: author
    Label: plugin-name-without-spaces
    Version: plugin-major-version

Changed in fuel:
assignee: Igor Kalnitsky (ikalnitsky) → Vladimir Sharshov (vsharshov)
Evgeniy L (rustyrobot)
Changed in fuel:
assignee: Vladimir Sharshov (vsharshov) → Evgeniy L (rustyrobot)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugins (master)

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

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugins (master)

Reviewed: https://review.openstack.org/177260
Committed: https://git.openstack.org/cgit/stackforge/fuel-plugins/commit/?id=9fd654fa2b8e211f4e3e74bfa59c54f7636310e6
Submitter: Jenkins
Branch: master

commit 9fd654fa2b8e211f4e3e74bfa59c54f7636310e6
Author: Evgeniy L <email address hidden>
Date: Fri Apr 24 16:29:35 2015 +0300

    Implement Release file generation for ubuntu repositories

    It's required for backend to set priorities according
    to repository metadata.

    Change-Id: I1c2d1167d140e9c564c34440452a41cf0a73ea34
    Closes-bug: #1435892

Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
tags: removed: on-verification
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.