Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion test/terraform/azure-temporary/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,31 @@ module "materialize" {
# Remove this when that is fixed.
swap_enabled = false
}
},
image = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to specify all default args due to a merge issue on the Terraform module side.

tag = var.orchestratord_version
}
cloudProvider = {
type = "azure"
region = "eastus2"
}
}
observability = {
podMetrics = {
enabled = true
}
}
storage = {
storageClass = {
create = true
name = "openebs-lvm-instance-store-ext4"
provisioner = "local.csi.openebs.io"
parameters = {
storage = "lvm"
fsType = "ext4"
volgroup = "instance-store-vg"
}
}
}
}

materialize_instances = var.materialize_instances
Expand Down
43 changes: 41 additions & 2 deletions test/terraform/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,12 +380,51 @@ def kubectl_setup(
time.sleep(1)
else:
raise ValueError("Never completed")
# Give the pods a chance to start and then check:
time.sleep(30)
for i in range(240):
try:
time.sleep(2)
spawn.runv(
["kubectl", "get", "pods", "-n", "materialize-environment"],
cwd=self.path,
)
pod_names = spawn.capture(
[
"kubectl",
"get",
"pods",
"-n",
"materialize-environment",
"-o",
"jsonpath={.items[*].metadata.name}",
],
cwd=self.path,
).strip()
envd_pods = [p for p in pod_names.split() if "environmentd" in p]
for pod in envd_pods:
spawn.runv(
[
"kubectl",
"describe",
"pod",
pod,
"-n",
"materialize-environment",
],
cwd=self.path,
)
# Get the logs of the pod:
spawn.runv(
[
"kubectl",
"logs",
pod,
"-n",
"materialize-environment",
],
cwd=self.path,
)
Comment on lines +417 to +427
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logs output is helpful, but it can get noisy.

status = spawn.capture(
[
"kubectl",
Expand Down Expand Up @@ -562,10 +601,10 @@ def connect(self, c: Composition) -> None:
"-n",
"materialize-environment",
"-o",
"jsonpath={.items[*].metadata.name}",
"jsonpath={.items[0].metadata.name}",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes:

Got balancerd name: mz14v9py5kon-balancerd-548f48c644-kz4pg mz14v9py5kon-balancerd-548f48c644-wn7jl
  | Error from server (NotFound): pods "mz14v9py5kon-balancerd-548f48c644-kz4pg mz14v9py5kon-balancerd-548f48c644-wn7jl" not found

],
cwd=self.path,
)
).strip()
# error: arguments in resource/name form must have a single resource and name
print(f"Got balancerd name: {balancerd_name}")

Expand Down