lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Where in /etc are customizations preserved?


From: Vadim Zeitlin
Subject: Re: [lmi] Where in /etc are customizations preserved?
Date: Mon, 17 Aug 2020 23:35:11 +0200

On Mon, 17 Aug 2020 20:28:13 +0000 Greg Chicares <gchicares@sbcglobal.net> 
wrote:

GC> If you really enjoy puzzles, explain this before reading further:
GC> 
GC> /opt/lmi/src/lmi[0]$make $coefficiency unit_tests 2>&1 | tee >(grep 
'\*\*\*') >(grep '????') >(grep '!!!!' --count | xargs printf '%d tests 
succeeded\n') >../log
GC> tee: /proc/self/fd/17: No such file or directory
GC> tee: /proc/self/fd/18: No such file or directory
GC> tee: /proc/self/fd/19: No such file or directory
GC> 0 tests succeeded

 My guess is that /proc wasn't mounted. Do I win?

GC> SPOILER COMING BELOW
GC> 
GC> Vadim--Our redhat server just got an upgrade from 7.6 to 7.8,
GC> and some files I had saved in /etc were removed.

 I'm not an expert in RedHat, but I'm almost sure that this is _not_ a
normal consequence of an upgrade and that these files must have been
explicitly removed by the system administrator for some reason. Perhaps
they didn't really upgrade the system at all but just re-imaged it?

GC> Is there any standard guidance to inform me where I can place files
GC> that need to be preserved?

 If they just overwrite /etc, I'm afraid there is not much that you can do.
I use etckeeper (https://etckeeper.branchable.com/) religiously on all my
Linux systems, but even it wouldn't have helped in this case -- unless you
maintained a copy of /etc/.git somewhere outside of it.

GC> Accordingly, I had created a directory "relative to /etc/schroot":
GC>   mkdir -p /etc/schroot/lmi_profile
GC> and populated it, e.g.:
GC>   cat >/etc/schroot/lmi_profile/fstab <<EOF
GC>   ...
GC>   touch    /etc/schroot/lmi_profile/copyfiles
GC>   touch    /etc/schroot/lmi_profile/nssdatabases
GC> but right after the upgrade those files vanished,

 Are these files created by the lmi setup scripts? If not, I'd still
recommend storing them in a Git repository somewhere, to at least have a
backup in case this happens again.

GC> with the puzzling result above due to the liquidation of the fstab
GC> configured for the chroot. Most stuff seems to work, until you need
GC> something like /proc .

 I interpret this as meaning that I did win.

GC> Am I missing some general guideline that would have kept us
GC> safe from this?

 Again, I don't really know what happened, but I strongly suspect they've
just recreated all system directories. Have your other modifications, e.g.
lmi group creation, survived this update?

GC> I wouldn't assume that the upgrade involved only the RHEL
GC> equivalent of "apt-get dist-upgrade". I have a feeling they
GC> probably ran some script obtained from some vendor. I tried
GC> looking into the recent activity with 'etckeeper', which was
GC> left installed...but its git repository was liquidated (root
GC> cannot find it at all).

 Ah, so you did have it too... but no backup, I guess? I also run "git push
--mirror" to some remote repository on the machines that I really care
about, but in this case perhaps you could just keep a mirror of it on the
same machine, but in your home directory, to at least be able to restore
the files from it easily.

 Sorry but I really don't think you can do anything else.
VZ

Attachment: pgpYnPeWwWVAh.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]