`Model "admin/prod-archive-servers" is empty.` STDERR

Bug #2038424 reported by Haw Loeung
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Wishlist
Unassigned

Bug Description

Hi,

When a new model is created, the `Model ... is empty` is output to STDERR. This causes unnecessary cron spam with our tooling. It's not really an error so shouldn't be outputting to STDERR:

| $ juju status > /dev/null
| Model "admin/prod-archive-servers" is empty.

We could redirect STDERR to /dev/null too but then that would likely cause us to miss real errors.

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 2038424] [NEW] `Model "admin/prod-archive-servers" is empty.` STDERR

All of our logging and informative messages are sent to STDERR, when they
aren't part of the content of the message. 'status' has a very specific
output, and is often going to be parsed by other tooling (especially juju
status --format json/yaml). So it isn't used strictly for error messages.
(progress bars, etc also go there when a progress is appropriate.)

That said, tabular output is saying "Model ... is empty" as the actual
content of the model, and I'd agree that this particular message should be
the body of the output.

Note that we shouldn't output that value for `juju status --format=yaml` or
`juju status --format=json`. Currently those are also outputting it on
stderr:
$ juju status --format yaml
model:
  name: test
  type: caas
  controller: mk8s
  cloud: microk8s
  region: localhost
  version: 3.1.5
  model-status:
    current: available
    since: 04 Oct 2023 10:19:42-04:00
  sla: unsupported
machines: {}
applications: {}
storage: {}
controller:
  timestamp: 10:19:53-04:00

Model "admin/test" is empty.

I think we can infer the emptiness from `applications: {}` and we don't
need the extra message (which is there as essentially "This Page is
Intentionally Blank")

On Wed, Oct 4, 2023 at 5:20 AM Haw Loeung <email address hidden>
wrote:

> Public bug reported:
>
> Hi,
>
> When a new model is created, the `Model ... is empty` is output to
> STDERR. This causes unnecessary cron spam with our tooling. It's not
> really an error so shouldn't be outputting to STDERR:
>
> | $ juju status > /dev/null
> | Model "admin/prod-archive-servers" is empty.
>
> We could redirect STDERR to /dev/null too but then that would likely
> cause us to miss real errors.
>
> ** Affects: juju
> Importance: Wishlist
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> Canonical Juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/2038424
>
> Title:
> `Model "admin/prod-archive-servers" is empty.` STDERR
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/2038424/+subscriptions
>
>

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

See my other comment for more information, but essentially "model ... is empty" should be an output of the tabular formatter,not the other formatters, and should be the body of the status, not an informative message.

Changed in juju:
status: New → Triaged
tags: added: bitesize status
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.