])
init_tasks.append({'internal.timer': None})
+ # install_latest_rh_kernel is used for redhat config
+ if 'redhat' not in config:
+ if 'kernel' in config:
+ init_tasks.append({'kernel': config['kernel']})
+
if 'roles' in config:
init_tasks.extend([
{'pcp': None},
{'selinux': None},
])
+
+ if 'redhat' in config:
+ init_tasks.extend([
+ {'internal.setup_stage_cdn': None}])
+
if config.get('ceph_cm_ansible', True):
init_tasks.append({'ansible.cephlab': None})
if 'redhat' in config:
init_tasks.extend([
+ {'internal.git_ignore_ssl': None},
{'internal.setup_cdn_repo': None},
{'internal.setup_base_repo': None},
{'internal.setup_additional_repo': None},
from teuthology.exceptions import VersionNotFoundError
from teuthology.job_status import get_status, set_status
from teuthology.orchestra import cluster, remote, run
+# the below import with noqa is to workaround run.py which does not support multilevel submodule import
+from teuthology.task.internal.redhat import setup_cdn_repo, setup_base_repo, setup_additional_repo, setup_stage_cdn # noqa
log = logging.getLogger(__name__)
--- /dev/null
+import contextlib
+import logging
+
+from teuthology.orchestra import run
+
+log = logging.getLogger(__name__)
+
+
+@contextlib.contextmanager
+def git_ignore_ssl(ctx, config):
+ """
+ Ignore ssl error's while cloning from untrusted http
+ """
+
+ log.info("ignoring ssl errors while cloning http repo")
+ ctx.cluster.run(
+ args=[
+ 'sudo', 'git', 'config', run.Raw('--system'),
+ 'http.sslverify', 'false'
+ ],
+ )
+ yield
raise ConfigError("Provide rhbuild attribute")
teuthconfig.rhbuild = str(rhbuild)
with parallel() as p:
- for remote in ctx.cluster.remotes.iterkeys():
+ for remote in ctx.cluster.remotes.keys():
if remote.os.name == 'rhel':
log.info("subscribing stage cdn on : %s", remote.shortname)
p.spawn(_subscribe_stage_cdn, remote)
yield
finally:
with parallel() as p:
- for remote in ctx.cluster.remotes.iterkeys():
+ for remote in ctx.cluster.remotes.keys():
p.spawn(_unsubscribe_stage_cdn, remote)
# create base repo
if base_url.startswith('http'):
repo_to_use = _get_repos_to_use(base_url, repos)
- base_repo_file = NamedTemporaryFile(delete=False)
+ base_repo_file = NamedTemporaryFile(mode='w', delete=False)
_create_temp_repo_file(repo_to_use, base_repo_file)
remote.put_file(base_repo_file.name, base_repo_file.name)
remote.run(args=['sudo', 'cp', base_repo_file.name,