gardener / machine-controller-manager-provider-azure

This repository is the out of tree implementation of the machine driver for Azure cloud provider

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error messages not tagged correctly

prashanth26 opened this issue · comments

What happened:
Error messages on machine objects are not transported as desired in case of a GetMachineStatus() failure. This leads to unreadable errors on the machine object.

What you expected to happen:
Error to be propagated correctly

How to reproduce it (as minimally and precisely as possible):
Create a machine with valid credentials and then update the credentials to an invalid one. Now deletion should fail, however, the machine-deployment/machine-set/machine object doesn't display the right error.

Anything else we need to know:
Add error code handling here.

Environment:
/platform azure
/assign @AxiomSamarth

As per the investigation, error tagging seems to happen correctly. However, the error being returned from Azure is not structured properly for some reason (which needs to be investigated)

One improvement to solve this issue could be to update this code to print the actual error instead of the machine error.

If we are making above change , I think we should print the error here as well.

I was able to reproduce the same issue on my dev cluster with the existing MCM & MCM-provider-azure and it propagated the error correctly on the dashboard. I have a doubt if there is a special condition on the canary cluster that caused this error. May be we shouldn't hurry modifying this code until better understood. WDYT?

I was able to reproduce the same issue on my dev cluster with the existing MCM & MCM-provider-azure and it propagated the error correctly on the dashboard. I have a doubt if there is a special condition on the canary cluster that caused this error.

The error returned by Azure is different in the canary. If you see the canary case, the credentials are expired not invalid. So I guess the reproduction scenario is expired credentials.

May be we shouldn't hurry this code modification. WDYT?

This is definitely a desired fix, however, there is no hurry.

If you see the canary case, the credentials are expired not invalid

That is an extremely subtle observation. Thank you! Sure, I will have the fix ready soon :)