Hi all,

When a VM deployment fails, the person looking at the UI often cannot
tell why, or where to fix it. I have been testing this on a 4.22.1.1
KVM lab and would like to propose some work, built on top of
Abhishek's PR #12336 (errortextkey and message catalogue), and check
the direction with you before writing code.

What I tested

Six controlled failures on 4.22.1.1, KVM, advanced zone:

1. Template whose URL returns 404: "Template ... has not been
completely downloaded to zone ...". The template status says 404, but
that is not shown.
2. Disk offering with a storage tag no pool has: 533 "No destination
found for a deployment for VM instance {...}". The cause is logged at
DEBUG only.
3. 500 GB disk, largest pool can take about 114 GB: the same 533 text.
Cause at DEBUG only.
4. 16 vCPU on hosts with 4 cores: the same 533 text. Cause at DEBUG only.
5. 64 GB RAM on hosts with 9.6 GB: the same 533 text. At DEBUG the log
says only "No clusters found having a host with enough capacity", with
no numbers.
6. Compute offering with a host tag no host has: 530 "No suitable host
found." FirstFitPlanner logs the tag list at ERROR, but it is not in
the response.

So four different causes give one identical message, and the real
cause is only in DEBUG logs. End users get the same text, including
the internal instance name.

I checked #12336 against these cases. As far as I can see it does not
cover them: the deploy capacity failures go through a checked
exception that the PR leaves out of scope, FirstFitPlanner and
DeploymentPlanningManager are not changed, and the catalogue carries a
message only.

What I would like to propose

1. Server: carry the planner's rejection reasons (per host and per
pool: tags, CPU, memory, storage threshold) in the error metadata, and
give the deployment capacity, planner and template download failures
their own errortextkeys in the #12336 catalogue.
2. Catalogue: next to each message, an optional remedy text and an
optional UI route ("open the compute offering", "open hosts"), so the
UI can link the admin to the screen where the problem is fixed. Both
localisable like the messages.
3. UI: show the plain message, the cause and the fix link to admins.
Show end users the plain message, what they can do, and a reference
(the job id), without host, pool or capacity details.

I have a UI-only prototype of points 2 and 3 running on our lab. It
works out the cause from read-only API calls, because the server does
not send it yet. It covers the six cases above in English and
Kiswahili, and I can share screenshots. The proper version would use
the server-side data from point 1 instead.

Separately, while testing I found a race where destroyVirtualMachine
with expunge=true reports failure for an Error-state VM that the
expunge task is already removing. I opened #14966 for it.

Questions

- Is this direction acceptable, and should it wait for #12336 to
merge? I would build on it rather than beside it.
- Abhishek, are you planning to extend #12336 to the deployment path?
I do not want to duplicate your work.
- Is a remedy and route field in the catalogue acceptable, or would
you rather keep the catalogue to messages and have the UI hold the
remedies?

I am testing more failure types (resource limits, IP exhaustion,
volumes, snapshots, migration) and will share those results too.

Thanks,
James Peru

Reply via email to