Re: etcupdate created empty files = system unbootable

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Fri, 28 Apr 2023 13:16:53 UTC
On 28 Apr 2023, at 09:40, Miroslav Lachman <000.fbsd@quip.cz> wrote:
> 
> On 28/04/2023 08:30, Dave Cottlehuber wrote:
>> On Thu, 27 Apr 2023, at 11:21, Miroslav Lachman wrote:
> 
>>> After this I updated bootcode with gpart and rebooted the machine but it
>>> does not come up, cannot login via ssh. Accessing this remote machine
>>> with remote mamagement / IPMI was a nightmare. It took me almost 5 hours
>>> because of java etc. but it's a different story.
>>> 
>>> The machine in question is all ZFS based.
>> Ouch. I don’t wish java remote console on anybody. I have heard a very small number of vaguely similar complaints but nothing concrete.
>> Do you still have the zfs snapshot this was upgraded from? It would be good to know if this issue is reproducible, and even better to work out what’s happening.
>> Please log a PR for this issue
> 
> yes, I have Boot Environment created before system upgrade (I always create BE before system or pkg upgrades) and there are automatic snapshot from cron.
> 
> Should I try to clone it and reproduce it again?
> 
> I will file a PR today.

I have seen some bad behavior in the past from etcupdate, when you interrupted it (with control-C) at the 'wrong' time. In that case, it would have built up a bad tree in /var/db/etcupdate, and as a result *delete* almost all files in /etc! However, this problem has been solved, as far as I know, and the effect was definitely not zero-sized files, but really deleted ones.

If you have a good way of reproducing it, I think the etcupdate maintainers will be interested enough, moreover since mergemaster is going to go away.

-Dimitry