juju status bad error message on non-existent model

Bug #1804140 reported by Junien F
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Anastasia
2.4
Fix Released
Medium
Anastasia

Bug Description

Hi,

Using juju 2.4.5 as both controller and client, the following happens :

$ juju status -m non-existing-model
ERROR refreshing models: connection is shut down

Please display a more appropriate error message, thanks !

Tags: usability
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1804140] [NEW] juju status bad error message on non-existent model

I know Anastasia has been working in this area, and some of those fixes are
in more recent 2.4 series. This may have already been fixed.

On Tue, Nov 20, 2018 at 10:10 AM Junien Fridrick <email address hidden>
wrote:

> Public bug reported:
>
> Hi,
>
> Using juju 2.4.5 as both controller and client, the following happens :
>
> $ juju status -m non-existing-model
> ERROR refreshing models: connection is shut down
>
> Please display a more appropriate error message, thanks !
>
> ** Affects: juju
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1804140
>
> Title:
> juju status bad error message on non-existent model
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1804140/+subscriptions
>

Changed in juju:
assignee: nobody → Anastasia (anastasia-macmood)
status: New → Triaged
Changed in juju:
status: Triaged → In Progress
importance: Undecided → Medium
tags: added: usability
Revision history for this message
Anastasia (anastasia-macmood) wrote :

The problem is that we cache model api connection on the command.

This was not an issue until our commands started to re-try calls. As far as I know, 'status' is the only special case that falls into this category. All other Juju re-tries are server-side not client-side.

This means that after the first call was made and failed, we have closed the underlying api connection but were still trying to call the controller using this closed connection in subsequent re-tries. Hence, the user gets the 'connection already shut down' error instead of the original error.

The correct, proper fix should be for the command base not to cache api connection as there is no way of knowing what the implementing commands need from it nor do we know what they'd do with it.

I am pondering if I should remove this caching altogether and will seek advice on that from higher powers. However, meanwhile the fix for this specific instance is proposed.

PR against 2.4: https://github.com/juju/juju/pull/9520

Changed in juju:
milestone: none → 2.5-beta2
Revision history for this message
Anastasia (anastasia-macmood) wrote :
Changed in juju:
status: In Progress → Fix Committed
Ian Booth (wallyworld)
Changed in juju:
milestone: 2.5-beta2 → 2.5-beta3
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.