[rpm] packetary fails to correctly use/resolve latest packages from several mirrors

Bug #1585103 reported by Sergey Kulanov
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
packetary
Fix Released
Critical
Sergey Kulanov

Bug Description

1) Run:

packetary --threads-num 10 clone \
  -t rpm \
  -r /home/skulanov/projects/fuel-main/build/centos_mirror.yaml \
  -R /home/skulanov/projects/fuel-main/yaml/packages.yaml \
  -d /home/skulanov/projects/fuel-main/build/iso/isoroot

centos_mirror.yaml:
- name: "mos-repos"
  uri: "http://localhost:8000/centos//x86_64"
  priority: 10
  path: "/home/skulanov/projects/fuel-main/build/iso/isoroot/mos-centos"

- name: "upstream-os"
  uri: "http://osci-mirror-kha.kha.mirantis.net/pkgs/centos-2016-05-22-170053//os/x86_64"
  priority: 90
  path: "/home/skulanov/projects/fuel-main/build/iso/isoroot"
- name: "upstream-updates"
  uri: "http://osci-mirror-kha.kha.mirantis.net/pkgs/centos-2016-05-22-170053//updates/x86_64"
  priority: 10
  path: "/home/skulanov/projects/fuel-main/build/iso/isoroot"
- name: "upstream-extras"
  uri: "http://osci-mirror-kha.kha.mirantis.net/pkgs/centos-2016-05-22-170053//extras/x86_64"
  priority: 90
  path: "/home/skulanov/projects/fuel-main/build/iso/isoroot"
- name: "mos-repos"
  uri: "http://localhost:8000/centos//x86_64"
  priority: 1
  path: "/home/skulanov/projects/fuel-main/build/iso/isoroot/mos-centos"

expected to clone the latest rpm packages, but we have the old one, for example sudo:

$ ] find build/ -name sudo*
   build/iso/isoroot-mkisofs/Packages/sudo-1.8.6p7-16.el7.x86_64.rpm

instead the latest sudo package is in updates:
   http://osci-mirror-kha.kha.mirantis.net/pkgs/centos-2016-05-22-170053//updates/x86_64

[root@6a0d6512a777 ~]# yum search sudo --showduplicates
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirror.logol.ru
 * extras: mirror.logol.ru
 * updates: mirror.logol.ru
============================================================================================= N/S matched: sudo =============================================================================================
sudo-devel-1.8.6p7-16.el7.i686 : Development files for sudo
sudo-devel-1.8.6p7-16.el7.x86_64 : Development files for sudo
sudo-devel-1.8.6p7-17.el7_2.i686 : Development files for sudo
sudo-devel-1.8.6p7-17.el7_2.x86_64 : Development files for sudo
sudo-1.8.6p7-16.el7.x86_64 : Allows restricted root access for specified users
sudo-1.8.6p7-17.el7_2.x86_64 : Allows restricted root access for specified users

  Name and summary matches only, use "search all" for everything.

and should be sudo-1.8.6p7-17.el7_2.x86_64 instead of sudo-1.8.6p7-17.el7.x86_64

Revision history for this message
Sergey Kulanov (skulanov) wrote :
Changed in packetary:
assignee: nobody → Sergey Kulanov (skulanov)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to packetary (master)

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

Revision history for this message
Sergey Kulanov (skulanov) wrote :

We need to search mandatory packages in all trees (forest) and not getting them from the single (origin) repo, since they can be old.

So there should be possibly two ways:
* if we have one repo, then use current mandatory flow
* if we have several repos, we need search mandatory packages in all forest, since there might be fresh versions

Revision history for this message
Bulat Gaifullin (bulat.gaifullin) wrote :

This is not bug.
the all mandatory packages are copied if option 'include_mandatory' is specified.
and it is expected that final repositories may contain the several versions of same packages.

Changed in packetary:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on packetary (master)

Change abandoned by Sergey Kulanov (<email address hidden>) on branch: master
Review: https://review.openstack.org/327096
Reason: not a bug

Changed in packetary:
status: Invalid → Opinion
Changed in packetary:
status: Opinion → In Progress
Revision history for this message
Sergey Kulanov (skulanov) wrote :
Revision history for this message
Sergey Kulanov (skulanov) wrote :

anaconda packaging log

Roman Vyalov (r0mikiam)
Changed in packetary:
assignee: Sergey Kulanov (skulanov) → Ivan (ibogomazov)
Changed in packetary:
assignee: Ivan (ibogomazov) → Sergey Kulanov (skulanov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to packetary (master)

Reviewed: https://review.openstack.org/327096
Committed: https://git.openstack.org/cgit/openstack/packetary/commit/?id=f922090dc6c43a555bb83e338adc7894016eef6e
Submitter: Jenkins
Branch: master

commit f922090dc6c43a555bb83e338adc7894016eef6e
Author: Sergey Kulanov <email address hidden>
Date: Wed Jun 8 16:33:07 2016 +0300

    Allow to search mandatory packages in all forest

    Update requirements with filter option:

            "mandatory": {
                "enum": ["exact", "newest"]
            }

    1) [RPM] We need to search the newest mandatory packages in all
       forest but not from the exact tree, also repo priority should
       be take into account

    2) Add priority to gen_repository in tests, since this is
       mandatory parameter

    3) [Tests] Add package10 with different version to check mandatory
       values:
        - None
        - "exact"
        - "newest"
      match for mandatory packages

    Change-Id: I36a1463b495075bf6c44a46b557c3ac524de0220
    Closes-bug: #1585103

Changed in packetary:
status: In Progress → Fix Released
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.