Incorrect user facing error messaging

Bug #1814395 reported by james beedy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Anastasia

Bug Description

The controller admin adds the user 'bdx' to the controller, 'bdx' runs the register command, by default the 'bdx' user gets 'login' privileges on the controller.

The following is being ran as the 'bdx' user.

$ juju add-cloud
Cloud Types
  lxd
  maas
  manual
  openstack
  vsphere

Select cloud type: maas

Enter a name for your maas cloud: pdl-maas

Enter the API endpoint url: http://10.10.0.100:5240/MAAS/

Cloud "pdl-maas" successfully added

You will need to add credentials for this cloud (`juju add-credential pdl-maas`)
before creating a controller (`juju bootstrap pdl-maas`).

$ juju users
Controller: pdl-maas

Name Display name Access Date created Last connection
bdx* bdx login 2019-02-01 just now

FRICTION POINT 1:

$ juju add-model mymodel
ERROR cloud "pdl-maas" not found

This^ is one place where the user facing messaging does not help the user. The user just added the cloud 'pdl-maas', why is juju telling the user the cloud cannot be found? Possibly the messaging here could be something to the affect of "Cloud 'pdl-maas' found, you need a controller admin to grant you 'superuser' privileges in order to add a model."

At this point the controller admin grants the 'bdx' user 'superuser' privileges on the controller.

FRICTION POINT 2:

$ juju add-model mymodel
ERROR detecting credentials for "pdl-maas" cloud provider: maas credentials not found.

This^ messaging seems accurate, but is not helpful. In the light of "this is what you should do to remedy this issue that is happening", the user only get an error message, not a direction for what to do to move forward.

At this point user 'bdx' adds credential for cloud 'pdl-maas'.

$ juju add-credential pdl-maas
Enter credential name: bdx

Using auth-type "oauth1".

Enter maas-oauth:

Credential "bdx" added locally for cloud "pdl-maas".

$ juju credentials
Cloud Credentials
pdl-maas bdx

FRICTION POINT 3:

$ juju add-model mymodel
ERROR getting credential: cloud credential "pdl-maas/bdx/bdx" not found (not found)

$ juju show-credential pdl-maas bdx
cloud credential "pdl-maas/bdx/bdx" not found
controller-credentials: {}

These last two messages are confusing because user 'bdx' just added the credential 'bdx' for the cloud 'pdl-maas'.

james beedy (jamesbeedy)
description: updated
description: updated
Revision history for this message
Ian Booth (wallyworld) wrote :

The add-cloud and add-credential commands currently only operate on the local Juju client's internal YAML files. They are intended to set up the Juju client so that a *new* controller can be bootstrapped from scratch with a new cloud. These commands do not affect any running controller.

You are trying to use the commands to do something that they are not designed to do, nor is supported - add a different, new cloud to a running controller.

The error messages are indeed less than helpful. This is an area that is flagged for improvement.

Note also - Juju will be gaining the ability to support multi-cloud controllers but it's not there yet.

Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.5.2
importance: Undecided → High
status: New → Triaged
Changed in juju:
milestone: 2.5.2 → 2.5.3
Changed in juju:
milestone: 2.5.3 → 2.5.4
Changed in juju:
milestone: 2.5.4 → 2.5.5
Changed in juju:
milestone: 2.5.6 → 2.5.8
Revision history for this message
Anastasia (anastasia-macmood) wrote :

I have numbered your commands and updated description to be able to refer to them.

FRICTION POINT 1: From 2.6, when user tries to add model, we tell them that they need to get additional grants from controller admin:

$ juju add-model trial
ERROR you do not have add-model access to any clouds on this controller.
Please ask the controller administrator to grant you add-model permission
for a particular cloud to which you want to add a model.

description: updated
Revision history for this message
Anastasia (anastasia-macmood) wrote :

FRICTION POINT 2:

This is caused by 'add-credential' only adding a credential to user bdx's local client, i.e. remotely, on the controller there is still no credential for the user. This will be rectified once we change add-credential to also essentially uploading credential to a controller. This is a coming work in 2.7.

FRICTION POINT 3:

When you were issuing 'show-credential', you were querying what credentials are there remotely, on the controller. It's in the works to update 'show-credential' command to work on local credentials too but it is not going to happen until 2.7. Meanwhile this command will not show you local credentials added via 'add-credential'.

Changed in juju:
milestone: 2.5.8 → 2.7-beta1
assignee: nobody → Anastasia (anastasia-macmood)
status: Triaged → In Progress
tags: added: add-credential credenitals show-credential
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Solution for FP3, 'show-credential' now caters fro both local and remote credentials: https://github.com/juju/juju/pull/10426

Revision history for this message
Anastasia (anastasia-macmood) wrote :

Solution for FP2, uploading credential to a controller on 'add-credential': https://github.com/juju/juju/pull/10447

Changed in juju:
status: In Progress → Fix Committed
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.

Other bug subscribers

Remote bug watches

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