Comment 7 for bug 1427770

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1427770] Re: opened-ports doesn't include ports opened by other charms

The ultimate effect is that we would cause a firewall rule to be written
that would include the port that you have specified.
I do believe the reason to force conflict is to assist charms in
understanding that there is something else that is already using that port.
As far as I understand, a charm that chooses to catch the error from
open-port is certainly allowed to do so. I don't believe we immediately
fail the hook, it is just that most charms do so. (The charm *could* be
written to treat open-port failing as a non-fatal error.)

We have talked internally about extending open-port to be more of a
"suggested port[s]" such that if the desired one isn't available, you give
a way for Juju to inform the charm to fall back to another suitable port.
I do believe that today a charm could ask to open a port, see the error,
then try a different port if it wanted to, and could then host the
application at that new port.

On Wed, Mar 28, 2018 at 11:56 PM, Peter Sabaini <<email address hidden>
> wrote:

> @jam -- I also wonder what the semantics of open-port here are. The
> charm is registering a port for use - but has it to be exclusive, eg.
> with proto=icmp?
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1427770
>
> Title:
> opened-ports doesn't include ports opened by other charms
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1427770/+subscriptions
>