Juju lets you setup a name with to much characters and it will fail later.
Steeps to reproduce
juju deploy mongodb-k8s a123456789012345678901234567890123456789012345678901234567890
juju status
juju debug logs:
controller-0: 15:13:24 INFO juju.worker.caasapplicationprovisioner.runner start "a123456789012345678901234567890123456789012345678901234567890"
controller-0: 15:13:25 INFO juju.worker.caasapplicationprovisioner.runner stopped "a123456789012345678901234567890123456789012345678901234567890", err: ensuring application "a123456789012345678901234567890123456789012345678901234567890": creating or updating headless service for "stateful" "a123456789012345678901234567890123456789012345678901234567890": Service "a123456789012345678901234567890123456789012345678901234567890-endpoints" is invalid: metadata.name: Invalid value: "a123456789012345678901234567890123456789012345678901234567890-endpoints": must be no more than 63 characters
controller-0: 15:13:25 ERROR juju.worker.caasapplicationprovisioner.runner exited "a123456789012345678901234567890123456789012345678901234567890": ensuring application "a123456789012345678901234567890123456789012345678901234567890": creating or updating headless service for "stateful" "a123456789012345678901234567890123456789012345678901234567890": Service "a123456789012345678901234567890123456789012345678901234567890-endpoints" is invalid: metadata.name: Invalid value: "a123456789012345678901234567890123456789012345678901234567890-endpoints": must be no more than 63 characters
controller-0: 15:13:25 INFO juju.worker.caasapplicationprovisioner.runner restarting "a123456789012345678901234567890123456789012345678901234567890" in 3s
juju status output
Model Controller Cloud/Region Version SLA Timestamp
testmongo osm-vca microk8s/localhost 2.9.17 unsupported 15:06:00Z
panic: parsing number 123456789012345678901234567890123456789012345678901234567890: strconv.Atoi: parsing "123456789012345678901234567890123456789012345678901234567890": value out of range
goroutine 1 [running]:
github.com/juju/naturalsort.splitAtNumber({0xc0005ff2c0, 0x3d})
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/vendor/github.com/juju/naturalsort/naturalsort.go:74 +0x1b4
github.com/juju/naturalsort.naturally.Less({0xc000165680?, 0x44d414?, 0x40?}, 0x3cc0060?, 0xc000785001?)
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/vendor/github.com/juju/naturalsort/naturalsort.go:45 +0x89
sort.insertionSort({0x4f2c698, 0xc00053dd40}, 0x0, 0x3)
/snap/go/9848/src/sort/sort.go:40 +0xb1
sort.quickSort({0x4f2c698, 0xc00053dd40}, 0x18?, 0x3daaa40?, 0xc000785001?)
/snap/go/9848/src/sort/sort.go:222 +0x171
sort.Sort({0x4f2c698, 0xc00053dd40})
/snap/go/9848/src/sort/sort.go:231 +0x53
github.com/juju/naturalsort.Sort(...)
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/vendor/github.com/juju/naturalsort/naturalsort.go:15
github.com/juju/juju/cmd/juju/status.printApplications(_, {{{0xc0009d9eb0, 0x9}, {0xc0009d9ebc, 0x4}, {0xc0006edf40, 0x7}, {0xc0009d9ec6, 0x8}, {0xc0009d9ed0, ...}, ...}, ...})
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/juju/status/output_tabular.go:141 +0x3d7
github.com/juju/juju/cmd/juju/status.FormatTabular({0x4ef94e0, 0xc00000e018}, 0x0, {0x454fa20?, 0xc000559ce0?})
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/juju/status/output_tabular.go:88 +0xa25
github.com/juju/juju/cmd/juju/status.(*statusCommand).FormatTabular(0x203000?, {0x4ef94e0?, 0xc00000e018?}, {0x454fa20?, 0xc000559ce0?})
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/juju/status/status.go:430 +0x3c
github.com/juju/cmd/v3.(*Output).writeFormatter(0x407e660?, 0xc000512840, 0x4736665?, {0x454fa20?, 0xc000559ce0?}, 0x1)
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/vendor/github.com/juju/cmd/v3/output.go:213 +0x123
github.com/juju/cmd/v3.(*Output).Write(0xc0006b76c8, 0x9?, {0x454fa20, 0xc000559ce0})
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/vendor/github.com/juju/cmd/v3/output.go:188 +0xa5
github.com/juju/juju/cmd/juju/status.(*statusCommand).runStatus(0xc0006b7600, 0xc000512840)
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/juju/status/status.go:371 +0x730
github.com/juju/juju/cmd/juju/status.(*statusCommand).Run(0xc0006b7600, 0x4f4f701?)
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/juju/status/status.go:410 +0xbd
github.com/juju/juju/cmd/modelcmd.(*modelCommandWrapper).Run(0xc0005dc840, 0xc0009835e0?)
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/modelcmd/modelcommand.go:652 +0x123
github.com/juju/juju/cmd/modelcmd.(*baseCommandWrapper).Run(0xc0001eb6b0, 0x400000007?)
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/modelcmd/base.go:551 +0xaf
github.com/juju/cmd/v3.(*SuperCommand).Run(0xc0002c4640, 0xc000512840)
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/vendor/github.com/juju/cmd/v3/supercommand.go:523 +0x371
github.com/juju/cmd/v3.Main({0x4f36948, 0xc0002c4640}, 0xc000512840, {0xc0000bdf50, 0x1, 0x1})
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/vendor/github.com/juju/cmd/v3/cmd.go:397 +0x24b
github.com/juju/juju/cmd/juju/commands.jujuMain.Run({0xc000084180?}, {0xc00006e040, 0x2, 0x2})
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/juju/commands/main.go:199 +0x80f
github.com/juju/juju/cmd/juju/commands.Main(...)
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/juju/commands/main.go:122
main.main()
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/juju/main.go:27 +0x72
This Medium-priority bug has not been updated in 60 days, so we're marking it Low importance. If you believe this is incorrect, please update the importance.