Skip to content

Commit

Permalink
Merge pull request #153 from stackhpc/upstream/2023.1-2024-02-05
Browse files Browse the repository at this point in the history
Synchronise 2023.1 with upstream
  • Loading branch information
mnasiadka authored Feb 8, 2024
2 parents 60225c2 + 883b40b commit 2278ea6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions magnum/conductor/handlers/common/cert_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,23 +189,22 @@ def create_client_files(cluster, context=None):
magnum_cert = get_cluster_magnum_cert(cluster, context)

ca_file = open(cached_ca_file, "w+")
os.chmod(cached_ca_file, 0o600)
ca_file.write(encodeutils.safe_decode(ca_cert.get_certificate()))
ca_file.flush()

key_file = open(cached_key_file, "w+")
os.chmod(cached_key_file, 0o600)
key_file.write(encodeutils.safe_decode(
magnum_cert.get_decrypted_private_key()))
key_file.flush()

cert_file = open(cached_cert_file, "w+")
os.chmod(cached_cert_file, 0o600)
cert_file.write(
encodeutils.safe_decode(magnum_cert.get_certificate()))
cert_file.flush()

os.chmod(cached_ca_file, 0o600)
os.chmod(cached_key_file, 0o600)
os.chmod(cached_cert_file, 0o600)

else:
ca_file = open(cached_ca_file, "r")
key_file = open(cached_key_file, "r")
Expand Down

0 comments on commit 2278ea6

Please sign in to comment.