From b87692fd472c989ebfd04990469eda3c526741df Mon Sep 17 00:00:00 2001
From: Daniel Juarez <daniel.juarez.gonzalez@cern.ch>
Date: Tue, 10 May 2022 17:41:36 +0200
Subject: [PATCH] Troubleshoot AIMS TFTP/HTTP gets

---
 docs/aims2/troubleshooting.md | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/docs/aims2/troubleshooting.md b/docs/aims2/troubleshooting.md
index 401846b..75d9c49 100644
--- a/docs/aims2/troubleshooting.md
+++ b/docs/aims2/troubleshooting.md
@@ -2,6 +2,35 @@
 
 Arne recently added Alex and Juárez to the access list for [Ironic monitoring](https://monit-grafana.cern.ch/d/000000212/ironic?orgId=3&refresh=1m). This can help checking if there is a major outage going on.
 
+## Check that TFTP and HTTP files can be served
+
+TFTP is a nightmare and we could not make the client part work on a CS8 client so use a CC7 one.
+
+You will need to enable TFTP on the client's side firewall or packets will be filtered/dropped:
+
+```bash
+yum install tftp -y
+firewall-cmd --zone=public --add-service=tftp --permanent
+firewall-cmd --reload
+```
+
+Then check that files can be retrieved:
+
+```bash
+# Check that the port 69 is open, or TFTP won't work
+nmap aims.cern.ch -sU -p 69
+
+# Check autoregistration part works fine. If this works, registered images should work as well, but if needed adapt paths.
+# UEFI bootloader
+tftp -4 -vvv -m binary aimstest02.cern.ch -c get /hwreg/loader/uefi/bootx64.efi.0
+# BIOS bootloader (HTTPS)
+tftp -4 -vvv -m binary aims.cern.ch -c get /hwreg/loader/bios/lpxelinux.0
+# BIOS hwreg image (HTTP)
+wget aims.cern.ch/aims/boot/HWREG_AUTOINSTALL/vmlinuz
+# UEFI hwreg image (TFTP). Ref. https://its.cern.ch/jira/browse/LOS-763
+tftp -4 -vvv -m binary aims.cern.ch -c get/aims/boot/OPENSTACK-IRONIC-IPA/vmlinuz
+```
+
 ## Collection of AIMS2 errors
 
 We have gathered some AIMS2 errors in the following link: [AIMS2 error collection](/aims2/errorcollection)
-- 
GitLab