Skip to content

[daemon/imon] End a provision orchestration on a failed start - #1127

Merged
cvaroqui merged 2 commits into
opensvc:mainfrom
cvaroqui:provision-start-failure
Sep 23, 2026
Merged

cvaroqui merged 2 commits into
opensvc:mainfrom
cvaroqui:provision-start-failure

Conversation

@cvaroqui

Copy link
Copy Markdown
Member

A provision provisions what needs provisioning and starts what does not, so an object whose every resource reports its provisioned state as n/a is never provisioned by it, only started. The end of the orchestration did not know that: it recognized a provision failure and nothing else, where the switch above it already routed a start failure to the failure handler.

A failed start therefore ended nothing. The instance monitor retries no failed action, so the orchestration stayed running with nothing left to run it, and "om provision --wait" waited out its whole timeout on an object that had given up in the first second. Seen on a QA object of three sgcp resources, none of which has a provisioner, reproduced on the lab with a single app.simple resource whose start exits non-zero.

Both states now end it, on the local instance, on the leader a peer waits for, and on all of them at once. The verdict the client is handed names what failed, "orchestration failed: start failed on dev2n1", in place of a timeout that named nothing.

A provision provisions what needs provisioning and starts what does not,
so an object whose every resource reports its provisioned state as n/a
is never provisioned by it, only started. The end of the orchestration
did not know that: it recognized a provision failure and nothing else,
where the switch above it already routed a start failure to the failure
handler.

A failed start therefore ended nothing. The instance monitor retries no
failed action, so the orchestration stayed running with nothing left to
run it, and "om <path> provision --wait" waited out its whole timeout on
an object that had given up in the first second. Seen on a QA object of
three sgcp resources, none of which has a provisioner, reproduced on the
lab with a single app.simple resource whose start exits non-zero.

Both states now end it, on the local instance, on the leader a peer
waits for, and on all of them at once. The verdict the client is handed
names what failed, "orchestration failed: start failed on dev2n1", in
place of a timeout that named nothing.
…reported

A start action can fail and leave the instance started anyway, a timeout
on an object whose resources did come up being the plain case. Ending the
provision orchestration on a start failure made that a failure, where the
success conditions used to have it: a start failure reached them by
falling through the failure block.

The verdict was the smaller half of it. The stopped flag is cleared and
the monitor enabled on the success path alone, so an object that came up
was left with the flag its creation set and its failover disabled, which
is what ending on a start failure set out to avoid.

Check the instance first, as the started orchestration does in
startedFromStartFailed: a start failure ends this one only while the
instance is not started. A genuine failed start, the one that left the
orchestration running with nothing to run it, ends it as before.

Provision failure precedence is unchanged.
@cvaroqui
cvaroqui merged commit 5926d6b into opensvc:main Sep 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant