-
Notifications
You must be signed in to change notification settings - Fork 292
Clean up & deprecate crashdump #3049
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
Clean up & deprecate crashdump #3049
Conversation
There is no crashdump.create API call, so it's fine to remove this function. Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Use an equivalent one from Helpers instead. Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
|
||
let nothrow f () = try f() with _ -> () | ||
|
||
let create ~__context ~vM ~vDI = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we leave the create
function here in case it's needed in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They can still find it in the git history though, and @jonludlam said that this API class isn't really used anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed it because I would have to add a check to it, but realized it's unused, removing these function saves use time I think, because we don't have to consider them when we make changes.
Db.Crashdump.create ~__context ~ref:cdumpref ~uuid ~vM ~vDI ~other_config:[]; | ||
cdumpref | ||
|
||
let destroy ~__context ~self = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do we use this? Can't we just move the function in an helper module and get rid of this module altogether?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a XenAPI call, crashdump.destroy
: https://xapi-project.github.io/xen-api/classes/crashdump.html,
so I think it's best to stick to the existing conventions and keep this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then let's deprecate the whole class! 🗑️
Also have a look at the use of host_crashdump
but I think that cannot be deprecated yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, but I think we can still merge this PR, as we can't just delete the whole class and its associated code right away, but this is still a useful cleanup in the meantime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the deprecation of the Crashdump
class to this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I'll add that!:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mseri I think we first need to add the next release (inverness?) to the datamodel, before we can deprecate this class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robhoes knows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
6ca1f43
to
3c23886
Compare
version_minor = 7; | ||
branding = "XenServer 7.2"; | ||
}; { | ||
code_name = Some rel_inverness; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if you put None here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think None
here is for things that do not have a codename, but Inverness does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another option is to simply not add Inverness to release_order_full
yet, and add it later. But maybe that would confuse the SDK or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's worth trying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please leave the same version numbers as falcon and use Unreleased for the branding. We'll bump it when we know the actual number.
This is basically the same we were doing before, it's just that now all these variables are in one place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it's probably worth adding a comment at the beginning of this list with this tip for future reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kc284 How about a comment like this:
(* For future XenServer versions, use the version number of the latest release, and "Unreleased" for the branding. *)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather make it more explicit and less xenserver-centric: "When you add a new release, use .... until the actual values are finalised".
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
3c23886
to
caa15cd
Compare
crashdump
XenAPI class