Skip to content

Commit 3713ac0

Browse files
committed
Require python-esiclient >= 1.3.0
We use the `openstack esi port forwarding` command in the `external_access` role to configure port forwarding. Previously, this command would fail with an error when attempting to create a port forwarding that already exists. This made it difficult to identify legitimate failures. With CCI-MOC/python-esiclient#89, python-esiclient is now idempotent and will not emit an error if an existing port forwarding exactly matches the requested configuration.
1 parent e800f08 commit 3713ac0

5 files changed

Lines changed: 639 additions & 642 deletions

File tree

cloudkit-aap/execution-environment/requirements.txt

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file was autogenerated by uv via the following command:
2-
# uv pip compile pyproject.toml --python-version 3.11
3-
aiobotocore==2.21.1
2+
# uv pip compile pyproject.toml
3+
aiobotocore==2.22.0
44
# via cloudkit-aap (pyproject.toml)
55
aiohappyeyeballs==2.6.1
66
# via aiohttp
@@ -10,6 +10,8 @@ aioitertools==0.12.0
1010
# via aiobotocore
1111
aiosignal==1.3.2
1212
# via aiohttp
13+
annotated-types==0.7.0
14+
# via pydantic
1315
ansible==11.5.0
1416
# via cloudkit-aap (pyproject.toml)
1517
ansible-core==2.18.5
@@ -27,32 +29,32 @@ autopage==0.5.2
2729
# via cliff
2830
babel==2.17.0
2931
# via python-esiclient
30-
boto3==1.37.1
32+
boto3==1.37.3
3133
# via cloudkit-aap (pyproject.toml)
32-
botocore==1.37.1
34+
botocore==1.37.3
3335
# via
3436
# cloudkit-aap (pyproject.toml)
3537
# aiobotocore
3638
# boto3
3739
# s3transfer
3840
cachetools==5.5.2
3941
# via google-auth
40-
certifi==2025.1.31
42+
certifi==2025.4.26
4143
# via
4244
# kubernetes
4345
# requests
4446
cffi==1.17.1
4547
# via cryptography
46-
charset-normalizer==3.4.1
48+
charset-normalizer==3.4.2
4749
# via requests
48-
cliff==4.9.1
50+
cliff==4.10.0
4951
# via
5052
# osc-lib
5153
# python-ironicclient
5254
# python-openstackclient
5355
cmd2==2.5.11
5456
# via cliff
55-
cryptography==44.0.2
57+
cryptography==45.0.2
5658
# via
5759
# ansible-core
5860
# esisdk
@@ -68,12 +70,12 @@ decorator==5.2.1
6870
# dogpile-cache
6971
# esisdk
7072
# openstacksdk
71-
dogpile-cache==1.3.4
73+
dogpile-cache==1.4.0
7274
# via
7375
# esisdk
7476
# openstacksdk
7577
# python-ironicclient
76-
durationpy==0.9
78+
durationpy==0.10
7779
# via kubernetes
7880
esisdk==1.4.0
7981
# via
@@ -83,7 +85,7 @@ frozenlist==1.6.0
8385
# via
8486
# aiohttp
8587
# aiosignal
86-
google-auth==2.39.0
88+
google-auth==2.40.1
8789
# via kubernetes
8890
idna==3.10
8991
# via
@@ -115,9 +117,9 @@ jsonpointer==3.0.0
115117
# via jsonpatch
116118
jsonschema==4.23.0
117119
# via python-ironicclient
118-
jsonschema-specifications==2024.10.1
120+
jsonschema-specifications==2025.4.1
119121
# via jsonschema
120-
keystoneauth1==5.10.0
122+
keystoneauth1==5.11.0
121123
# via
122124
# esisdk
123125
# openstacksdk
@@ -136,7 +138,7 @@ metalsmith==2.4.1
136138
# via python-esiclient
137139
msgpack==1.1.0
138140
# via oslo-serialization
139-
multidict==6.4.3
141+
multidict==6.4.4
140142
# via
141143
# aiobotocore
142144
# aiohttp
@@ -170,7 +172,7 @@ osc-lib==4.0.0
170172
# python-esiclient
171173
# python-ironicclient
172174
# python-openstackclient
173-
oslo-config==9.7.1
175+
oslo-config==9.8.0
174176
# via python-keystoneclient
175177
oslo-i18n==6.5.1
176178
# via
@@ -185,7 +187,7 @@ oslo-serialization==5.7.0
185187
# via
186188
# python-keystoneclient
187189
# python-novaclient
188-
oslo-utils==8.2.0
190+
oslo-utils==9.0.0
189191
# via
190192
# osc-lib
191193
# oslo-serialization
@@ -222,7 +224,7 @@ pbr==6.1.1
222224
# stevedore
223225
pexpect==4.9.0
224226
# via ansible-runner
225-
platformdirs==4.3.7
227+
platformdirs==4.3.8
226228
# via
227229
# openstacksdk
228230
# python-ironicclient
@@ -251,6 +253,10 @@ pyasn1-modules==0.4.2
251253
# via google-auth
252254
pycparser==2.22
253255
# via cffi
256+
pydantic==2.11.4
257+
# via cloudkit-aap (pyproject.toml)
258+
pydantic-core==2.33.2
259+
# via pydantic
254260
pyparsing==3.2.3
255261
# via oslo-utils
256262
pyperclip==1.9.0
@@ -264,11 +270,11 @@ python-dateutil==2.9.0.post0
264270
# aiobotocore
265271
# botocore
266272
# kubernetes
267-
python-esiclient==1.2.0
273+
python-esiclient==1.3.0
268274
# via cloudkit-aap (pyproject.toml)
269275
python-esileapclient==1.1.0
270276
# via cloudkit-aap (pyproject.toml)
271-
python-ironicclient==5.10.1
277+
python-ironicclient==5.11.0
272278
# via
273279
# cloudkit-aap (pyproject.toml)
274280
# python-esiclient
@@ -318,15 +324,15 @@ resolvelib==1.0.1
318324
# via ansible-core
319325
rfc3986==2.0.0
320326
# via oslo-config
321-
rpds-py==0.24.0
327+
rpds-py==0.25.0
322328
# via
323329
# jsonschema
324330
# referencing
325331
rsa==4.9.1
326332
# via google-auth
327333
s3transfer==0.11.3
328334
# via boto3
329-
setuptools==79.0.0
335+
setuptools==80.7.1
330336
# via pbr
331337
simplejson==3.20.1
332338
# via python-esiclient
@@ -352,7 +358,11 @@ typing-extensions==4.13.2
352358
# via
353359
# keystoneauth1
354360
# openstacksdk
355-
# referencing
361+
# pydantic
362+
# pydantic-core
363+
# typing-inspection
364+
typing-inspection==0.4.0
365+
# via pydantic
356366
tzdata==2025.2
357367
# via
358368
# oslo-serialization

cloudkit-aap/pyproject.toml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,19 @@ description = "Add your description here"
55
readme = "README.md"
66
requires-python = ">=3.13"
77
dependencies = [
8-
"aiobotocore>=2.21.1",
9-
"ansible>=11.4.0",
10-
"boto3>=1.37.0",
11-
"botocore>=1.37.0",
12-
"jmespath>=1.0.1",
13-
"kubernetes>=32.0.1",
14-
"pydantic>=2.11.3",
15-
"python-esiclient>=1.1.0",
16-
"python-esileapclient>=1.0.0",
17-
"python-ironicclient>=5.10.0",
18-
"python-openstackclient>=7.4.0",
19-
"urllib3>=2.4.0",
8+
"aiobotocore>=2.21.1",
9+
"ansible>=11.4.0",
10+
"boto3>=1.37.0",
11+
"botocore>=1.37.0",
12+
"jmespath>=1.0.1",
13+
"kubernetes>=32.0.1",
14+
"pydantic>=2.11.3",
15+
"python-esiclient>=1.3.0",
16+
"python-esileapclient>=1.0.0",
17+
"python-ironicclient>=5.10.0",
18+
"python-openstackclient>=7.4.0",
19+
"urllib3>=2.4.0",
2020
]
2121

2222
[dependency-groups]
23-
development = [
24-
"ansible-lint>=25.2.1",
25-
"antsibull-changelog>=0.33.0",
26-
]
23+
development = ["ansible-lint>=25.2.1", "antsibull-changelog>=0.33.0"]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
external_access_resource_wait_retries: 360
22
external_access_resource_wait_delay: 5
33
external_access_dns_ttl: 1800
4+
external_access_agent_namespace: "hardware-inventory"

cloudkit-aap/roles/external_access/tasks/create_external_access.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,11 @@
2929
ansible.builtin.set_fact:
3030
external_access_api_floating_ip: "{{ allocate_floating_ip_result }}"
3131

32-
# FIXME: This will fail erroneously because the command is not idempotent;
33-
# see https://github.com/CCI-MOC/python-esiclient/issues/82. Unfortunately,
34-
# it will also fail legitimately if we failed to clean up from a previous
35-
# cluster and there exists a port forwarding to the same internal ip
36-
# address.
3732
- name: Create port forwarding # noqa:no-changed-when
3833
ansible.builtin.command: >-
3934
openstack esi port forwarding create {{ external_access_api_internal_ip }} {{ external_access_api_floating_ip }}
4035
--internal-ip-network "{{ external_access_api_internal_network }}"
4136
-p {{ external_access_kube_apiserver_port }} -d "{{ external_access_name }}" -f json
42-
register: create_forwarding
43-
failed_when: >-
44-
create_forwarding.rc != 0 and "duplicate port forwarding" not in create_forwarding.stderr
4537
4638
- name: Create api dns records
4739
when: >-
@@ -64,8 +56,7 @@
6456
api_version: agent-install.openshift.io/v1beta1
6557
kind: Agent
6658

67-
# FIXME: This should not be hardcoded
68-
namespace: "hardware-inventory"
59+
namespace: "{{ external_access_agent_namespace }}"
6960
label_selectors:
7061
- "cloudkit.openshift.io/clusterorder={{ external_access_name }}"
7162
register: agents
@@ -101,9 +92,6 @@
10192
ansible.builtin.command: >-
10293
openstack esi port forwarding create {{ external_access_worker_node_ip }} {{ external_access_ingress_floating_ip }}
10394
-p 80 -p 443 -d "{{ external_access_name }}-ingress" -f json
104-
register: create_forwarding
105-
failed_when: >-
106-
create_forwarding.rc != 0 and "duplicate port forwarding" not in create_forwarding.stderr
10795
10896
- name: Create ingress dns record
10997
amazon.aws.route53:

0 commit comments

Comments
 (0)