weixin_39725594 2020-11-29 13:32
浏览 0

Credential validity visibility on model status.

Description of change

Occasionally, cloud credentials used by the model become invalid. This PR allows user to find out that this happened via 'juju models' or 'juju status'. We now will tell the user that a model is suspended due to the credential being invalid. Once credential becomes valid again, the model status is reverted to whatever it was beforehand.

Model credential can become valid again if it is either updated with a new content or a different, new credential is set for the model.

QA steps

  1. bootstrap
  2. add a model with a different credential [at this stage, juju output would look similar to this]

$ juju models
Controller: mycontroller

Model       Cloud/Region   Type  Status     Machines  Cores  Access  Last connection
controller  aws/us-east-1  ec2   available         1      4  admin   just now
default     aws/us-east-1  ec2   available         0      -  admin   12 minutes ago
trial*      aws/us-east-1  ec2   available         0      -  admin   never connected

$ juju status
Model  Controller    Cloud/Region   Version  SLA          Timestamp
trial  mycontroller  aws/us-east-1  2.6.3.1  unsupported  17:01:53+10:00

Model "admin/trial" is empty.
  1. disable second credential and try to deploy something on the model [at this stage, juju output will change to something like this]

$ juju models
Controller: mycontroller

Model       Cloud/Region   Type  Status     Machines  Cores  Access  Last connection
controller  aws/us-east-1  ec2   available         1      4  admin   just now
default     aws/us-east-1  ec2   available         0      -  admin   6 minutes ago
trial*      aws/us-east-1  ec2   suspended         0      -  admin   8 seconds ago

$ juju status
Model  Controller    Cloud/Region   Version  SLA          Timestamp       Notes
trial  mycontroller  aws/us-east-1  2.6.3.1  unsupported  17:00:31+10:00  suspended since cloud credential is not valid

Model "admin/trial" is empty.
  1. re-enabling credential reverts model status and message to the original [shown in 2.]

Bug reference

https://bugs.launchpad.net/juju/+bug/1822117

该提问来源于开源项目:juju/juju

  • 写回答

8条回答 默认 最新

  • weixin_39725594 2020-11-29 13:32
    关注
    评论

报告相同问题?