Unable to retrieve application status from non-leader units
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Invalid
|
High
|
Unassigned |
Bug Description
status-get has --application option which allows to retrieve application status and status of all units in that application.
There is, however, no way to retrieve the application status only (not the status of all units) from non-leader units. This seems strange considering there is a way to read leader data from non-leader units.
Usage: status-get [options] [--include-data] [--application]
# ...
Options:
--application (= false)
print status for all units of this application if this unit is the leader
root@juju-
False
root@juju-
ERROR finding application status: this unit is not the leader
juju run --unit apache-httpd/0 'status-get --application --include-data'
application-status:
message: httpd app is ready
status: active
status-data: {}
units:
apache-httpd/0:
message: httpd is ready
status: active
status-data: {}
apache-httpd/1:
message: httpd is ready
status: active
status-data: {}
description: | updated |
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 2.7.1 |
Changed in juju: | |
status: | Triaged → Invalid |
What is the use case for reading it? I want to watch out that it doesn't
become a mini peer relation that doesn't send notifications. Originally
there wasn't a status-get as it was meant to be a message for humans. We
added it so frameworks can see if a charm has set a status so the framework
doesn't clobber it.
What do non leader units need to read it for?
John
=:->
On Tue, Oct 29, 2019, 15:40 Dmitrii Shcherbakov <email address hidden>
wrote:
> Public bug reported: 382280- 1:/var/ lib/juju/ agents/ unit-apache- httpd-1/ charm# 382280- 1:/var/ lib/juju/ agents/ unit-apache- httpd-1/ charm# 382280- 1:/var/ lib/juju/ agents/ unit-apache- httpd-1/ charm# 382280- 1:/var/ lib/juju/ agents/ unit-apache- httpd-1/ charm# 382280- 1:/var/ lib/juju/ agents/ unit-apache- httpd-1/ charm#
>
> status-get has --application option which allows to retrieve application
> status and status of all units in that application.
>
> There is, however, no way to retrieve the application status only (not
> the status of all units) from non-leader units. This seems strange
> considering there is a way to read leader data from non-leader units.
>
> Usage: status-get [options] [--include-data] [--application]
> # ...
> Options:
> --application (= false)
> print status for all units of this application if this unit is the
> leader
>
> root@juju-
> is-leader
> False
>
> root@juju-
> status-get --application
> ERROR finding application status: this unit is not the leader
>
> juju run --unit apache-httpd/0 'status-get --application --include-data'
> application-status:
> message: httpd app is ready
> status: active
> status-data: {}
> units:
> apache-httpd/0:
> message: httpd is ready
> status: active
> status-data: {}
> apache-httpd/1:
> message: httpd is ready
> status: active
> status-data: {}
>
> ** Affects: juju
> Importance: Undecided
> Status: New
>
> ** Description changed:
>
> status-get has --application option which allows to retrieve application
> status and status of all units in that application.
>
> - There is, however, no way to retrieve application status from non-leader
> - units. This seems strange considering there is a way to read leader data
> - from non-leader units.
> + There is, however, no way to retrieve the application status only (not
> + the status of all units) from non-leader units. This seems strange
> + considering there is a way to read leader data from non-leader units.
>
> Usage: status-get [options] [--include-data] [--application]
> # ...
> Options:
> --application (= false)
> - print status for all units of this application if this unit is the
> leader
> + print status for all units of this application if this unit is the
> leader
>
> -
> - root@juju-
> is-leader
> + root@juju-
> is-leader
> False
>
> root@juju-
> status-get --application
> ERROR finding application status: this unit is not the leader
>
> -
> juju run --unit apache-httpd/0 'status-get --application --include-data'
> application-status:
> - message: httpd app is ready
> - status: active
> - status-data: {}
> - units:
> - apache-httpd/0:
> - message: httpd is ready
> - statu...