Info:
The base_orch repo is fixed: Apache returns 200 OK, and all 10 B servers say base_orch OK.
Next, re-run the MOTD update for the B servers only. Run it from the folder you're already in (/etc/ansible/tricycle_ansible_master):
ansible-playbook site.yml -i inventories/ref_rbb/hosts_ref_rbb.yml --ask-vault-pass -u dbv6admin --tags tcpwrappers --limit 'rbb-ref-b-*:!rbb-ref-b-vlim06'
Then check the result on one server:
ssh rbb-ref-b-vlim02 cat /etc/motd
If the run ends with failed=0 and the MOTD shows the new kernel (553.184.1), the MOTD step is done. If anything fails, send me the PLAY RECAP.
======================================================
The files are there, but one folder level too deep, so the servers still can't find them.
What happened: your update/ folder already had a base_orch_yum_repo-1.1.0 folder inside it. Moving it created this:
/var/www/html/base_orch_yum_repo-1.1.0/base_orch_yum_repo-1.1.0/ <- the RPMs are here
But the servers look for:
/var/www/html/base_orch_yum_repo-1.1.0/repodata/repomd.xml
It's the same extra-folder problem we had with the tar file.
Fix it on rbb-ref-b-ansible:
cd /var/www/html
mv base_orch_yum_repo-1.1.0 base_orch_tmp
mv base_orch_tmp/base_orch_yum_repo-1.1.0 base_orch_yum_repo-1.1.0
rmdir base_orch_tmp
ls base_orch_yum_repo-1.1.0/repodata/
- The last command should list
repomd.xml. - If it says "No such file or directory", the copy has no index. Build one with
createrepo_c /var/www/html/base_orch_yum_repo-1.1.0.
Then fix permissions and labels, and test. Files moved from /tmp keep a label that blocks Apache, so run restorecon again after the move:
chmod -R a+rX /var/www/html/base_orch_yum_repo-1.1.0
restorecon -R /var/www/html/base_orch_yum_repo-1.1.0
curl -sI http://10.212.176.62/base_orch_yum_repo-1.1.0/repodata/repomd.xml | head -1
You should see HTTP/1.1 200 OK.
Then check the servers can read it:
cd /etc/ansible/tricycle_ansible_master
ansible 'rbb-ref-b-*:!rbb-ref-b-vlim06' -i inventories/ref_rbb/hosts_ref_rbb.yml --ask-vault-pass -u dbv6admin -b -o \
-m shell -a "dnf -q makecache --repo base_orch >/dev/null && echo base_orch OK"
Every server should say base_orch OK. Once they do, you can re-run the MOTD update with --limit 'rbb-ref-b-*:!rbb-ref-b-vlim06'.
======================================================
rbb-ref-b-*:!rbb-ref-b-vlim06:!rbb-ref-b-ansible
ansible 'rbb-ref-b-*:!rbb-ref-b-vlim06:!rbb-ref-b-ansible' -i inventories/ref_rbb/hosts_ref_rbb.yml --ask-vault-pass -u dbv6admin -o -m command -a "uname -r"
cd /etc/ansible/tricycle_ansible_master
ansible-playbook site.yml -i inventories/ref_rbb/hosts_ref_rbb.yml --ask-vault-pass -u dbv6admin \
--tags tcpwrappers --limit 'rbb-ref-b-*:!rbb-ref-b-vlim06'
ssh rbb-ref-b-vlim02 cat /etc/motd
=====================================
This run did more than update the MOTD, and it has left one thing that needs fixing soon.
What happened:
- Along with the MOTD tasks, it ran the shared
ansible-commonsetup. That rewrote thebase_orchrepo on every server tohttp://10.212.176.62/base_orch_yum_repo-1.1.0, switched on (enabled: 1). That's the "changed" lines at the top. - The next task then tried to use that repo, and every server failed: "Cannot download repomd.xml". The B master (
.62) isn't serving abase_orch_yum_repo-1.1.0repo at that address. - So the run stopped before the MOTD part.
Why it matters: each server now has a repo that is switched on but can't be reached. Until that's fixed, dnf commands on those servers will error, including installs, checks and next month's patching.
Step 1. Check the B master (rbb-ref-b-ansible):
ls -ld /var/www/html/base_orch_yum_repo*
curl -sI http://10.212.176.62/base_orch_yum_repo-1.1.0/repodata/repomd.xml | head -1
Step 2. Fix it based on what you see:
- No
base_orch_yum_repo-1.1.0folder on the B master (most likely): the A master has one. Copy it across from the A master:
Then on the B master:scp -rp /var/www/html/base_orch_yum_repo-1.1.0 root@10.212.176.62:/var/www/html/chmod -R a+rX /var/www/html/base_orch_yum_repo-1.1.0 restorecon -R /var/www/html/base_orch_yum_repo-1.1.0 - The folder exists but
curlshows 403: run just thechmodandrestoreconlines above. - There's a base_orch folder under a different version, for example
-1.0.x: send me thelsoutput. The servers may be meant to use that version instead, which would mean the run picked up the wrong version number.
Step 3. Confirm the servers can read it again:
ansible 'rbb-ref-b-*:!rbb-ref-b-vlim06' -i inventories/ref_rbb/hosts_ref_rbb.yml --ask-vault-pass -u dbv6admin -b -o \
-m shell -a "dnf -q makecache --repo base_orch >/dev/null && echo base_orch OK"
Every server should say base_orch OK. After that, you can re-run the MOTD update.
Also check: the run included rbb-ref-a-vadmin and both vlim06 servers, so the --limit wasn't applied. Please send me the exact command you ran. rbb-ref-a-vadmin also had its base_orch repo pointed at the B master (.62), so once the B repo is fixed, check whether that A server should point at .61 instead.
Comments
Post a Comment