← Back to team overview

cloud-init-dev team mailing list archive

Re: [Merge] ~smoser/cloud-init:fix/cii-kvmimage-preserve-original into cloud-init:master

 

On Mon, Nov 27, 2017 at 4:31 PM, Scott Moser <ssmoser2+ubuntu@xxxxxxxxx>
wrote:

>
> It looks like as it is right now we do not call destroy on an image before
> using a snapshot.
> But having NoCloud work like other clouds makes sense.
>

I don't disagree with the goal; however; just as I don't want to upload a
new snapshot
each time I launch a VM, I don't want to copy over the image each time I
launch one in
NoCloud.

Can we model the image manipulation like we would the clouds?

i = Image(foo)
i.execute("modifications here")
s = i.snapshot()
new_image = cloud.upload(s)
new_image.launch()

I think that makes it clear that one *could* delete the original image
second the upload allows for NoCloud to do a copy and return a new path to
the image
which hopefully we could re-use on subsequent runs

i = cloud.get_image("foo")
i.launch()

After the upload, I think it'd be fair for cloud.get_image() to return a
qcow2 image backed against the "uploaded" snapshot which would
avoid the copy and allow the original image to be deleted (not that we have
a use-case for that).






>
> As it is right now we only ever call snapshot wrapped in a context handler
> of an image.
>
> --
> https://code.launchpad.net/~smoser/cloud-init/+git/cloud-
> init/+merge/334147
> Your team cloud-init commiters is requested to review the proposed merge
> of ~smoser/cloud-init:fix/cii-kvmimage-preserve-original into
> cloud-init:master.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~cloud-init-dev
> Post to     : cloud-init-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~cloud-init-dev
> More help   : https://help.launchpad.net/ListHelp
>

-- 
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/334147
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:fix/cii-kvmimage-preserve-original into cloud-init:master.


References