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