I have an integration test that deletes a kubernetes pod using either the kubectl command or lightkube (the issue happens with both) as follows
# Deleting the primary pod using kubectl
k8s_client = AsyncClient(namespace=ops_test.model_name)
await k8s_client.delete(Pod, name=replica_name)
The test suite passes successfully.
Issue:
During the pytest-operator's teardown operation, the following exception is thrown inconsistently :
INFO pytest_operator.plugin:plugin.py:477 Juju error logs:
controller-0: 14:09:52 ERROR juju.worker.caasapplicationprovisioner.runner exited "mongodb-k8s": Operation cannot be fulfilled on pods "mongodb-k8s-0": the object has been modified; please apply your changes to the latest version and try again
And this results in the model created by the pytest-operator, not to be deleted and to be stuck on the destroying status until being force deleted manually.
Context:
I have an integration test that deletes a kubernetes pod using either the
kubectl
command orlightkube
(the issue happens with both) as followsThe test suite passes successfully.
Issue:
During the
pytest-operator
's teardown operation, the following exception is thrown inconsistently :And this results in the model created by the pytest-operator, not to be deleted and to be stuck on the
destroying
status until being force deleted manually.Environment:
0.14.0
ubuntu-20.04
(also happening onubuntu-22.04
)2.9.32
1.24.0
(also happening on1.23.6
)