canonical/pycloudlib

LXD snapshot(): do not shutdown() and use `lxc publish --force`

paride opened this issue · 0 comments

Stemmed out of canonical/ubuntu-pro-client#1744 (comment)

From my local testing ephemeral instances survive the stop issued by lxc publish --force. Also the instance is brought back to it previous RUNNING state after the snapshot is taken, I can't see code doing it in

def snapshot(self, snapshot_name):

and I think it's desirable. My proposal is to remove the self.shutdown(wait=True) from snapshot() for LXD instances and always use --force.