How to exit "lxc profile edit ..." and be on safe side

I did changes to storage related profile, but cannot exit it now:

root@node2:~# lxc profile edit btrfsstorage                                                                                                                                         
Config parsing error: At least one instance relies on this profile's root disk device
Press enter to open the editor again

Config parsing error: At least one instance relies on this profile's root disk device
Press enter to open the editor again

Config parsing error: ETag doesn't match: 87e5d098158a773bbd0d75e1bd036bbbf134c62613abd5747d5388b104b86922 vs f5bc3dd30f5bd47e35f071180cca059d5912093adc814fe757da11f8532b9aee
Press enter to open the editor again

Config parsing error: ETag doesn't match: 87e5d098158a773bbd0d75e1bd036bbbf134c62613abd5747d5388b104b86922 vs f5bc3dd30f5bd47e35f071180cca059d5912093adc814fe757da11f8532b9aee
Press enter to open the editor again

Config parsing error: ETag doesn't match: 87e5d098158a773bbd0d75e1bd036bbbf134c62613abd5747d5388b104b86922 vs f5bc3dd30f5bd47e35f071180cca059d5912093adc814fe757da11f8532b9aee
Press enter to open the editor again

in case of say “crontab” or “visudo” on exit they rollback to original file, here, I’m not sure what is the option. I can “kill” it of course, but afraid of break something.

Keeping it running in tmux.

If you ctrl+c instead of pressing enter then the change will have been rejected and won’t be applied.

great, thanks!
I’d add to output message something “Press enter to open the editor again, Ctrl+C to abort change”.
It was not clear for me both ctrl+c/kill is safe to do.

I’ve added this change:

Thanks a lot! Hope it will save time for others in similar case!

1 Like