Skip to content
Snippets Groups Projects
Commit 677676fe authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

try using su instead of sudo (probably overkilled implementation...)

parent 1b7f1ac0
No related branches found
No related tags found
1 merge request!1212try using su instead of sudo (probably overkilled implementation...)
Pipeline #8230 canceled
...@@ -195,6 +195,14 @@ class RedisConnect: ...@@ -195,6 +195,14 @@ class RedisConnect:
return unique_values return unique_values
def check_for_duplicate_values(self, redis_values: dict, session_port: int, wrapper_port: int): def check_for_duplicate_values(self, redis_values: dict, session_port: int, wrapper_port: int):
"""
Verify the generated Redis values are unique for this session
:param redis_values: generated values
:param session_port: session port number
:param wrapper_port: proxy port number
:return:
"""
self.logger.info("Checking for duplicate values on server...") self.logger.info("Checking for duplicate values on server...")
for key in redis_values: for key in redis_values:
if self.conn.get(key): if self.conn.get(key):
......
...@@ -6,25 +6,25 @@ set -o pipefail ...@@ -6,25 +6,25 @@ set -o pipefail
# Install Python 3.10 # Install Python 3.10
PYTHON_VERSION=3.10.9 PYTHON_VERSION=3.10.9
sudo yum install -y gcc su root -c "yum install -y gcc"
sudo yum install -y epel-release su root -c "yum install -y epel-release"
sudo yum install -y openssl11-devel su root -c "yum install -y openssl11-devel"
sudo yum install -y bzip2-devel su root -c "yum install -y bzip2-devel"
sudo yum install -y libffi-devel su root -c "yum install -y libffi-devel"
cd /opt cd /opt
wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz
tar xzf Python-$PYTHON_VERSION.tgz && cd Python-$PYTHON_VERSION su root -c "tar xzf Python-$PYTHON_VERSION.tgz && cd Python-$PYTHON_VERSION"
# tragic workaround to make Python find openssl 1.1 instead of not finding 1.0 # tragic workaround to make Python find openssl 1.1 instead of not finding 1.0
sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure su root -c "sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure"
./configure --enable-optimizations su root -c "./configure --enable-optimizations"
sudo make altinstall su root -c "make altinstall"
cd .. cd ..
rm -rf Python-$PYTHON_VERSION.tgz su root -c "rm -rf Python-$PYTHON_VERSION.tgz"
sudo yum clean all su root -c "yum clean all"
rm -rf /var/cache/yum su root -c "rm -rf /var/cache/yum"
# Make symbolic link of python3 install to where it's installed on dev # Make symbolic link of python3 install to where it's installed on dev
mkdir -p /home/ssa/bin su root -c "mkdir -p /home/ssa/bin"
ln -s "$(which python3.10)" /home/ssa/bin/python3.10 su root -c "ln -s \"$(which python3.10)\" /home/ssa/bin/python3.10"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment