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

CP-15502: Adding VM Scheduled Snapshot functions, APIs, CLIs and records. #2577

Closed
wants to merge 8 commits into from

Conversation

sharady
Copy link
Contributor

@sharady sharady commented Feb 8, 2016

No description provided.

| "snapshot" -> `snapshot
| "checkpoint" -> `checkpoint
| "snapshot_with_quiesce" -> `snapshot_with_quiesce
| _ -> raise (Record_failure ("Expected 'snapshot', 'checkpoint', 'snapshot_with_quiesce'"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you include the string which was actually received in this exception, as string_to_network_default_locking mode does?

@euanh
Copy link
Contributor

euanh commented Feb 8, 2016

I notice that the design is called 'scheduled snapshots' but in the rest of the design document and in the code here (both external strings and internal definitions) you use 'schedule snapshot'. 'Scheduled snapshot' seems more correct to me.

List.map (fun (k,v)-> k,(assert_key ~field ~ks ~key:k ~value:v)) value
)
else None
)
Copy link
Contributor

Choose a reason for hiding this comment

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

All the functions from mem above to here seem like generic utilities which should be in a general library module.
They should all have unit tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

There are already some functions like this for handling key-value pair lists in map_check.ml - that might be a good place to add them.

@euanh
Copy link
Contributor

euanh commented Feb 8, 2016

Does the actual snapshot scheduler apply any jitter to the schedule? There must be some mechanism to spread out the load of taking the snapshots - otherwise in the worst case every 15 minutes Xapi will grind to a halt as it snapshots every VM at the same time.

Signed-off-by: Sharad Yadav <sharad.yadav@citrix.com>
1) scheduled-snapshot : VM part of scheduled snapshot.
2) is-vmss-snapshot : Snapshot created from VMSS.

Signed-off-by: Sharad Yadav <sharad.yadav@citrix.com>
Signed-off-by: Sharad Yadav <sharad.yadav@citrix.com>
Signed-off-by: Sharad Yadav <sharad.yadav@citrix.com>
Signed-off-by: Sharad Yadav <sharad.yadav@citrix.com>
Signed-off-by: Sharad Yadav <sharad.yadav@citrix.com>
@sharady
Copy link
Contributor Author

sharady commented Feb 9, 2016

@euanh @johnelse Thanks for the review :)
I have updated the cosmetic changes. Few more coming soon.

(* Check VMs associated to VMSS supports the new snapshot type *)
let snapshot_type = Record_util.vmss_type_to_string value in
let vms = Db.VMSS.get_VMs ~__context ~self in
if not (vms = []) then
Copy link
Contributor

Choose a reason for hiding this comment

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

if vms <> [] then ...

@simonjbeaumont
Copy link
Contributor

Removing the reviewed label since there are more changes coming according to sharad's comment.

Signed-off-by: Sharad Yadav <sharad.yadav@citrix.com>
@sharady sharady force-pushed the CP-15502-v2 branch 2 times, most recently from 91763d4 to a1ad48f Compare February 10, 2016 12:18
@sharady
Copy link
Contributor Author

sharady commented Feb 10, 2016

@euanh I have moved the key:value check functions to map_check.ml
Please have a look on the PR. thanks

@simonjbeaumont simonjbeaumont changed the title CP-15502: Adding VM Schedule Snapshot functions, APIs, CLIs and records. CP-15502: Adding VM Scheduled Snapshot functions, APIs, CLIs and records. Feb 10, 2016
@simonjbeaumont
Copy link
Contributor

@sharady you can remove the needs updating label if you think it's ready for (re-)review.

Signed-off-by: Sharad Yadav <sharad.yadav@citrix.com>
@stephen-turner
Copy link
Contributor

I haven't reviewed this PR, but I did notice some terminology problems.
A VMSS is a "VM Snapshot Schedule" not a "VM Scheduled Snapshot".
A scheduled snapshot is a single snapshot, created according to the schedule.
This affects some function names as well as comments.
For example, vm_set_scheduled_snapshot should be vm_set_snapshot_schedule.

@jonludlam
Copy link
Contributor

closing this until we expect progress

@jonludlam jonludlam closed this Feb 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants