Skip to content

Subdomain bug persists #200

@eberrigan

Description

@eberrigan

The problem is on main.tf:226. When custom_subdomain is an empty string "", the FQDN becomes:
fqdn = "${local.subdomain}.${local.dns_domain}"
= "${""}.${lablink.sleap.ai}"
= ".lablink.sleap.ai"
The logic needs to handle the case where custom_subdomain is empty and should just use the domain without a subdomain. Let me fix this:
Edit c:\repos\sleap-lablink\lablink-infrastructure\main.tf

Added 2 lines
12
1234
Perfect! The fix is now in place. The logic now checks if subdomain is not empty before adding it to the FQDN:
If custom_subdomain = "" → FQDN = lablink.sleap.ai ✅
If custom_subdomain = "test" → FQDN = test.lablink.sleap.ai ✅
The issue was that when custom_subdomain was set to an empty string in config.yaml:46, Terraform was creating the FQDN as .lablink.sleap.ai (with a leading dot) instead of just lablink.sleap.ai.

It is related to this allocator url that is passed to the client via the env (ALLOCATOR_URL is the main culprit) and this needs to be ironed out

2025-10-06 15:54:01 - lablink_allocator_service.main - ERROR - VM with log stream lablink-vm-test-1 does not exist.
2025-10-06 15:54:01 - werkzeug - INFO - 172.17.0.1 - - [06/Oct/2025 15:54:01] "POST /api/vm-logs HTTP/1.1" 404 -
2025-10-06 15:54:01 - werkzeug - INFO - 172.17.0.1 - - [06/Oct/2025 15:54:01] "GET /api/vm-status HTTP/1.1" 404 -
2025-10-06 15:54:06 - werkzeug - INFO - 172.17.0.1 - - [06/Oct/2025 15:54:06] "GET /api/vm-status HTTP/1.1" 404 -
2025-10-06 15:54:11 - werkzeug - INFO - 172.17.0.1 - - [06/Oct/2025 15:54:11] "GET /api/vm-status HTTP/1.1" 404 -
2025-10-06 15:54:16 - werkzeug - INFO - 172.17.0.1 - - [06/Oct/2025 15:54:16] "GET /api/vm-status HTTP/1.1" 404 -
2025-10-06 15:54:21 - werkzeug - INFO - 172.17.0.1 - - [06/Oct/2025 15:54:21] "GET /api/vm-status HTTP/1.1" 404 -
subscribe[DEBUG]: Allocator URL from env: http://test.lablink.sleap.ai
subscribe[DEBUG]: URL: http://test.lablink.sleap.ai/vm_startup
subscribe[DEBUG]: Hostname: lablink-vm-test-1

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