-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade failed due to use of <
for str and int
#1738
Comments
Not fully tested but this seems to happen for upgrading existing AWX CR only. My OP updated. |
<
for str and int
Updated again my OP. The first reconciliation is succeeded and append following status:
...
upgradedPostgresVersion: "15" This is Any reason that |
@aknochow TASK [Update upgradedPostgresVersion status] ********************************
fatal: [localhost]: FAILED! => {"changed": false, "error": {"body": "{\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"AWX.awx.ansible.com \\\"awx-demo\\\" is invalid: upgradedPostgresVersion: Invalid value: \\\"integer\\\": upgradedPostgresVersion in body must be of type string: \\\"integer\\\"\",\"reason\":\"Invalid\",\"details\":{\"name\":\"awx-demo\",\"group\":\"awx.ansible.com\",\"kind\":\"AWX\",\"causes\":[{\"reason\":\"FieldValueTypeInvalid\",\"message\":\"Invalid value: \\\"integer\\\": upgradedPostgresVersion in body must be of type string: \\\"integer\\\"\",\"field\":\"upgradedPostgresVersion\"}]},\"code\":422}\n", "reason": "Unprocessable Entity", "status": 422}, "msg": "Failed to replace status: 422\nReason: Unprocessable Entity\nHTTP response headers: HTTPHeaderDict({'Audit-Id': 'c8fcf9a0-89e9-4878-bf68-b8d768150468', 'Cache-Control': 'no-cache, private', 'Content-Length': '534', 'Content-Type': 'application/json', 'Date': 'Sun, 03 Mar 2024 05:12:28 GMT', 'X-Kubernetes-Pf-Flowschema-Uid': '4ac800a9-f034-409c-bad0-41ab29e6b253', 'X-Kubernetes-Pf-Prioritylevel-Uid': '927d6283-0d47-46fc-b3cd-5cfd74d30e3c'})\nHTTP response body: b'{\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"AWX.awx.ansible.com \\\\\"awx-demo\\\\\" is invalid: upgradedPostgresVersion: Invalid value: \\\\\"integer\\\\\": upgradedPostgresVersion in body must be of type string: \\\\\"integer\\\\\"\",\"reason\":\"Invalid\",\"details\":{\"name\":\"awx-demo\",\"group\":\"awx.ansible.com\",\"kind\":\"AWX\",\"causes\":[{\"reason\":\"FieldValueTypeInvalid\",\"message\":\"Invalid value: \\\\\"integer\\\\\": upgradedPostgresVersion in body must be of type string: \\\\\"integer\\\\\"\",\"field\":\"upgradedPostgresVersion\"}]},\"code\":422}\\n'\nOriginal traceback: \n File \"/usr/local/lib/python3.9/site-packages/kubernetes/dynamic/client.py\", line 55, in inner\n resp = func(self, *args, **kwargs)\n\n File \"/usr/local/lib/python3.9/site-packages/kubernetes/dynamic/client.py\", line 270, in request\n api_response = self.client.call_api(\n\n File \"/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py\", line 348, in call_api\n return self.__call_api(resource_path, method,\n\n File \"/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py\", line 180, in __call_api\n response_data = self.request(\n\n File \"/usr/local/lib/python3.9/site-packages/kubernetes/client/api_client.py\", line 407, in request\n return self.rest_client.PATCH(url,\n\n File \"/usr/local/lib/python3.9/site-packages/kubernetes/client/rest.py\", line 299, in PATCH\n return self.request(\"PATCH\", url,\n\n File \"/usr/local/lib/python3.9/site-packages/kubernetes/client/rest.py\", line 238, in request\n raise ApiException(http_resp=r)\n"} {"reason":"FieldValueTypeInvalid","message":"Invalid value: "integer": upgradedPostgresVersion in body must be of type string: "integer"","field":"upgradedPostgresVersion"} Since the awx-operator/config/crd/bases/awx.ansible.com_awxs.yaml Lines 1867 to 1869 in d0827ba
We should store |
@kurokobo I'll check this out on Monday. How are you reproducing the error? Wondering why I didn't run into this in my upgrade test locally. |
@aknochow The reproduction procedure is as in the OP, but more precisely as follows:
|
Please confirm the following
Bug Summary
The conditionals that are introduced in #1486 is comparing
string
andint
that causes task failure.AWX Operator version
upstream
devel
AWX version
23.9.0
Kubernetes platform
kubernetes
Kubernetes/Platform version
v1.28.6+k3s2
Modifications
no
Steps to reproduce
devel
imageExpected results
AWX is upgraded with PSQL15
Actual results
The first reconciliation loop is completed successfully, but the second loop is failed with following error (this is formatted log):
Additional information
@john-westcott-iv @rooftopcellist @TheRealHaoLiu @aknochow
F.Y.I.
Operator Logs
No response
The text was updated successfully, but these errors were encountered: