Our cockpit JS API documentation currently has some way outdated information
about jQuery , suggesting that users of the Cockpit API should always load
jQuery, and use the Cockpit bundled version. This hasn't been true for a long
time, and was just forgotten to be cleaned up. Also, our examples did that, so
people using them as a start for their own modules were also misled.
The problem with this is that it makes the old jQuery version (2.2.5) part of
Cockpit's public API. This is not necessary: the Cockpit API is completely
independent of jQuery, and in fact many of our pages don't use jQuery at all.
It also prevents us from updating jQuery to a current upstream version, as 3.0
changed quite a few things .
As a first step, I just cleaned up the documentation and examples to completely
remove this . Next we need to find out which external Cockpit pages use the
bundled jQuery and make them stop doing that. In a lot of cases, it's fairly
trivial to just completely drop jQuery in favor of standard functions like
`document.getElementById()` or `addEventListener()`, and for the others the
project should use their own jQuery version through npm as usual.
I will go through Fedora, RHEL, and GitHub to search for these projects.
Does anyone know about such projects? Please point them out to me!
After that, we can update jQuery in Cockpit at last, and from then on treat it
as an internal implementation detail instead of API.
The same goes for PatternFly, but at least that was never documented as API nor
being used in the examples - so I think we should be okay there.
I would like to renew the effort on Host Devices for Cockpit .
To move forward, let's implement it step by step while opening brand new PR
picking just a subset of the already implemented functionality  while
adjusted to generally acceptable form.
Initial implementation would meet:
- PCI support only
- initially read-only: just the List of devices by their Class (according
- example: by Audio device, Ethernet Controller, etc
- data source: sysfs
- make use of backward-compatible lspci for data preprocessing (especially
manipulation with HW database)
- monitor for changes by listening kernel uevents
Follow-ups will lead to  scope:
- for pci, active actions are allowed for selected device classes, one PR
- (un)bind VFIO driver
- configure SR-IOV network cards
- vGPU configuration
- additional view by Driver
- What devices is the driver bound to?
- additional view by IOMMU Groups
- For server fine-tuning, what devices are within single IOMMU Group?
- support for other buses, i.e. USB or SCSI
- their views are independent on each other due to fundamental differences
Please let me know your thoughts.
senior software engineer
Red Hat Czech
Cockpit is the modern Linux admin interface. We release regularly. Here
are the release notes from version 160.
Add kubevirt Virtual Machines overview
kubevirt is a project for running KVM virtual machines in Kubernetes. Cockpit's
"Cluster" (Kubernetes/OpenShift) dashboard can now show the status of these VMs
in the new "Virtual Machines" menu entry. This only appears when kubevirt is
installed and active:
In the future this will be extended to also do operations on the VMs.
Thanks to Jakub Niedermertl for this feature!
Redesign package list on Software Updates page and show RHEL Errata
The table of available updates now looks and behaves much more consistently to
other products that handle software packages, like Satellite and Welder:
* It now only shows the first line of the description and number of fixed
security issues or bugs in the table, and moves the full description and
detailled bug/CVE lists into an expander.
* It shows icons for the severity of the update, i. e. "security", "bug fix",
* On Red Hat operating systems it also shows the
of security updates and links to the corresponding Errata.
* PackageKit often provides the update details in
Markdown format. This now gets rendered properly instead of shown verbatim
AppStream handling on Apps page
On Fedora, the Apps page now installs the `appstream-data` package when
checking for new applications, which ships the AppStream metadata for
discovering new Cockpit applications.
This Cockpit version also adds AppStream metadata for its own
`cockpit-sosreport` package (which is not installed by default). Once
`appstream-data` gets updated again in Fedora, cockpit-sosreport will appear on
the Apps page as an available extension.
Change CPU graphs to use "100%" for a fully loaded multi-processor system
Previously, the CPU graphs on the System, Dashboard, and Containers pages were
calibrated to 100% for a single CPU core, so that the graph maxed out at e. g.
400% for a system with four busy CPU cores. Now it gets scaled so that "100%"
means "all cores are fully busy", which is the behaviour of command line tools
Show storage, network, and other numbers with 3 digits of precision
Previously numbers like the free space on a storage device were shown with one
fractional digit only, which led to overly imprecise numbers like "0.1 GiB".
The new behaviour provices a more consistent accuracy regardless of the
Add an example bastion container
A bastion container provides Cockpit's web service without actually logging in
to the machine on which it runs, but only connects to remote hosts via ssh:
This is not a ready-to-use product for now, but we encourage you to experiment
with the example and give us feedback if you have such a use case.
You can get Cockpit here:
Cockpit 160 is available in Fedora 27:
Or download the tarball here:
here are some brainstorming notes about what might come next regarding
Cockpit apps. Any feedback highly appreciated!
Cockpit can discover and install add-ons that come as RPMs or DEBs.
Cockpit uses the regular AppStream mechanism for this that is also
used by GNOME Software to discover and install Desktop "add-ons".
Cockpit reads the "AppStream collection metadata" to discover
available add-ons, and the RPMs and DEBs install small "AppStream
upstream metadata" files into /usr/share that Cockpit reads to figure
out what is installed.
We also want to discover and install Cockpit add-ons that are in
container images. The Desktop world has Flatpaks for this, and they
are working on shipping Flatpaks as standard OCI container images.
Flatpak also uses AppStream to describe individual images. Owen is
working on "metastore", which should give us the equivalent of the
"AppStream collection metadata" for container image registries. Once
pulled, we can look at the labels and annotations of the
images/containers to find the "AppStream upstream metadata".
But how does a add-on in a container work?
I would try this:
- A container needs to be running before Cockpit takes note of it.
Having just the image pulled to local storage means nothing.
- When starting a session, the shell will find all running containers
with a special label and "exec" a bridge in them (if the logged in
user has enough permissions).
- Implementation-wise, such a container is like a remote machine.
URLs refer to it explicitly. Its packages don't need to be
distinct from those of other containers.
- UI-wise, their manifests and iframes are merged with those from the
bridge that runs outside of any container. We could start by only
allowing "dashboard"s in containers, that ought o be quite simple.
- We can even extend this merging to real remote machines so that you
get all dashboards from all your machines merged in your browser
- In the "Applications" tool, we don't talk about "installing"
applications that are in containers, but about "enabling" them.
Enabling such a container means running it in its default way, and
making sure it gets started on every boot. Somehow.
- We could extend this terminology to RPM/DEB apps as well.
"Enabling" an app makes its entry appear in Cockpit, "disabling"
makes it go away. If that needs some more rpms or images or
something else, that's an implementation detail.
- The process of enabling something could talk more clearly about
what will happen and let the user confirm this.
Does this make sense?
I'm considering exposing the VM consoles we already have in Cockpit for
their reuse by other projects, like ManageIQ or oVirt's VM Portal.
One way to do it is moving them under the patternfly-react library ,
partially involving the patternfly community in their later development
(and probably even design).
The transition would be implemented step-by-step, starting with the serial
The idea is to externalize VM serial console and underlying Terminal
component and "reuse" them back in Cockpit.
To do so, it makes sense to move from the term.js-cockpit fork to the
maintained xterm.js , successor of .
Once this is done, other use of the term.js-cockpit will be similarly
replaced to depend just on the single .
Benefits for Cockpit:
- use of upstream-maintained library
- leverage last (almost) 2 years of the xterm.js development
- be aligned with other related projects on the design level (and drive it!)
- quite a lot of work in backporting term.js-cockpit patches to xterm.js
- risks - bugs in already stabilized features might/will appear
I've already implemented POC proving this is feasible and the components
can provide reasonable wrapping/API.
There's still a lot of work to be done, starting with porting of  to .
So, here's the question: is this something what makes sense even for
If so, is there already any experience (good/bad) in merging some of the
 into any successor of ? The most important and maybe debatable seems
to be .
Thanks for opinion,
senior software engineer
Red Hat Czech
https://devconf.cz/ is approaching fast! As last year, we will host a Cockpit
Hackfest community meetup again. Please come join us if you want to learn about
how to create your own Cockpit pages, improve the existing ones, poke our
brains about how to do stuff, or simply say hello.
The preliminiary schedule  says that the hackfest will happen on Friday,
January 26th, in room C236. This fits about 15 people.
See you there!