this gist is part of this series
- add
thunderboltandthunderbolt-netkernel modules (this must be done all nodes - yes i know it can sometimes work withoutm but the thuderbolt-net one has interesting behaviou' so do as i say - add both ;-)nano /etc/modulesadd modules at bottom of file, one on each line- save using
xthenythenenter
doing this means we don't have to give each thunderbolt a manual IPv6 addrees and that these addresses stay constant no matter what
Add the following to each node using nano /etc/network/interfaces
If you see any sections called thunderbolt0 or thunderbol1 delete them at this point.
Doing this means we don't have to give each thunderbolt a manual IPv6 or IPv4 addrees and that these addresses stay constant no matter what.
Add the following to each node using nano /etc/network/interfaces this to remind you not to edit en05 and en06 in the GUI
This fragment should go between the existing auto lo section and adapater sections.
iface en05 inet manual
#do not edit it GUI
iface en06 inet manual
#do not edit in GUI
If you see any thunderbol sections delete them from the file before you save it.
*DO NOT DELETE the source /etc/network/interfaces.d/* this will always exist on the latest versions and should be the last or next to last line in /interfaces file
This is needed as proxmox doesn't recognize the thunderbolt interface name. There are various methods to do this. This method was selected after trial and error because:
- the thunderboltX naming is not fixed to a port (it seems to be based on sequence you plug the cables in)
- the MAC address of the interfaces changes with most cable insertion and removale events
-
use
udevadm monitorcommand to find your device IDs when you insert and remove each TB4 cable. Yes you can use other ways to do this, i recommend this one as it is great way to understand what udev does - the command proved more useful to me thanthe syslogorlspci commandfor troublehsooting thunderbolt issues and behavious. In my case my two pci paths are0000:00:0d.2and0000:00:0d.3if you bought the same hardware this will be the same on all 3 units. Don't assume your PCI device paths will be the same as mine. -
create a link file using
nano /etc/systemd/network/00-thunderbolt0.linkand enter the following content:
[Match]
Path=pci-0000:00:0d.2
Driver=thunderbolt-net
[Link]
MACAddressPolicy=none
Name=en05
- create a second link file using
nano /etc/systemd/network/00-thunderbolt1.linkand enter the following content:
[Match]
Path=pci-0000:00:0d.3
Driver=thunderbolt-net
[Link]
MACAddressPolicy=none
Name=en06
This section en sure that the interfaces will be brought up at boot or cable insertion with whatever settings are in /etc/network/interfaces - this shouldn't need to be done, it seems like a bug in the way thunderbolt networking is handled (i assume this is debian wide but haven't checked).
Huge thanks to @corvy for figuring out a script that should make this much much more reliable for most
- create a udev rule to detect for cable insertion using
nano /etc/udev/rules.d/10-tb-en.ruleswith the following content:
ACTION=="move", SUBSYSTEM=="net", KERNEL=="en05", RUN+="/usr/local/bin/pve-en05.sh"
ACTION=="move", SUBSYSTEM=="net", KERNEL=="en06", RUN+="/usr/local/bin/pve-en06.sh"
-
save the file
-
create the first script referenced above using
nano /usr/local/bin/pve-en05.shand with the follwing content:
#!/bin/bash
LOGFILE="/tmp/udev-debug.log"
VERBOSE="" # Set this to "-v" for verbose logging
IF="en05"
echo "$(date): pve-$IF.sh triggered by udev" >> "$LOGFILE"
# If multiple interfaces go up at the same time,
# retry 10 times and break the retry when successful
for i in {1..10}; do
echo "$(date): Attempt $i to bring up $IF" >> "$LOGFILE"
/usr/sbin/ifup $VERBOSE $IF >> "$LOGFILE" 2>&1 && {
echo "$(date): Successfully brought up $IF on attempt $i" >> "$LOGFILE"
break
}
echo "$(date): Attempt $i failed, retrying in 3 seconds..." >> "$LOGFILE"
sleep 3
done
save the file and then
- create the second script referenced above using
nano /usr/local/bin/pve-en06.shand with the follwing content:
#!/bin/bash
LOGFILE="/tmp/udev-debug.log"
VERBOSE="" # Set this to "-v" for verbose logging
IF="en06"
echo "$(date): pve-$IF.sh triggered by udev" >> "$LOGFILE"
# If multiple interfaces go up at the same time,
# retry 10 times and break the retry when successful
for i in {1..10}; do
echo "$(date): Attempt $i to bring up $IF" >> "$LOGFILE"
/usr/sbin/ifup $VERBOSE $IF >> "$LOGFILE" 2>&1 && {
echo "$(date): Successfully brought up $IF on attempt $i" >> "$LOGFILE"
break
}
echo "$(date): Attempt $i failed, retrying in 3 seconds..." >> "$LOGFILE"
sleep 3
done
and save the file
- make both scripts executable with
chmod +x /usr/local/bin/*.sh - run
update-initramfs -u -k allto propogate the new link files into initramfs - Reboot (restarting networking, init 1 and init 3 are not good enough, so reboot)
##3 Install LLDP - this is great to see what nodes can see which.
- install lldpctl with
apt install lldpdon all 3 nodes - execute
lldpctlyou should info
if you are having speed issues make sure the following is set on the kernel command line in /etc/default/grub file
intel_iommu=on iommu=pt
one set be sure to run update-grub and reboot
everyones grub command line is different this is mine because i also have i915 virtualization, if you get this wrong you can break your machine, if you are not doing that you don't need the i915 entries you see below
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt" (note if you have more things in your cmd line DO NOT REMOVE them, just add the two intel ones, doesnt matter where.
cat /sys/devices/cpu_core/cpus && cat /sys/devices/cpu_atom/cpus
you should get two lines on an intel system with P and E cores. first line should be your P cores second line should be your E cores
for example on mine:
root@pve1:/etc/pve# cat /sys/devices/cpu_core/cpus && cat /sys/devices/cpu_atom/cpus
0-7
8-15
- make a file at
/etc/network/if-up.d/thunderbolt-affinity - add the following to it - make sure to replace
echo X-Ywith whatever the report told you were your performance cores - e.g.echo 0-7
#!/bin/bash
# Check if the interface is either en05 or en06
if [ "$IFACE" = "en05" ] || [ "$IFACE" = "en06" ]; then
# Set Thunderbot affinity to Pcores
grep thunderbolt /proc/interrupts | cut -d ":" -f1 | xargs -I {} sh -c 'echo X-Y | tee "/proc/irq/{}/smp_affinity_list"'
fi
- save the file - done
I have only tried this on 6.8 kernels, so YMMV If you want more TB messages in dmesg to see why connection might be failing here is how to turn on dynamic tracing
For bootime you will need to add it to the kernel command line by adding thunderbolt.dyndbg=+p to your /etc/default/grub file, running update-grub and rebooting.
To expand the example above"
`GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt thunderbolt.dyndbg=+p"`
Don't forget to run update-grub after saving the change to the grub file.
For runtime debug you can run the following command (it will revert on next boot) so this cant be used to cpature what happens at boot time.
`echo -n 'module thunderbolt =p' > /sys/kernel/debug/dynamic_debug/control`
these tools can be used to inspect your thundebolt system, note they rely on rust to be installedm you must use the rustup script below and not intsall rust by package manager at this time (9/15/24)
apt install pkg-config libudev-dev git curl
curl https://sh.rustup.rs -sSf | sh
git clone https://github.com/intel/tbtools
restart you ssh session
cd tbtools
cargo install --path .
I followed this runbook gen by AI and no issue so far (i did it today but smells good :))
Thank you @Randymartin1991 for the confirm :) Works like a charm
Prerequisites (blocking)
ceph -s→ HEALTH_OK, all PGs active+cleanping -c2 10.0.0.81/.82/.83OKcp /etc/pve/ceph.conf /root/ceph.conf.pre-tentacle-$(date +%F)on one nodeGlobal commands (once, from any node)
At the end:
ceph osd unset noout.Phase 0 — Tentacle repo on all 3 nodes
On pve01, pve02, pve03 (SSH as root):
Do not mix Squid and Tentacle packages on the same node after
apt upgrade.Phase 1 — Package upgrade + service restarts (one node at a time)
Recommended order:
pve01→pve02→pve03(active mgr on pve03 last).For each node:
1.1 Packages
1.2 Monitors (one per node hosting a mon)
Wait for 3/3 quorum before the next node.
Check progress (from any node):
1.3 Managers (after all mons are on 20.2)
When all mons have been restarted at least once:
1.4 OSD (one node at a time — critical with 1 OSD per node)
systemctl restart ceph-osd.target watch -n5 'ceph -s; ceph osd tree | grep -E "down|up"'Wait for HEALTH_OK or HEALTH_WARN with only
nooutbefore the next node.Verify each OSD version before moving on:
Do not run
ceph osd require-osd-release tentaclewhile any OSD is still on Squid.During upgrade — expected states
HEALTH_WARN+noout flag(s) setnooutis set96 active+clean+1–2 active+clean+scrubbing+deepceph versionsshows Squid on some osd, Tentacle on othersdegraded/recoveringstuckPhase 2 — CephFS
ISOs-Templates(MDS)max_mdsis already 1 → noceph fs set … max_mds 1needed.On nodes without the active MDS (standby only), stop MDS:
systemctl stop ceph-mds.target # only if this node is not hosting active rank 0Verify:
ceph status # 1 active MDS for ISOs-Templates ceph fs status ISOs-TemplatesOn the node running the active MDS (rank 0):
Then on the other nodes:
Phase 3 — Finalize Tentacle
When
ceph versionsshows no Squid left:Post-upgrade checks
Functional test: start a VM on
vm-disks, accessISOs-Templatesfrom the PVE UI.Optional performance baseline (quiet window):
Per-node validation:
Rollback
No official downgrade from Tentacle back to Squid after
ceph osd require-osd-release tentacle.Before that command: you can restore
ceph.sources(squid) + 19.2 packages only if all daemons have not been migrated yet (rare).Quick troubleshooting
peering/recoveringfor a long timenoout, watchceph -s; do not move to next nodesystemctl status ceph-mon@*.service,journalctl -u ceph-mon@pve01max_mds; checkceph fs status/ MDS wikiip route | grep 10.0.0; fix FRR / TB interfaces before continuingceph-osd.targeton remaining node(s); re-checkceph tell osd.N version