For future reference, the code that sets the port number to -1 is in the uniter worker[1].
[1]: https://github.com/juju/juju/blob/a68ef5294581cffc85a74ea23cd03b7ad1e00e17/worker/uniter/runner/jujuc/ports.go#L37
For future reference, the code that sets the port number to -1 is in the uniter worker[1].
[1]: https:/ /github. com/juju/ juju/blob/ a68ef5294581cff c85a74ea23cd03b 7ad1e00e17/ worker/ uniter/ runner/ jujuc/ports. go#L37