Skip to content

Commit

Permalink
Merge pull request #726 from san7ket/add_rhev_ca
Browse files Browse the repository at this point in the history
Add RHV CA cert to CA trust as workaround for BZ 1607793
  • Loading branch information
jyejare authored Aug 30, 2018
2 parents 984c4e3 + 8629850 commit 0f30d3a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions automation_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2449,6 +2449,8 @@ def product_install(distribution, create_vm=False, certificate_url=None,
execute(upgrade_puppet, cdn=distribution.endswith('cdn'), host=host)
if os.environ.get('HOTFIX') != 'NO_HOTFIX':
execute(apply_hotfix, host=host)
if bz_bug_is_open(1607793):
execute(setup_rhv_ca, host=host)


def fix_qdrouterd_listen_to_ipv6():
Expand Down Expand Up @@ -3224,3 +3226,13 @@ def setup_alternate_capsule_ports(port_range='9400-14999'):
# labelling custom port range so that passenger will be allowed to connect
run('semanage port -a -t websm_port_t -p tcp {0}'
.format(port_range), warn_only=True)


def setup_rhv_ca():
""" Setups and trusts the provided CA cert
"""
http_server = os.environ.get('HTTP_SERVER_HOSTNAME')
run('wget {0}/pub/rhevm1-ca.pem -P '
'/etc/pki/ca-trust/source/anchors/'.format(http_server))
run('update-ca-trust enable ; update-ca-trust')
print("RHV CA cert has been successfully added to CA trust")

0 comments on commit 0f30d3a

Please sign in to comment.