mirror of
https://github.com/ceph/ceph
synced 2025-01-03 01:22:53 +00:00
calamari_setup: disable epel again after ceph-deploy
ceph-deploy enables EPEL on Centos; this caused problems for Calamari. Undo it after ceph-deploy has installed Ceph. Signed-off-by: Dan Mick <dan.mick@redhat.com>
This commit is contained in:
parent
67d1764228
commit
2006b77340
@ -65,6 +65,8 @@ def task(ctx, config):
|
|||||||
lambda: adjust_yum_repos(ctx, cal_svr, config['no_epel']),
|
lambda: adjust_yum_repos(ctx, cal_svr, config['no_epel']),
|
||||||
lambda: calamari_install(config, cal_svr),
|
lambda: calamari_install(config, cal_svr),
|
||||||
lambda: ceph_install(ctx, cal_svr),
|
lambda: ceph_install(ctx, cal_svr),
|
||||||
|
# do it again because ceph-deploy installed epel for centos
|
||||||
|
lambda: remove_epel(ctx, config['no_epel']),
|
||||||
lambda: calamari_connect(ctx, cal_svr),
|
lambda: calamari_connect(ctx, cal_svr),
|
||||||
lambda: browser(config['start_browser'], cal_svr.hostname),
|
lambda: browser(config['start_browser'], cal_svr.hostname),
|
||||||
):
|
):
|
||||||
@ -153,6 +155,24 @@ def fix_yum_repos(remote, distro):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@contextlib.contextmanager
|
||||||
|
def remove_epel(ctx, no_epel):
|
||||||
|
"""
|
||||||
|
just remove epel. No undo; assumed that it's used after
|
||||||
|
adjust_yum_repos, and relies on its state-save/restore.
|
||||||
|
"""
|
||||||
|
if no_epel:
|
||||||
|
for remote in ctx.cluster.remotes:
|
||||||
|
if remote.os.name.startswith('centos'):
|
||||||
|
remote.run(args= [
|
||||||
|
'sudo', 'rm', '-f', run.Raw('/etc/yum.repos.d/epel*')
|
||||||
|
])
|
||||||
|
try:
|
||||||
|
yield
|
||||||
|
finally:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def get_iceball_with_http(url, destdir):
|
def get_iceball_with_http(url, destdir):
|
||||||
'''
|
'''
|
||||||
Copy iceball with http to destdir. Try both .tar.gz and .iso.
|
Copy iceball with http to destdir. Try both .tar.gz and .iso.
|
||||||
|
Loading…
Reference in New Issue
Block a user