show-status shows stale "since" when a machine is "down"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
In the process of writing a CI script, I took a machine down. When juju noticed it was "down", the "current" field was updated, but not the "since" field.
An inaccurate "since" field means that we cannot use it as input for scripting.
$ juju status --format 'json'|jq '.machines|
{
"current": "started",
"since": "20 Mar 2017 10:37:46-04:00",
"version": "2.1.1"
}
$ juju run --machine 0 "sudo iptables-save > \$HOME/iptables; echo \"iptables-restore < \$HOME/iptables\"| sudo at now + 6 minutes; echo \"iptables --flush; iptables -P FORWARD DROP; iptables -P OUTPUT DROP; iptables -P INPUT DROP\"| sudo at now + 1 minutes"
warning: commands will be executed using /bin/sh
job 1 at Mon Mar 20 15:45:00 2017
warning: commands will be executed using /bin/sh
job 2 at Mon Mar 20 15:40:00 2017
# Wait until machine is down...
$ juju status --format 'json'|jq '.machines|
{
"current": "down",
"message": "agent is not communicating with the server",
"since": "20 Mar 2017 10:37:46-04:00",
"version": "2.1.1"
}
tags: | added: status-time |
This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.