I bootstrapped a fresh 2.8.9 controller and added a model. I first upgraded the controller to 2.9.42 without issue.
The log messages show that the agent URL does get filled out correctly
machine-0: 13:41:36 INFO juju.worker.upgrader desired agent binary version: 2.9.42 machine-0: 13:41:36 INFO juju.worker.upgrader upgrade requested from 2.8.9 to 2.9.42 machine-0: 13:41:40 INFO juju.worker.upgrader fetching agent binaries from "https://172.31.10.75:17070/model/16d86a06-931d-421f-89dc-d0096f922e38/tools/2.9.42-bionic-amd64" machine-0: 13:41:40 INFO juju.apiserver 2.9.42-bionic-amd64 agent binaries not found locally, fetching machine-0: 13:41:42 INFO juju.apiserver fetching 2.9.42-bionic-amd64 agent binaries from https://juju-dist-aws.s3.amazonaws.com/agents/agent/2.9.42/juju-2.9.42-linux-amd64.tgz
Then I upgraded the model without issue.
I am not sure what's wrong with your controller. Is there anything of interest in any of the controller or model logs?
I bootstrapped a fresh 2.8.9 controller and added a model.
I first upgraded the controller to 2.9.42 without issue.
The log messages show that the agent URL does get filled out correctly
machine-0: 13:41:36 INFO juju.worker. upgrader desired agent binary version: 2.9.42 upgrader upgrade requested from 2.8.9 to 2.9.42 upgrader fetching agent binaries from "https:/ /172.31. 10.75:17070/ model/16d86a06- 931d-421f- 89dc-d0096f922e 38/tools/ 2.9.42- bionic- amd64" /juju-dist- aws.s3. amazonaws. com/agents/ agent/2. 9.42/juju- 2.9.42- linux-amd64. tgz
machine-0: 13:41:36 INFO juju.worker.
machine-0: 13:41:40 INFO juju.worker.
machine-0: 13:41:40 INFO juju.apiserver 2.9.42-bionic-amd64 agent binaries not found locally, fetching
machine-0: 13:41:42 INFO juju.apiserver fetching 2.9.42-bionic-amd64 agent binaries from https:/
Then I upgraded the model without issue.
I am not sure what's wrong with your controller. Is there anything of interest in any of the controller or model logs?