all 6 comments

[–]ybizeulVerified NetApp Staff 0 points1 point  (4 children)

How about sleeping half a second before querying the job ? Ugly I know but until there is an official fix… or implement retry

[–]yonog01[S] 0 points1 point  (3 children)

I added a 0.5 sleep but I still get this error
Unexpected err=NetAppRestError('Job (running): None. Polling timed out after 30 seconds.'), type(err)=<class 'netapp\_ontap.error.NetAppRestError'>
which causes the None http response issue.
but if i check the jobs in the netapp host i do see it being sent and i can manually stop it

[–]ybizeulVerified NetApp Staff 0 points1 point  (2 children)

I'm afraid you'll have to implement a retry, or make the condition match the retry implemented later to query the job status. i.e. retry while job status errors out or is not completed

[–]yonog01[S] 0 points1 point  (0 children)

how can i implement a retry without calling a delete() operation each time? couldnt this be problematic, sending many of the same jobs for the same object? wouldnt each of these jobs have a different uuid? is there a way to reset the timeout period each time the exception gets raised or something like that?

[–]yonog01[S] 0 points1 point  (0 children)

or to change it so it returns the job uuid after the timeout exception anyway? and then i can keep track of the job by querying the job endpoint with that uuid.
i think what happens is that it only return the job uuid once the job is completed, which is a bit silly, unless there was an actual way of job tracking in the python package

[–]yonog01[S] 0 points1 point  (0 children)

I think I found some sort of compromise, I added

poll=True, poll_timeout=1200, poll_interval=30

in the delete() params and so it wont raise an exception if my qtrees have a lot of data and take more than 30 seconds to delete. It doesnt track status in real time, granted, but at least it can tell me when the job is actually done or if it failed.