πŸ“ ISEmedia - ISE_v9.0 GLIBC PREREQ -- VM guest -- the Clone and the drama.md

ISEmedia + Clone-Build Session Log

Purpose: Full record of everything done across this multi-session effort, kept so a future clone rebuild doesn't have to rediscover any of it. Nothing intentionally omitted.


PART 1 β€” Prior session (ISEmedia design + first Clone attempt)

1.1 ISEmedia design

1.2 MediaIndexer.py v0.1 (delivered, syntax-checked only, NOT deploy-tested)

Contains:

Known stubs requiring real wiring before use:

  1. resolve_attachment_dir() raises NotImplementedError β€” needs a real _parse_php_dir_array()-equivalent from PDFsearch.py/MiscIndexer.py.
  2. attachment_id-from-filename derivation is an assumption, needs checking against real attachments dir/DB layout.

1.3 The glibc wall (confirmed empirically on Live)

1.4 Resolution: disposable CentOS 6.10 Clone VM

1.5 CentOS 6.10 install

1.6 Live↔Clone connectivity

1.7 rsync exclude list (as it stood at end of prior session)

/dev,/proc,/sys,/tmp,/run,/mnt,/media,/lost+found,/swapfile,
/var/lib/mysql,/root/.cache,/var/lib/clamav,/var/lib/awstats,
/var/spool/mail,/opt/metasploit-framework/.git,/usr/src/tensorflow/.git,
/var/www/html/private,/var/www/html/ISE_Data,/var/www/html/backup,
/SQL,/var/log/httpd,/etc/webmin/system-status/history,/var/lib/fail2ban,
/usr/local/lib/python3.6/site-packages/torch/lib

Plus: full SMF+DB but only last 20 attachments β€” /var/www/html/attachments and /attachments2 excluded wholesale from the main rsync, with a separate find ... -printf '%T@ %p\n' | sort -rn | head -20 step to pull just the 20 newest attachment files.

mysqldump (--all-databases --single-transaction --quick) must run ON LIVE, then scp'd to Clone; Clone needs mysql-server installed separately to import.

1.8 Real bugs hit and fixed during that session's execution (clone.sh)

1.9 THE major bug: SSH from Clone silently connecting to itself

1.10 Other technical notes from that session

1.11 Mock media_store.json

1.12 Real CLIP indexing attempts (prior session)


PART 2 β€” This session

2.1 Resumed: real image indexing

2.2 RankingEngine.py v9.0 β€” SimilarityRule for ISEmedia

2.3 MediaSearch.py v0.2 β€” wired into RankingEngine

2.4 Clone.sh troubleshooting marathon (the bulk of this session)

2.4.1 $SQL_FILE variable syntax

2.4.2 hostnamectl: command not found

2.4.3 /etc/hosts loopback trap recurred on THIS clone too

::1             forum   forum.drugs-and-users.org       localhost.drugs-and-users.org   localhost
127.0.0.1 forum forum.drugs-and-users.org localhost.drugs-and-users.org localhost
128.199.200.202 forum forum.drugs-and-users.org drugs-and-users.org localhost.drugs-and-users.org localhost
sed -i '/forum.drugs-and-users.org/d' /etc/hosts
echo "127.0.0.1 Clone localhost" >> /etc/hosts

2.4.4 -X vs -x in rsync

setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config

2.4.5 Original clone.sh missing -P/--partial

2.4.6 rsync -zpaAPve -ssh malformed

2.4.7 CRLF line-ending corruption (clone1.sh)

2.4.8 First Clone VM died β€” black screen, no boot

2.4.9 Second Clone VM ALSO died

2.4.10 LABEL=DOROOT boot failure (second dead clone's actual symptom)

2.4.11 SSH lockout after the rsync (post-fstab-fix)

2.4.12 /etc/passwd//etc/shadow leak suspected β€” likely THE actual SSH lockout cause

2.4.13 /etc/sysconfig/network-scripts leak

2.4.14 fail2ban

2.4.15 /etc/sysconfig/iptables leak suspected

2.4.16 /etc/ssh/sshd_config leak

2.4.17 Decision point: rebuild clone.sh with /etc excluded wholesale

2.4.18 MySQL access problems (separate from account-file leak, my.cnf itself)

2.4.19 pv install

2.4.20 mysqld autostart

2.4.21 SMF confirmed up and running on Clone β€” real milestone reached

2.4.22 Backup strategy for the upcoming glibc upgrade

2.4.23 Final two clone.sh variants delivered

Given Clone was by now already up and working (the scripts below are for the NEXT rebuild, not this Clone):

A) /mnt/user-data/outputs/clone.sh β€” /etc and /boot excluded wholesale, PLUS a new [6/6] section that actively APPLIES the concrete fixes discovered tonight rather than just describing them:

B) /mnt/user-data/outputs/clone_include_etc.sh β€” alternative approach: pulls /etc almost entirely (httpd vhosts, php.ini, my.cnf, cron, logrotate, etc. all included), and ONLY excludes the seven specific files/dirs that caused actual damage:

/etc/hosts
/etc/fstab
/etc/passwd
/etc/shadow
/etc/group
/etc/gshadow
/etc/hostname
/etc/sysconfig/network
/etc/sysconfig/network-scripts/*
/etc/sysconfig/iptables*
/etc/ssh/sshd_config

/boot still excluded separately (unrelated to /etc, its own dead-VM cause). Caveat baked into the script's own closing output: my.cnf IS included in this version (not one of the "unrecoverable damage" complaints, just an annoying auth mismatch) β€” so the same MySQL password confusion could recur if this version is used, unlike version A where all of /etc including my.cnf is excluded.

2.4.24 User's final call on both scripts


PART 3 β€” Standing lessons / checklist for next rebuild

Files/dirs that MUST NOT be blindly copied from Live to a freshly-installed Clone (identity/boot/account/network specific):

Mechanical gotchas:

ISEmedia code state (independent of the Clone VM issues):

Still pending (unchanged from prior session, not touched this session):