Skip to content

Commit 18ce972

Browse files
author
Bhautik Vala
committed
[patch] Merge branch 'stable' into MASR6491
2 parents dc8a80b + 35422f1 commit 18ce972

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

bin/mas-devops-notify-slack

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ def notifyProvisionRoks(channels: list[str], rc: int, additionalMsg: str = None)
8181
message = [
8282
SlackUtil.buildHeader(f":glyph-ok: Your IBM Cloud ROKS cluster ({name}) is ready"),
8383
SlackUtil.buildSection(f"{url}"),
84-
SlackUtil.buildSection(f"<https://cloud.ibm.com/kubernetes/clusters|IBM Cloud Dashboard>{toolchainLink}")
84+
SlackUtil.buildSection(f"<https://cloud.ibm.com/kubernetes/clusters|IBM Cloud Dashboard> | {toolchainLink}")
8585
]
8686
if additionalMsg is not None:
8787
message.append(SlackUtil.buildSection(additionalMsg))
8888
else:
8989
message = [
9090
SlackUtil.buildHeader(f":glyph-fail: Your IBM Cloud ROKS cluster ({name}) failed to deploy"),
91-
SlackUtil.buildSection(f"<https://cloud.ibm.com/kubernetes/clusters|IBM Cloud Dashboard>{toolchainLink}")
91+
SlackUtil.buildSection(f"<https://cloud.ibm.com/kubernetes/clusters|IBM Cloud Dashboard> | {toolchainLink}")
9292
]
9393

9494
response = SlackUtil.postMessageBlocks(channels, message)

src/mas/devops/ocp.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,12 @@ def listInstances(dynClient: DynamicClient, apiVersion: str, kind: str) -> list:
259259

260260

261261
def waitForPVC(dynClient: DynamicClient, namespace: str, pvcName: str) -> bool:
262+
"""
263+
We will allow up to 10 minutes for a PVC to report a successful binding
264+
"""
262265
pvcAPI = dynClient.resources.get(api_version="v1", kind="PersistentVolumeClaim")
263-
maxRetries = 60
266+
maxRetries = 20
267+
retryDelaySeconds = 30
264268
foundReadyPVC = False
265269
retries = 0
266270
while not foundReadyPVC and retries < maxRetries:
@@ -270,11 +274,11 @@ def waitForPVC(dynClient: DynamicClient, namespace: str, pvcName: str) -> bool:
270274
if pvc.status.phase == "Bound":
271275
foundReadyPVC = True
272276
else:
273-
logger.debug(f"Waiting 5s for PVC {pvcName} to be ready before checking again ...")
274-
sleep(5)
277+
logger.debug(f"Waiting {retryDelaySeconds}s for PVC {pvcName} to be bound before checking again ...")
278+
sleep(retryDelaySeconds)
275279
except NotFoundError:
276-
logger.debug(f"Waiting 5s for PVC {pvcName} to be created before checking again ...")
277-
sleep(5)
280+
logger.debug(f"Waiting {retryDelaySeconds}s for PVC {pvcName} to be created before checking again ...")
281+
sleep(retryDelaySeconds)
278282

279283
return foundReadyPVC
280284

src/mas/devops/templates/pipelinerun-install.yml.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,10 @@ spec:
275275

276276
# Dependencies - SLS
277277
# -------------------------------------------------------------------------
278+
{%- if sls_channel is defined and sls_channel != "" %}
278279
- name: sls_channel
279-
value: '3.x'
280+
value: "{{ sls_channel }}"
281+
{%- endif %}
280282
{%- if sls_entitlement_file is defined and sls_entitlement_file != "" %}
281283
- name: sls_entitlement_file
282284
value: "{{ sls_entitlement_file }}"

0 commit comments

Comments
 (0)