report more OS details in JSON/YAML status
Bug #1762570 reported by
James Troup
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
Right now Juju status tells you just the OS name. It would be nice if
it also told you:
1) the version of the OS
2) (on Linux) the kernel version
As discussed elsewhere, tabular doesn't have the space for this, but
it could easily be added to the JSON/YAML status output.
(2) is easy to get on any Linux with 'uname -r'. (1) is probably best
done by grabbing VERSION or VERSION_ID out of /etc/os-release. I've
verified that works on at least Ubuntu and CentOS.
To post a comment you must log in.
It seems the simplest thing here is to extend the Machine doc used to add two fields.
We already have series, so adding OSVersion and OSKernel seems like a small addition.
The machiner worker seems like the logical place to have something set information about the machine. The current worker is a NotifyWatcher that is only configured to deal with initial settings and then deal with dying. This could reasonably trivially changed into a more normal worker with a main loop that periodically checks.
Under normal circumstances, getting the os version only needs to be determined at start up time. I'm not sure it could ever change without a reboot.
Also, normally, the kernel wouldn't update under us either, but with live kernel patching, perhaps it makes sense to look periodically. We could have the worker remember what it sent last time, and only make an API call to update it if it has changed.
It is worth noting that any additions to the machine definition in the database would require updates to the juju/description package for model migration.