Skip to content

Commit c991fbe

Browse files
committed
DROPME: debug
1 parent 5f93d4d commit c991fbe

File tree

2 files changed

+4
-61
lines changed

2 files changed

+4
-61
lines changed

hack/clean-ci.sh

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -24,67 +24,10 @@ if [[ "${GOVC_URL:-}" == "10.2.224.4" ]]; then
2424
JANITOR_ARGS="--resource-type=vsphere-project-cluster-api-provider --resource-type=vsphere-project-cloud-provider --resource-type=vsphere-project-image-builder"
2525
fi
2626

27-
2827
curl "${BOSKOS_HOST}/metric?type=gcve-vsphere-project"
2928

30-
function initProjectUserData() {
31-
NR="${1}"
32-
33-
IPS_PER_PROJECT=16
34-
# Starting at 192.168.35.0 and allowing usage up to 192.168.39.254
35-
# allows a maximum of 79 projects
36-
RANGE_START=35
37-
38-
S2="$(( (NR - 1) * IPS_PER_PROJECT ))"
39-
E2="$(( (NR * IPS_PER_PROJECT) - 1 ))"
40-
41-
S1="$(( S2 / 256 ))"
42-
E1="$(( E2 / 256 ))"
43-
S2="$(( S2 % 256 ))"
44-
E2="$(( E2 % 256 ))"
45-
46-
START="192.168.$(( RANGE_START + S1 )).${S2}"
47-
END="192.168.$(( RANGE_START + E1 )).${E2}"
48-
49-
resourceName=$(printf "k8s-infra-e2e-gcp-gcve-project-%03d" "${NR}")
50-
51-
folder=$(printf "/Datacenter/vm/prow/k8s-infra-e2e-gcp-gcve-project-%03d" "${NR}")
52-
resourcePool=$(printf "/Datacenter/host/k8s-gcve-cluster/Resources/prow/k8s-infra-e2e-gcp-gcve-project-%03d" "${NR}")
53-
# shellcheck disable=SC2089
54-
ipPool="{\\\"addresses\\\":[\\\"${START}-${END}\\\"],\\\"gateway\\\":\\\"192.168.32.1\\\",\\\"prefix\\\":21}"
55-
56-
# acquire from "dirty" or "free" state
57-
curl -s -X POST "${BOSKOS_HOST}/acquirebystate?names=${resourceName}&state=dirty&dest=busy&owner=$(whoami)" | grep -q "${resourceName}" \
58-
|| curl -s -X POST "${BOSKOS_HOST}/acquirebystate?names=${resourceName}&state=free&dest=busy&owner=$(whoami)" | grep -q "${resourceName}" \
59-
|| echo "Failed to acquire ${resourceName}"
60-
# update
61-
# shellcheck disable=SC2089
62-
curl -s -X POST -d '{"ipPool":"'"${ipPool}"'","resourcePool":"'"${resourcePool}"'","folder":"'"${folder}"'"}' "${BOSKOS_HOST}/update?name=${resourceName}&state=busy&owner=$(whoami)"
63-
# release
64-
curl -s -X POST "${BOSKOS_HOST}/release?name=${resourceName}&dest=dirty&owner=$(whoami)"
65-
}
66-
67-
function printProjectUserData() {
68-
NR="${1}"
69-
70-
resourceName=$(printf "k8s-infra-e2e-gcp-gcve-project-%03d" "${NR}")
71-
72-
# acquire from "dirty" state
73-
curl -X POST "${BOSKOS_HOST}/acquirebystate?names=${resourceName}&state=dirty&dest=busy&owner=$(whoami)" \
74-
|| echo "Failed to acquire ${resourceName}"
75-
# release to free state
76-
curl -s -X POST "${BOSKOS_HOST}/release?name=${resourceName}&dest=dirty&owner=$(whoami)"
77-
}
78-
79-
for i in {1..40}; do
80-
initProjectUserData "${i}"
81-
done
82-
83-
for i in {1..40}; do
84-
printProjectUserData "${i}"
85-
done
86-
87-
exit 0
29+
echo "${GOVC_URL}"
30+
echo "${GOVC_USERNAME}"
8831

8932
# Run e2e tests
9033
make clean-ci

hack/e2e.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ if [[ "${GOVC_URL:-}" == "10.2.224.4" ]]; then
4949
BOSKOS_RESOURCE_TYPE=vsphere-project-cluster-api-provider
5050
fi
5151

52+
exit 0
53+
5254
on_exit() {
5355
# Only handle Boskos when we have to (not for vcsim)
5456
if [[ ! "${GINKGO_FOCUS:-}" =~ $RE_VCSIM ]]; then
@@ -170,8 +172,6 @@ fi
170172

171173
ARCH="$(go env GOARCH)"
172174

173-
exit 0
174-
175175
# Only build and upload the image if we run tests which require it to save some $.
176176
# NOTE: the image is required for clusterctl upgrade tests, and those test are run only as part of the main e2e test job (without any focus)
177177
if [[ -z "${GINKGO_FOCUS+x}" ]]; then

0 commit comments

Comments
 (0)