-
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
Changes from all commits
3bdf567
7c46f1b
3c38e84
7983e36
caa15cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,22 +11,15 @@ | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
*) | ||
exception Not_implemented | ||
|
||
let nothrow f () = try f() with _ -> () | ||
|
||
let create ~__context ~vM ~vDI = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we leave the There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. |
||
let cdumpref = Ref.make() in | ||
let uuid = Uuid.to_string (Uuid.make_uuid()) in | ||
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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. This is a XenAPI call, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then let's deprecate the whole class! 🗑️ There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Please add the deprecation of the There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Yes. |
||
Stdext.Pervasiveext.finally | ||
(nothrow (fun ()-> | ||
let vdi = Db.Crashdump.get_VDI ~__context ~self in | ||
Helpers.call_api_functions ~__context | ||
(fun rpc session_id -> | ||
Client.Client.VDI.destroy rpc session_id vdi))) | ||
(Helpers.log_exn_continue | ||
"destroying crashdump" | ||
(fun ()-> | ||
let vdi = Db.Crashdump.get_VDI ~__context ~self in | ||
Helpers.call_api_functions ~__context | ||
(fun rpc session_id -> | ||
Client.Client.VDI.destroy rpc session_id vdi))) | ||
(fun ()-> | ||
Db.Crashdump.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.
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.Uh oh!
There was an error while loading. Please reload this page.
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.Uh oh!
There was an error while loading. Please reload this page.
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
Uh oh!
There was an error while loading. Please reload this page.
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. *)
Uh oh!
There was an error while loading. Please reload this page.
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".