All of lore.kernel.org
 help / color / mirror / Atom feed
From: Loic Dachary <loic@dachary.org>
To: Ken Dreyer <kdreyer@redhat.com>, ceph-devel <ceph-devel@vger.kernel.org>
Subject: Re: ceph OSD facts file
Date: Thu, 3 Mar 2016 22:41:30 +0700	[thread overview]
Message-ID: <56D85B2A.2000709@dachary.org> (raw)
In-Reply-To: <CALqRxCwLovLsdhWKMztqsuz5Mv46XYyjU6Z9O9BRt1GtnONKBg@mail.gmail.com>

Hi Ken,

I'll work on http://tracker.ceph.com/issues/14972 and create that script.

Thanks for a nice and precise description :-)

On 03/03/2016 05:50, Ken Dreyer wrote:
> 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?
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
Loïc Dachary, Artisan Logiciel Libre
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2016-03-03 15:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02 22:50 ceph OSD facts file Ken Dreyer
2016-03-03 15:41 ` Loic Dachary [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56D85B2A.2000709@dachary.org \
    --to=loic@dachary.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=kdreyer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.