Comment 15 for bug 1517632

This problem occurs when the distro-info on the client running the upgrade-juju command is backlevel compared with that of the state server. The state server will send back a list of tools that includes series that the client doesn't know about.

This will cause the unmarshal code to fail in the rpc layer, which causes the connection to shutdown. At this point, the client cannot request the upgrade as the connection has died.

This problem manifests in two ways:
1 - When uploading tools with upgrade-juju, you will see the connection is shut down error.
2 - When running upgrade-juju without upload-tools, the upgrade will fail with "no matching tools available", even if there are matching tools available in the agent-stream.

The workaround for this issue is to update the distro-info on the client running the upgrade command (the distro-info-data package)