diff --git a/packstack/modules/ospluginutils.py b/packstack/modules/ospluginutils.py index 3ed3adfd4..945de09de 100644 --- a/packstack/modules/ospluginutils.py +++ b/packstack/modules/ospluginutils.py @@ -140,11 +140,11 @@ def generate_ssl_cert(config, host, service, ssl_key_file, ssl_cert_file): final_cert = crypto.dump_certificate(crypto.FILETYPE_PEM, cert) final_key = crypto.dump_privatekey(crypto.FILETYPE_PEM, k) deliver_ssl_file(ca_file, config['CONFIG_SSL_CACERT'], host) - deliver_ssl_file(final_cert, ssl_cert_file, host) - deliver_ssl_file(final_key, ssl_key_file, host) + deliver_ssl_file(final_cert.decode(), ssl_cert_file, host) + deliver_ssl_file(final_key.decode(), ssl_key_file, host) with open(local_cert_path, 'w') as f: - f.write(final_cert) + f.write(final_cert.decode()) def deliver_ssl_file(content, path, host): diff --git a/packstack/plugins/ssl_001.py b/packstack/plugins/ssl_001.py index 36fac68a7..d2d01c18e 100644 --- a/packstack/plugins/ssl_001.py +++ b/packstack/plugins/ssl_001.py @@ -280,10 +280,10 @@ def create_self_signed_cert(config, messages): cert.sign(k, 'sha1') - open((CERT_FILE), "wt").write( - crypto.dump_certificate(crypto.FILETYPE_PEM, cert)) - open((KEY_FILE), "wt").write( - crypto.dump_privatekey(crypto.FILETYPE_PEM, k)) + open((CERT_FILE), "w").write( + crypto.dump_certificate(crypto.FILETYPE_PEM, cert).decode()) + open((KEY_FILE), "w").write( + crypto.dump_privatekey(crypto.FILETYPE_PEM, k).decode()) messages.append( "%sNOTE%s : A selfsigned CA certificate was generated to be used " diff --git a/run_tests.sh b/run_tests.sh index 891bfaeab..08cdb79b0 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -145,6 +145,7 @@ fi # Install dependencies $SUDO $PKG_MGR -y install puppet \ iproute \ + iptables \ dstat \ openssl-devel \ libffi-devel \ @@ -266,7 +267,7 @@ fi # Setup packstack if [ "${INSTALL_FROM_SOURCE}" = true ]; then - $SUDO $PIP install . + $SUDO $PIP install --prefix=/usr . # In Fedora when running with sudo gems are installed at /usr/local/bin/ even when GEM_HOME/GEM_BIN_DIR are set if [ "${PKG_MGR}" = "dnf" ]; then export GEM_BIN_DIR=/usr/local/bin/