<div dir="ltr"><div>Hi everybody,</div><div><br></div><div>As far as I can see, there is no way to change a network space binding or add a new one after a charm has been deployed.</div><div><br></div><div>What I encountered is a situation where you either want to add a new endpoint (and bind it to a space) after a charm upgrade or modify an existing one. With the current approach this is not possible without a full redeployment of an application (remove-application -> deploy & bind -> add-unit).</div><div><br></div><div>However, for deployments with large uptime requirements this is not a feasible solution.</div><div><br></div><div>My view of the problem:</div><div><ul><li>Juju doesn't know how a charm code have used binding information during a deployment;</li><li>Juju can expose an event which should be handled in the charm code;</li><li>There is a distinction between "binding-changed" and "upgrade" events as the latter may include binding changes but needs a mechanism to learn which bindings have changed.</li></ul></div><div>--</div><div>Only the deployment-related code has handling of bindings:</div><div><a href="https://github.com/juju/juju/blob/master/cmd/juju/application/deploy.go#L615">https://github.com/juju/juju/blob/master/cmd/juju/application/deploy.go#L615<br></a></div><div><a href="https://github.com/juju/juju/blob/master/cmd/juju/application/deploy.go#L615">https://github.com/juju/juju/blob/staging/cmd/juju/application/bundle.go#L382<br></a></div><div><br></div><div>Nothing about bindings here:</div><div><a href="https://github.com/juju/juju/blob/master/cmd/juju/application/upgradecharm.go">https://github.com/juju/juju/blob/master/cmd/juju/application/upgradecharm.go</a></div><div>---</div><div><br></div><div>I realize that this is a complex feature and will require code on the charm side but I think it is important as it makes deployments less rigid and more update-friendly.</div><div><br></div><div>Has it been discussed before?</div><div><br></div><div>Any feedback is appreciated - thanks in advance.</div><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Best Regards,<div>Dmitrii Shcherbakov</div><div><br></div><div>Field Software Engineer</div><div><span style="font-size:12.8px;color:rgb(136,136,136)">IRC (freenode): Dmitrii-Sh</span><br></div></div></div></div></div></div></div>
</div>