Juju recommends incorrect command for enabling operation

Bug #1960942 reported by Garrett Neugent
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Unassigned

Bug Description

Hello, while testing out the disable-command functionality, I found that Juju will sometimes recommend an incorrect action to enable a command:

$ juju disabled-commands
Disabled commands Message
all
$ juju remove-unit ubuntu/0
ERROR the operation has been blocked (operation is blocked)

All operations that remove machines, applications, units or
relations have been disabled for the current model.
To enable removal, run

    juju enable-command remove-object
$ juju enable-command remove-object
$ juju remove-unit ubuntu/0
ERROR the operation has been blocked (operation is blocked)

All operations that remove machines, applications, units or
relations have been disabled for the current model.
To enable removal, run

    juju enable-command remove-object

I'll create a separate bug for the granular control, but for this, I believe Juju's recommendation shouldn't suggest remove-object, because it's blocked by the "all" option. Additionally, if the enable-command doesn't work as expect, Juju should surface that to the operator.

Thanks for your time!

Revision history for this message
Ian Booth (wallyworld) wrote :

I think this and bug 1960943 could possibly be combined into the one issue.

Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.9.28
importance: Undecided → High
status: New → Triaged
Changed in juju:
milestone: 2.9.28 → 2.9.29
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1960942] Re: Juju recommends incorrect command for enabling operation

Note that 'remove-object' is meant to be the explicit 'remove-application'
or 'remove-unit' that you are trying to run. (It is somewhat hinted at by
the message, saying that it could be "application", "unit", or "machine".
We could certainly consider rewording it, making it clearer that it isn't
explicitly 'object' that you are supposed to be typing.

On Wed, Mar 30, 2022 at 9:32 AM Canonical Juju QA Bot <
<email address hidden>> wrote:

> ** Changed in: juju
> Milestone: 2.9.28 => 2.9.29
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1960942
>
> Title:
> Juju recommends incorrect command for enabling operation
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1960942/+subscriptions
>
>

Revision history for this message
John A Meinel (jameinel) wrote :

It seems I'm just wrong here, it really is `remove-object`.

On Wed, Mar 30, 2022 at 10:05 AM John Meinel <email address hidden> wrote:

> Note that 'remove-object' is meant to be the explicit 'remove-application'
> or 'remove-unit' that you are trying to run. (It is somewhat hinted at by
> the message, saying that it could be "application", "unit", or "machine".
> We could certainly consider rewording it, making it clearer that it isn't
> explicitly 'object' that you are supposed to be typing.
>
>
> On Wed, Mar 30, 2022 at 9:32 AM Canonical Juju QA Bot <
> <email address hidden>> wrote:
>
>> ** Changed in: juju
>> Milestone: 2.9.28 => 2.9.29
>>
>> --
>> You received this bug notification because you are subscribed to juju.
>> Matching subscriptions: juju bugs
>> https://bugs.launchpad.net/bugs/1960942
>>
>> Title:
>> Juju recommends incorrect command for enabling operation
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/juju/+bug/1960942/+subscriptions
>>
>>

Changed in juju:
milestone: 2.9.29 → 2.9.30
Ian Booth (wallyworld)
Changed in juju:
milestone: 2.9.30 → 2.9.31
John A Meinel (jameinel)
Changed in juju:
milestone: 2.9.31 → none
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.