All of lore.kernel.org
 help / color / mirror / Atom feed
* ceph OSD facts file
@ 2016-03-02 22:50 Ken Dreyer
  2016-03-03 15:41 ` Loic Dachary
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Dreyer @ 2016-03-02 22:50 UTC (permalink / raw)
  To: ceph-devel

Hi Loic,

In Red Hat we're interested in having a Ceph "facts" file that we can
integrate with RHEL's subscription-manager (upstream
http://www.candlepinproject.org/ fyi) in order to report on the
available raw disk capacity available per OSD.

We need a script to write a "/etc/rhsm/facts/ceph_disk.facts" file.
That file needs to contain JSON of the form:

{
  "band.storage.usage": <integer number of TB used on this node, such as 55>
}

for example:
{
  "band.storage.usage": 55
}

As long as that file exists (and it can be named anything that ends in
".facts") the contents will be read in and added to the system facts.
On RHEL this can be verified by running `subscription-manager facts`
to ensure that your value is showing up properly.

In terms of creating this .facts file, we will need a script to do
that. We could call it /usr/bin/ceph-update-fact-file, or make it a
ceph-disk sub-command, or whatever you want, really.

The facts file should be kept up-to-date every four hours, which makes
me think that we could implement this as a systemd service and timer.
Something like

  $ cat /etc/systemd/system/ceph-update-facts-file.service

  [Unit]
  Description=Update Ceph OSD fact file

  [Service]
  Type=oneshot
  ExecStart=/usr/bin/ceph-update-fact-file


...and:

  $ cat /etc/systemd/system/ceph-update-facts-file.timer
  [Unit]
  Description=Trigger an automatic rewrite every four hours

  [Timer]
  OnCalendar=4hours
  Persistent=true

  [Install]
  WantedBy=multi-user.target

(The above is untested, it's just an idea).  What do you think?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-03 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-02 22:50 ceph OSD facts file Ken Dreyer
2016-03-03 15:41 ` Loic Dachary

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.