Skip to content

Commit

Permalink
OPENSHIFT-158: Download ignition using https_proxy is removed
Browse files Browse the repository at this point in the history
Signed-off-by: Chandan Abhyankar <[email protected]>
  • Loading branch information
Chandan-Abhyankar authored and prb112 committed Jun 27, 2024
1 parent 8749359 commit a4609fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
5 changes: 3 additions & 2 deletions ansible/post/files/approve_and_issue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ fi

# Setting values for variables
IDX=0
export HTTPS_PROXY="http://${PROXY_SERVER}:3128"
echo "HTTPS_PROXY is set to $HTTPS_PROXY"

READY_COUNT=$(oc get nodes -l kubernetes.io/arch=ppc64le | grep "${MACHINE_PREFIX}" | grep -v NotReady | grep -c Ready)

# Approce CSR and Check Ready status
while [ "${READY_COUNT}" -ne "${POWER_COUNT}" ]
do

export HTTPS_PROXY="http://${PROXY_SERVER}:3128"

echo "List of All Power Workers: "
oc get nodes -l 'kubernetes.io/arch=ppc64le' -o json | jq -r '.items[] | .metadata.name'
echo ""
Expand Down
13 changes: 2 additions & 11 deletions ansible/support/tasks/ignition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
retries: 120
delay: 10
until: 'result.status in [200] and "TARGET_MTU=9100" in result.content'

- name: Downloading the ignition file
get_url:
url: "{{ openshift_machine_config_url }}"
Expand All @@ -57,16 +58,6 @@
retries: 120
delay: 10
until: '"Request failed: <urlopen error timed out>" not in result.msg'
- name: Downloading the ignition file using a https_proxy
get_url:
url: "{{ openshift_machine_config_url }}"
dest: /var/www/html/ignition/worker.ign
validate_certs: false
headers:
"Accept": "application/vnd.coreos.ignition+json;version=3.2.0"
ignore_errors: true
environment:
https_proxy: http://{{ vpc_support_server_ip }}:3128

- name: Verify the ignition file exists
ansible.builtin.shell: stat /var/www/html/ignition/worker.ign
Expand All @@ -80,4 +71,4 @@
mode: u+rwx,g-rx,o-rx

- name: Best effort SELinux repair - Apache
shell: "restorecon -vR /var/www/html/ignition || true"
shell: "restorecon -vR /var/www/html/ignition || true"

0 comments on commit a4609fe

Please sign in to comment.