Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CA-283754: ppxified interfaces, do not discard internal errors #204

Merged
merged 8 commits into from
Feb 22, 2018
Merged

CA-283754: ppxified interfaces, do not discard internal errors #204

merged 8 commits into from
Feb 22, 2018

Conversation

mseri
Copy link
Collaborator

@mseri mseri commented Feb 19, 2018

This is updating memory, gpumon and v6, recently ported to the new ppx interface.
This is not updatding clusterd that uses a slightly different error reporting and may noot need it (ping @edwintorok).

Signed-off-by: Marcello Seri marcello.seri@citrix.com

@mseri mseri requested a review from jonludlam February 19, 2018 14:23
@coveralls
Copy link

coveralls commented Feb 19, 2018

Coverage Status

Coverage decreased (-0.2%) to 61.775% when pulling b166be3 on mseri:CA-283754 into a999ef6 on xapi-project:master.

@mseri mseri changed the title CA-283754: memory_interface, do not discard internal errors CA-283754: ppxified interfaces, do not discard internal errors Feb 19, 2018
@mseri
Copy link
Collaborator Author

mseri commented Feb 19, 2018

Note:

@mseri
Copy link
Collaborator Author

mseri commented Feb 19, 2018

I had not realised how much stuff was changed by ocp-indent. I'll separate the commits

Marcello Seri added 5 commits February 19, 2018 15:35
Signed-off-by: Marcello Seri <marcello.seri@citrix.com>
Signed-off-by: Marcello Seri <marcello.seri@citrix.com>
Signed-off-by: Marcello Seri <marcello.seri@citrix.com>
Signed-off-by: Marcello Seri <marcello.seri@citrix.com>
Signed-off-by: Marcello Seri <marcello.seri@citrix.com>
Copy link
Contributor

@lindig lindig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments.

let gpu_err = GpuErrors.error
let gpu_err = Error.{
def = gpu_errors;
raiser = (function | e -> raise (Gpumon_error e));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here fun e -> raise (Gpumon_error e) would be more natural as we don't have several patterns.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I went with copy-paste. I'll add fixup commits

matcher = function | MemoryError e -> Some e | _ -> None
}
def = errors;
raiser = (function | e -> raise (MemoryError e));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. But not a real issue.

@edwintorok
Copy link
Contributor

Clusterd is implemented using Lwt, and it already does an Lwt.catch and transform everything to InternalError, so "on the wire" you can only get one of the known exceptions.
I think you are right, we don't need to change anything in the clusterd interface.

@jonludlam jonludlam merged commit ed14734 into xapi-project:master Feb 22, 2018
@mseri mseri deleted the CA-283754 branch February 22, 2018 14:11
mcintyre94 pushed a commit to mcintyre94/xen-api that referenced this pull request Feb 23, 2018
This depends upon xapi-project/xcp-idl#204 being merged

Signed-off-by: Marcello Seri <marcello.seri@citrix.com>
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.

None yet

5 participants