Comment 2 for bug 1684718

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1684718] Re: 'juju status MACHINE" fails if any unit is not assigned to a machine

As mentioned, it was a case of running status in one window, and then doing
"juju add-unit --to X" where X isn't actually a machine in our model. I'm
guessing we are also running into an issue with creating a unit before
verifying its placement directives.
I think we also can hit this if you are deploying a lot (say for testing)
and then run status in another window. I've seen something like this when
doing big deploys and trying to do:
 juju status error

Trying to see if anything comes up broken.

Thanks for the fix

On Wed, May 23, 2018 at 5:57 AM, Anastasia <email address hidden>
wrote:

> I am not sure how often this scenario occurs in reality :) I had to
> manipulate state directly to un-assign unit from a machine to properly
> test the fix.
>
> However, the reason why there was a failure is because one of the checks
> we run when filtering is whether any of the open ports on a machine for
> a unit match. Of course, when the unit is not assigned to a machine the
> check failed saying that we could not figure out unit's machine. I have
> changed the logic to treat the case of an unassigned unit as a non-match
> instead of erring out.
>
> This is the fix against 2.3: https://github.com/juju/juju/pull/8744
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1684718
>
> Title:
> 'juju status MACHINE" fails if any unit is not assigned to a machine
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1684718/+subscriptions
>