Skip to content

Commit

Permalink
[tempest] Remove unnecessary sudo calls
Browse files Browse the repository at this point in the history
  • Loading branch information
lpiwowar committed Aug 28, 2024
1 parent 573ac0e commit 7fd7a90
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
10 changes: 5 additions & 5 deletions container-images/tcib/base/os/tempest/run_tempest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function upload_extra_images {
image_create_params=()

[[ ! -f "${TEMPEST_EXTRA_IMAGES_NAME[image_index]}" ]] && \
sudo curl -o "${TEMPEST_EXTRA_IMAGES_NAME[image_index]}" "${TEMPEST_EXTRA_IMAGES_URL[image_index]}"
curl -o "${HOMEDIR}/${TEMPEST_EXTRA_IMAGES_NAME[image_index]}" "${TEMPEST_EXTRA_IMAGES_URL[image_index]}"

[[ ${TEMPEST_EXTRA_IMAGES_DISK_FORMAT[image_index]} != "-" ]] && \
image_create_params+=(--disk-format ${TEMPEST_EXTRA_IMAGES_DISK_FORMAT[image_index]})
Expand All @@ -240,7 +240,7 @@ function upload_extra_images {
image_create_params+=(--id ${TEMPEST_EXTRA_IMAGES_ID[image_index]})

[[ ${TEMPEST_EXTRA_IMAGES_NAME[image_index]} != "-" ]] && \
image_create_params+=(--file ${TEMPEST_EXTRA_IMAGES_NAME[image_index]})
image_create_params+=(--file "${HOMEDIR}/${TEMPEST_EXTRA_IMAGES_NAME[image_index]}")

[[ ${TEMPEST_EXTRA_IMAGES_CONTAINER_FORMAT[image_index]} != "-" ]] && \
image_create_params+=(--container-format ${TEMPEST_EXTRA_IMAGES_CONTAINER_FORMAT[image_index]})
Expand Down Expand Up @@ -406,9 +406,9 @@ fi
if [ -f ${HOMEDIR}/id_ecdsa ]; then
mkdir -p ${HOMEDIR}/.ssh
cp ${HOMEDIR}/id_ecdsa ${HOMEDIR}/.ssh/id_ecdsa
sudo chmod 700 ${HOMEDIR}/.ssh
sudo chmod 600 ${HOMEDIR}/.ssh/id_ecdsa
sudo chown -R tempest:tempest ${HOMEDIR}/.ssh
chmod 700 ${HOMEDIR}/.ssh
chmod 600 ${HOMEDIR}/.ssh/id_ecdsa
chown -R tempest:tempest ${HOMEDIR}/.ssh
fi

if [ -z $TEMPEST_EXTERNAL_PLUGIN_GIT_URL ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ tcib_envs:
tcib_actions:
- run: bash /usr/local/bin/uid_gid_manage {{ tcib_user }}
- run: dnf -y install {{ tcib_packages['common'] | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
- run: cp /usr/share/tcib/container-images/tcib/base/os/tempest/tempest_sudoers /etc/sudoers.d/tempest_sudoers
- run: chmod 440 /etc/sudoers.d/tempest_sudoers
- run: mkdir -p /var/lib/tempest/external_files
- run: mkdir -p /var/lib/kolla/config_files
- run: chown -R tempest.tempest /var/lib/tempest
Expand Down
2 changes: 0 additions & 2 deletions container-images/tcib/base/os/tempest/tempest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ tcib_envs:
tcib_actions:
- run: bash /usr/local/bin/uid_gid_manage {{ tcib_user }}
- run: dnf -y install {{ tcib_packages['common'] | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
- run: cp /usr/share/tcib/container-images/tcib/base/os/tempest/tempest_sudoers /etc/sudoers.d/tempest_sudoers
- run: chmod 440 /etc/sudoers.d/tempest_sudoers
- run: mkdir -p /var/lib/tempest/external_files
- run: mkdir -p /var/lib/kolla/config_files
- run: chown -R tempest.tempest /var/lib/tempest
Expand Down
1 change: 0 additions & 1 deletion container-images/tcib/base/os/tempest/tempest_sudoers

This file was deleted.

0 comments on commit 7fd7a90

Please sign in to comment.