Skip to content

πŸ› Bug Report: create_lxc.sh reports "No Network!" incorrectly with static IP + /17 subnet + conf variable issues (OpenWebUI)Β #5033

@akira69

Description

@akira69

βœ… Have you read and understood the above guidelines?

yes

πŸ“œ What is the name of the script you are using?

OpenWebUI

πŸ“‚ What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/openwebui.sh)"

βš™οΈ What settings are you using?

  • Default Settings
  • Advanced Settings

πŸ–₯️ Which Linux distribution are you using?

Debian 12

πŸ“ Provide a clear and concise description of the issue.

Using the latest create_lxc.sh from https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/create_lxc.sh (after fixing URL), I ran into many many issues

πŸ”„ Steps to reproduce the issue.

πŸ› Bug Report: create_lxc.sh reports "No Network!" incorrectly with static IP + /17 subnet + conf variable issues

Summary

Using the latest create_lxc.sh from https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/create_lxc.sh (after fixing URL), I ran into these issues:

1️⃣ False "No Network!" message when using static IP + /17 CIDR

My .conf specifies:

NET="192.168.10.10/17"
GATE="192.168.1.1"

The container comes up with full network:

ping 8.8.8.8 works
ping google.com works
routing correct
But the script falsely reports:

βœ–οΈ No Network!

2️⃣ SPINNER_PID unbound variable crash

After "No Network!", script aborts with:

/opt/community-scripts/build.func: line 74: SPINNER_PID: unbound variable

Fix for SPINNER_PID:

Change all lines like this:

if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi
to:

if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi
This avoids errors when SPINNER_PID is not yet set.

3️⃣ Root cause of "No Network!": network check logic too strict

The current network check (likely in build.func or create_lxc.sh) assumes:

/24 subnet
default gateway via 192.168.1.1 is reachable by route lookup
assumes onlink behavior may cause false negatives
In my case:

ip a:
192.168.0.0/17 dev eth0 proto kernel scope link src 192.168.10.10

ip route:
default via 192.168.1.1 dev eth0 onlink

Full internet access works perfectly, but script misdetects it.

Proposed solution:

Use simple ping test to public IP (e.g. ping -c1 8.8.8.8) instead of over-complicated route parsing
Accept non-/24 subnets and onlink default routes

4️⃣ Config variable inconsistencies

Several .conf files use variable names that do not match the current create_lxc.sh and build.func expectations:

.conf Variable Script Expectation Suggested Standard
VERB VERBOSE VERBOSE
GATE Gateway handling GATEWAY
SD Storage STORAGE
NS DNS DNS_SERVER
NET Static IP+CIDR IP_CIDR

Proposal: Please update both the scripts and example .conf files to use consistent, well-documented variable names.
Also make network check logic more robust (see prior point) for static IPs and non-/24 CIDRs.

Conclusion

βœ… Great scripts β€” very useful!
🐞 But they currently break in real-world networks with:

static IP + non-/24 subnet
onlink gateway
.conf variable mismatches
SPINNER_PID crash
Actionable suggestions:

Fix SPINNER_PID logic (see above)
Replace current "No Network!" check with simple reliable test (e.g. ping -c1 8.8.8.8)
Standardize variable names between .conf and create_lxc.sh
Accept non-/24 subnets and onlink gateway routes

Thanks for maintaining this excellent project β€” happy to help test fixes or submit PR if wanted!

❌ Paste the full error output (if available).

is all above

πŸ–ΌοΈ Additional context (optional).

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions