edf-hpc / clara

Cluster Administration tools
Other
18 stars 12 forks source link

How to abort an image edit? #30

Closed mehdid closed 10 years ago

mehdid commented 10 years ago

Reading the code, I see no way to abort an image edition if I wanted to (except backuping the old one, and then restore it). Am I missing something?

mehdid commented 10 years ago

It might be because pty.spawn doesn't return the exit code of the command... Python 3.4 adds the necessary stuff to make this easier to implement. But maybe we can find another way until then to make this feature possible. (Like leaving around a file /tmp/plz_dont_touch_my_image in the image tree? :-P)

ana commented 10 years ago

FWIW, before repacking the edited image, clara keeps the old image around adding ".old" to its name.