juju service names limited to 66 characters

Bug #1613491 reported by Michael Nelson on 2016-08-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju
Medium
Unassigned
juju-core
Undecided
Unassigned
1.25
Undecided
Unassigned

Bug Description

I was seeing the following error when deploying a service: http://paste.ubuntu.com/23057586/

Turns out, on testing, the issues is that socket_nix.go uses the service name for the socket name, which limits the length of service names to 66 chars (if no more than 9 units are deployed):

$ cat test-net.go
package main

import "fmt"
import "net"

func main() {
    fmt.Println("Hello, 世界")
    _, err := net.Listen("unix", "@/var/lib/juju/agents/unit-1234-67890-2345678-012345-7890123456789012345678901234567890123456-8/agent.socket")

    if err != nil {
        fmt.Println("There was an error: ", err)
    }
}

$ go run test-net.go
Hello, 世界
There was an error: listen unix @/var/lib/juju/agents/unit-1234-67890-2345678-012345-7890123456789012345678901234567890123456-8/agent.socket: bind: invalid argument

Anything shorter is fine.

Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.0.0
Anastasia (anastasia-macmood) wrote :

There is a workaround.

Changed in juju-core:
importance: High → Medium
affects: juju-core → juju
Changed in juju:
milestone: 2.0.0 → none
milestone: none → 2.0.0
Changed in juju-core:
status: New → Won't Fix
Curtis Hovey (sinzui) on 2016-10-06
Changed in juju:
milestone: 2.0.0 → 2.0.1
Curtis Hovey (sinzui) on 2016-10-28
Changed in juju:
milestone: 2.0.1 → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers