Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions ic-os/components/hostos/misc/limited-console
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ show_menu() {
echo " service-status - Show service status (usage: service-status <service-name>)"
echo " view-logs - View service logs (usage: view-logs <service-name>)"
echo " config-json - Show /boot/config/config.json"
echo " guestos-console-logs - Show GuestOS Serial Console Logs"
echo " network-config-settings - Show network settings from config"
echo " network-interfaces - Show network interface status"
echo " ip-addresses - Show all IP addresses"
echo " ping-gateway - Test connectivity to IPv6 gateway"
echo " routes - Show routing table"
echo " manual-recovery - Manual node recovery (ONLY FOR EMERGENCY USE)"
echo " rbash-console - Drop into restricted bash console"
echo " clear - Clear the console"
Expand Down Expand Up @@ -68,6 +73,14 @@ execute_command() {
PATH="$RESTRICTED_PATH" \
/usr/bin/less /boot/config/config.json
;;
"guestos-console-logs")
echo "=== GuestOS Serial Console Logs ==="
env -i \
TERM="$TERM" \
LESSSECURE=1 \
PATH="$RESTRICTED_PATH" \
/usr/bin/less -f /var/log/libvirt/qemu/guestos-serial.log
;;
"network-config-settings")
echo "=== Network Settings from Config ==="
local network_settings=$(get_config_value '.network_settings' 2>/dev/null)
Expand All @@ -77,6 +90,35 @@ execute_command() {
echo "No network settings found in config"
fi
;;
"network-interfaces")
echo "=== Network Interface Status ==="
/bin/ip link show
;;
"ip-addresses")
echo "=== IP Addresses ==="
/bin/ip addr show
;;
"ping-gateway")
echo "=== Testing IPv6 Gateway Connectivity ==="
local gateway=$(/bin/ip -6 route show | awk '/^default/ {print $3}' | head -1)
if [ -n "$gateway" ]; then
echo "Gateway: $gateway"
echo ""
/bin/ping6 -c 4 "$gateway" 2>&1
else
echo "No IPv6 gateway found in routing table"
echo "IPv6 routes:"
/bin/ip -6 route show
fi
;;
"routes")
echo "=== Routing Table ==="
echo "IPv4 routes:"
/bin/ip -4 route show
echo ""
echo "IPv6 routes:"
/bin/ip -6 route show
;;
"manual-recovery")
echo "=== Manual Node Recovery ==="
echo "This will perform a manual node recovery. Do not attempt this unless you are certain it is appropriate."
Expand Down
2 changes: 2 additions & 0 deletions ic-os/hostos/context/packages.common
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ jq
less
lvm2
net-tools
netcat-openbsd
nftables
traceroute
# NODE-1718: Parted has a conflict with the new libvirt, install it below
# parted
python-is-python3
Expand Down
1 change: 0 additions & 1 deletion ic-os/hostos/context/packages.dev
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ nano
# packages requested by networking
tcpdump
iperf
netcat-openbsd
curl
iputils-ping

Expand Down
Loading