From nobody Fri Apr 28 14:24:36 2023 X-Original-To: stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q7FHP58jYz48XjM for ; Fri, 28 Apr 2023 14:24:49 +0000 (UTC) (envelope-from SRS0=dZEH=AT=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q7FHP2Zhmz40DM; Fri, 28 Apr 2023 14:24:49 +0000 (UTC) (envelope-from SRS0=dZEH=AT=quip.cz=000.fbsd@elsa.codelab.cz) Authentication-Results: mx1.freebsd.org; none Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id D7A16D78EF; Fri, 28 Apr 2023 16:24:40 +0200 (CEST) Received: from [192.168.145.50] (ip-89-177-27-225.bb.vodafone.cz [89.177.27.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 11625D78AB; Fri, 28 Apr 2023 16:24:37 +0200 (CEST) Message-ID: <19399711-4a71-7025-7ceb-8dd481ec0038@quip.cz> Date: Fri, 28 Apr 2023 16:24:36 +0200 List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: etcupdate created empty files = system unbootable Content-Language: cs-Cestina To: Dimitry Andric Cc: Dave Cottlehuber , stable@freebsd.org References: <312ae63f-4fab-e194-c603-a85fd11f6edd@quip.cz> <0db3bbf1-9e98-d721-c734-fdfe2483cbf0@quip.cz> <95169DC0-5DB6-41D1-8B04-5A450094529F@FreeBSD.org> From: Miroslav Lachman <000.fbsd@quip.cz> In-Reply-To: <95169DC0-5DB6-41D1-8B04-5A450094529F@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Q7FHP2Zhmz40DM X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:42000, ipnet:94.124.104.0/21, country:CZ] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 28/04/2023 15:16, Dimitry Andric wrote: >> 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. I have saved screens of the whole upgrade process so I am sure everything was fine without any error printed on the screen, nothing was interrupted etc. but the result was more than 80 empty files. And the next thing which bothers me there is no way to fix the half updated state of /etc/ by etcupdate. I had to use mergemaster to fix it. How can we fix something like this in 14 without mergemaster? root@rico ~/ # etcupdate D /etc/amd.map D /etc/newsyslog.conf.d/amd.conf D /etc/rc.d/amd D /etc/rc.d/nsswitch D /etc/rc.d/timed U /.profile U /COPYRIGHT U /etc/defaults/devfs.rules U /etc/defaults/rc.conf U /etc/devd.conf U /etc/devd/hyperv.conf U /etc/devd/iwmbtfw.conf U /etc/devd/zfs.conf U /etc/disktab M /etc/group U /etc/inetd.conf U /etc/libalias.conf U /etc/login.conf U /etc/mail/Makefile U /etc/mail/freebsd.cf U /etc/mail/freebsd.mc U /etc/mail/freebsd.submit.cf U /etc/mail/freebsd.submit.mc U /etc/mail/helpfile U /etc/mail/sendmail.cf U /etc/mail/submit.cf U /etc/mtree/BSD.debug.dist U /etc/mtree/BSD.include.dist U /etc/mtree/BSD.lib32.dist U /etc/mtree/BSD.root.dist U /etc/mtree/BSD.sendmail.dist U /etc/mtree/BSD.tests.dist U /etc/mtree/BSD.usr.dist U /etc/mtree/BSD.var.dist U /etc/network.subr C /etc/newsyslog.conf U /etc/portsnap.conf U /etc/profile U /etc/rc U /etc/rc.d/FILESYSTEMS U /etc/rc.d/archdep U /etc/rc.d/auditd U /etc/rc.d/bluetooth U /etc/rc.d/cleanvar U /etc/rc.d/ctld U /etc/rc.d/devmatch U /etc/rc.d/dhclient U /etc/rc.d/dumpon U /etc/rc.d/fsck U /etc/rc.d/growfs U /etc/rc.d/gssd U /etc/rc.d/hostapd U /etc/rc.d/hostid U /etc/rc.d/hostid_save U /etc/rc.d/ipfs U /etc/rc.d/ipfw U /etc/rc.d/jail U /etc/rc.d/ldconfig U /etc/rc.d/linux U /etc/rc.d/local U /etc/rc.d/local_unbound U /etc/rc.d/lockd U /etc/rc.d/motd U /etc/rc.d/mountcritremote U /etc/rc.d/mountd U /etc/rc.d/mountlate U /etc/rc.d/netif U /etc/rc.d/nfsd U /etc/rc.d/ntpd U /etc/rc.d/os-release U /etc/rc.d/pf U /etc/rc.d/routed U /etc/rc.d/routing U /etc/rc.d/statd U /etc/rc.d/syscons U /etc/rc.d/tmp U /etc/rc.d/wpa_supplicant U /etc/rc.d/zfs U /etc/rc.d/zfsbe U /etc/rc.d/zvol U /etc/rc.firewall U /etc/rc.initdiskless U /etc/rc.subr U /etc/regdomain.xml U /etc/security/audit_event U /etc/services U /etc/ssh/moduli U /etc/ssh/ssh_config C /etc/ssh/sshd_config M /etc/syslog.conf U /etc/ttys U /root/.profile A /etc/kyua/kyua.conf A /etc/motd.template A /etc/rc.d/growfs_fstab A /etc/rc.d/tlsclntd A /etc/rc.d/tlsservd A /etc/rc.d/var_run A /etc/rc.d/zfskeys A /etc/rc.d/zpool A /etc/rc.d/zpoolreguid A /root/.shrc A /usr/share/nls/en_US.US_ASCII Warnings: Modified regular file remains: /etc/motd Usr: 14.828s Krnl: 7.174s Totl: 0:58.53s CPU: 37.5% swppd: 0 I/O: 28179+16114 root@rico ~/ # etcupdate resolve Resolving conflict in '/etc/newsyslog.conf': Select: (p) postpone, (df) diff-full, (e) edit, (h) help for more options: df Select: (p) postpone, (df) diff-full, (e) edit, (h) help for more options: e Select: (p) postpone, (df) diff-full, (e) edit, (r) resolved, (h) help for more options: r Resolving conflict in '/etc/ssh/sshd_config': Select: (p) postpone, (df) diff-full, (e) edit, (h) help for more options: df Select: (p) postpone, (df) diff-full, (e) edit, (h) help for more options: e Select: (p) postpone, (df) diff-full, (e) edit, (r) resolved, (h) help for more options: r root@rico ~/ # etcupdate status Warnings: Modified regular file remains: /etc/motd Also there was etcupdate -p before installworld. Kind regards Miroslav Lachman