Project

General

Profile

Actions

Bug #6790

closed

/ref/branch/version mismatch

Added by Sandon Van Ness over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Sandon Van Ness
Category:
-
Target version:
-
% Done:

100%

Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

So currently the version to install with yum is grabbed from sha1/$sha1/version or /ref/$branch/version

Basically we do:

version = _block_looking_for_package_version(
remote,
base_url,
config.get('wait_for_package', False))

block_looking_for_package grabs /version off the gitbuilder archive dir for branch/sha1. Then it basically uses this info (does a little removes the v if it has one and adds the . followed by dist to it) to generate the package list and installs with yum:

pkgs_with_vers = ["%s-%s" % (pkg, version) for pkg in pkgs]
args = ['sudo', 'yum', '-y', 'install']
args += pkgs_with_vers
_run_and_log_error_if_fails(remote, args)

Problem is that we are getting mis-matches, Example froM:
http://gitbuilder.ceph.com/ceph-rpm-centos6-x86_64-basic/ref/emperor/version

version file: v0.72.1
formated by teuthology: 0.72.1.el6
Actual version of the rpms: 0.72.1-0.el6 (has a -0)

Example from fedora:
http://gitbuilder.ceph.com/ceph-rpm-fc18-x86_64-basic/ref/emperor/version
version file: v0.72-3.g4d92386
formated by teuthology: 0.72-3.g4d92386.fc18
Actual version of the rpms: 0.72-1-3.g4d92386.fc18.x86_64 (has a -1)

So this needs to either be fixed in the gitbuilders that create the version text file OR we need to stop using that file on teuthology and figure out the package name a different way such as:

list available package on the repo via yum, parse output and grab it that way.
Parse xml in repodata folder and figure out correct package names that way.

I am guessing the easier solution and reducing parisng is a good thing is to fix it on the gitbuilders.

Maybe alfredo/zack have a better idea on how this should be handeled.

Gary if you think teuthology should not be using that /version file to figure out what the versio info should be then please assign this back to me or move it to teuthology (if that can be done?).

Actions #1

Updated by Tamilarasi muthamizhan over 10 years ago

  • Priority changed from Normal to Urgent

logs: ubuntu@teuthology:/a/teuthology-2013-11-15_01:35:02-upgrade-small-next-testing-basic-vps/100676

this has to be fixed, to get clean run in the nightlies for the upgrade tests.

Actions #2

Updated by Anonymous over 10 years ago

I have a couple concerns.

If we add the rpm release to the version, will that break anything that expects version to just contain the source version ?

The rpm release is calculated at package build time from some conditional logic, and rpm macros. This produces a slightly different value on each distribution, and can potentially change without notice. Are we creating a maintenance problem done the road ?

Since yum is being used to install the packages, does the full file name need to be used ? For example,
"yum install ceph-0.72.1" will work to install that version of the package.

Once the repository is configured, yum can provide a list of the packages available:

[root@gary-centos-01 ubuntu]# yum list available ceph
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile * base: mirror.pac-12.org * epel: mirrors.kernel.org * extras: mirror.san.fastserv.com * updates: mirrors.seas.harvard.edu
Available Packages
ceph.i686 0.67.3-2.el6 epel
ceph.x86_64 0.72-204.g878f354.el6 Ceph_

and even to match a specific version:

[root@gary-centos-01 ubuntu]# yum list available ceph-0.72
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile * base: mirror.pac-12.org * epel: mirrors.kernel.org * extras: mirror.san.fastserv.com * updates: mirrors.seas.harvard.edu
Available Packages
ceph.x86_64 0.72-204.g878f354.el6 Ceph

Actions #3

Updated by Sandon Van Ness over 10 years ago

  • Status changed from New to Resolved
  • Assignee changed from Anonymous to Sandon Van Ness
  • % Done changed from 0 to 100

So it looks like oh RHEL just using the version value (without the dist part) does not work so as we discussed earlier I am just having teuthology grab everything before the - and that appears to be working good. I had Warren review the code and merged my wip branch (wip-6790) and this is now commited to master. Cherry-picked to next as well.

Before doing the pull request I started a run and haven't had any issues related to fetching/installing packages.

Commit:
c5a26b38defce7811a1ca5b60e737c641d314e92

Actions

Also available in: Atom PDF