From 47224f2da36c8b3f46dfa1113accf2f62b733c78 Mon Sep 17 00:00:00 2001 From: Warren Usui Date: Fri, 16 Aug 2013 15:01:01 -0700 Subject: [PATCH] Revert "Fix ARM releases to be quantal armv7l releases." This reverts commit aabfabc34c101b5104d811eed0f57e262116ad4c. --- teuthology/misc.py | 2 -- teuthology/task/kernel.py | 69 ++++----------------------------------- 2 files changed, 7 insertions(+), 64 deletions(-) diff --git a/teuthology/misc.py b/teuthology/misc.py index 1a0eee7e4c..bcb09ce3cb 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -25,8 +25,6 @@ global_jobid = None checked_jobid = False is_vm = lambda x: x.startswith('vpm') or x.startswith('ubuntu@vpm') -is_arm = lambda x: x.startswith('tala') or x.startswith('ubuntu@tala') or x.startswith('saya') or x.startswith('ubuntu@saya') - def get_testdir(ctx): if 'test_path' in ctx.teuthology_config: return ctx.teuthology_config['test_path'] diff --git a/teuthology/task/kernel.py b/teuthology/task/kernel.py index 514747c7c8..9cb0d9e34c 100644 --- a/teuthology/task/kernel.py +++ b/teuthology/task/kernel.py @@ -70,15 +70,6 @@ def normalize_config(ctx, config): new_config[name] = role_config return new_config -def _find_arch_and_dist(ctx): - """ - Return the arch and distro value as a tuple. - """ - info = ctx.config.get('machine_type', 'plana') - if teuthology.is_arm(info): - return ('armv7l', 'quantal') - return ('x86_64', 'precise') - def validate_config(ctx, config): for _, roles_for_host in ctx.cluster.remotes.iteritems(): kernel = None @@ -92,16 +83,6 @@ def validate_config(ctx, config): if role in config: del config[role] -# kernels from Calxeda are named ...ceph-...highbank -# kernels that we generate named ...-g -# This routine finds the text in front of the sha1 that is used by -# need_to_install() to extract information from the kernel name. - -def _vsplitter(version): - if version.endswith('highbank'): - return 'ceph-' - return '-g' - def need_to_install(ctx, role, sha1): ret = True log.info('Checking kernel version of {role}, want {sha1}...'.format( @@ -116,12 +97,8 @@ def need_to_install(ctx, role, sha1): stdout=version_fp, ) version = version_fp.getvalue().rstrip('\n') - splt = _vsplitter(version) - if splt in version: - _, current_sha1 = version.rsplit(splt, 1) - dloc = current_sha1.find('-') - if dloc > 0: - current_sha1 = current_sha1[0:dloc] + if '-g' in version: + _, current_sha1 = version.rsplit('-g', 1) log.debug('current kernel version is: {version} sha1 {sha1}'.format( version=version, sha1=current_sha1)) @@ -203,14 +180,13 @@ def download_deb(ctx, config): else: log.info('Downloading kernel {sha1} on {role}...'.format(sha1=src, role=role)) - larch, ldist = _find_arch_and_dist(ctx) _, deb_url = teuthology.get_ceph_binary_url( package='kernel', sha1=src, format='deb', flavor='basic', - arch=larch, - dist=ldist, + arch='x86_64', + dist='precise', ) log.info('fetching kernel from {url}'.format(url=deb_url)) @@ -236,21 +212,8 @@ def download_deb(ctx, config): proc.exitstatus.get() -def _no_grub_link(in_file, remote, kernel_ver): - boot1 = '/boot/%s' % in_file - boot2 = '%s.old' % boot1 - remote.run( - args=[ - 'if', 'test', '-e', boot1, run.Raw(';'), 'then', - 'sudo', 'mv', boot1, boot2, run.Raw(';'), 'fi',], - ) - remote.run( - args=['sudo', 'ln', '-s', '%s-%s' % (in_file, kernel_ver) , boot1, ], - ) - def install_and_reboot(ctx, config): procs = {} - kernel_title = '' for role, src in config.iteritems(): log.info('Installing kernel {src} on {role}...'.format(src=src, role=role)) @@ -291,27 +254,11 @@ def install_and_reboot(ctx, config): cmdout.close() log.info('searching for kernel {}'.format(kernel_title)) - if kernel_title.endswith("-highbank"): - _no_grub_link('vmlinuz', role_remote, kernel_title) - _no_grub_link('initrd.img', role_remote, kernel_title) - proc = role_remote.run( - args=[ - 'sudo', - 'shutdown', - '-r', - 'now', - ], - wait=False, - ) - procs[role_remote.name] = proc - continue - # look for menuentry for our kernel, and collect any # submenu entries for their titles. Assume that if our # kernel entry appears later in the file than a submenu entry, # it's actually nested under that submenu. If it gets more # complex this will totally break. - cmdout = StringIO() proc = role_remote.run( args=[ @@ -510,17 +457,15 @@ def task(ctx, config): log.info('unable to extract sha1 from deb path, forcing install') assert False else: - nsha1 = ctx.config.get('overrides',{}).get('ceph',{}).get('sha1',role_config.get('sha1')) - larch, ldist = _find_arch_and_dist(ctx) sha1, _ = teuthology.get_ceph_binary_url( package='kernel', branch=role_config.get('branch'), tag=role_config.get('tag'), - sha1=nsha1, + sha1=role_config.get('sha1'), flavor='basic', format='deb', - dist=ldist, - arch=larch, + dist='precise', + arch='x86_64', ) log.debug('sha1 for {role} is {sha1}'.format(role=role, sha1=sha1)) ctx.summary['{role}-kernel-sha1'.format(role=role)] = sha1 -- 2.39.5