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

allow kameleon to start over from a fresh vm even when using checkpoints #62

Open
npf opened this issue Dec 22, 2015 · 2 comments
Open

Comments

@npf
Copy link
Contributor

npf commented Dec 22, 2015

I want to enable checkpoints, but I don't want to reuse previous checkpoints.

This should run a fresh VM and keep checkpoints for a later use:
$ kameleon build --enable-checkpoint receipe.yaml

This only should reuse existing checkpoints:
$ kameleon build --enable-checkpoint --from-checkpoint=<...> receipe.yaml

For ref, the current output of the first command, with existing checkpoints:

$ kameleon build --enable-checkpoint receipe.yaml
Starting recipe consistency check
Resolving variables
Creating kameleon build directory : /home/neyron/scm/digitalis/kameleon-g5k/build/idall-jessie-x64-std
Starting build recipe 'idall-jessie-x64-std.yaml'
Starting process: "bash"
[local] The local_context has been initialized
Restoring last build from step : 4f7c08edc701
[local] 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
[local] Restoring snapshot 7dab1bf2-65ed-4a24-9f6b-a2378b993362
Step 1 : bootstrap/_init_bootstrap/_init_0_enable_checkpoint
--> Running the step...
Step _init_bootstrap took: 0 secs
Step 2 : bootstrap/enable_checkpoint/enable_checkpoint
--> Running the step...
Step enable_checkpoint took: 0 secs
Step 3 : bootstrap/prepare_virtualbox/download_boot2kameleon_iso
--> Using checkpoint
Step 4 : bootstrap/prepare_virtualbox/create_vdi_disk
--> Using checkpoint
Step 5 : bootstrap/prepare_virtualbox/register_vm
--> Using checkpoint
Step 6 : bootstrap/prepare_virtualbox/generate_ssh_keys
--> Using checkpoint
Step 7 : bootstrap/prepare_virtualbox/create_ssh_config
--> Using checkpoint
Step prepare_virtualbox took: 0 secs
Step 8 : bootstrap/start_virtualbox/start_vm
--> Running the step...
[local] Starting virtualbox...
[local] Waiting for VM "idall-jessie-x64-std_f8375b4b598c" to power on...
[local] VM "idall-jessie-x64-std_f8375b4b598c" has been successfully started.
[local] Waiting for SSH to become available for out_context...(44s)^C
Starting process: "bash"
Error occured when executing the following command :
@npf npf added the bug label Dec 22, 2015
@mickours
Copy link
Contributor

I don't really understand the use case and/or the problem.

If you do not want kameleon to use the previously generated checkpoint just do:

kameleon build --clean receipe.yaml
kameleon build --enable-checkpoint receipe.yaml

It will start from a fresh VM and create new checkpoints.

The --enable-checkpoint option find automatically the last changed step and use the right checkpoint accordingly. The --from-checkpoint option was made to override this behaviour when the user want to force a selected checkpoint.

If you problem is that some steps should be done again even when using checkpoint you should use the - on_checkpoint: redo hook in your step definition. This is not documented (I just add an issue #65) but you can see examples here:
https://github.com/oar-team/kameleon-recipes/search?utf8=%E2%9C%93&q=on_checkpoint&type=Code

Thanks for reporting, I don't know if I really answer your question, do I?

@npf
Copy link
Contributor Author

npf commented Dec 26, 2015

It is indeed just an ergonomic problem. A command ought to be the most natural from a user's perspective, which I'm not completely convinced it is the case currently for checkpoints ;-)
At least some documentation must be added indeed.

Also the current usage message must be reworked to make the grammar of checkpoint related options more readable.

@mickours mickours added enhancement and removed bug labels Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants