xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <Ian.Jackson@eu.citrix.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>
Cc: stefano.stabellini@eu.citrix.com, wei.liu2@citrix.com,
	xen-devel@lists.xen.org
Subject: Re: [PATCH V2] tools/xenstore-watch: Add new timeout parameter
Date: Thu, 17 Mar 2016 16:39:19 +0000	[thread overview]
Message-ID: <22250.56759.655965.841132@mariner.uk.xensource.com> (raw)
In-Reply-To: <1458204910-8144-1-git-send-email-rcojocaru@bitdefender.com>

Razvan Cojocaru writes ("[PATCH V2] tools/xenstore-watch: Add new timeout parameter"):
> This patch allows xenstore-watch to exit even if no changes to its
> XenStore key have occured in a specified interval (in seconds), via
> a new -T parameter.

I realise I come a bit late with this, but:

I'm not opposed to making it possible to wait with a timeout for a
suitable situation in xenstore.

However, xenstore-watch needs to be run in a loop because of the
possibility of spurious watch triggers.  And this means that to use
your new option and get the timeout right, the caller would need to
write shell code to query the time, do arithmetic to calculate the
appropriate timeout, and so on.

Or to put it another way, xenstore-watch is a fine debugging and
monitoring tool but not very good for scripting.

For scripting what you probably want is something like:

  "wait up to T seconds for xenstore node /X/Y/Z
   to contain something matching PAT; bail immediately if
   /X/Y/Z contains something matching QAT".

How are you using this new option ?

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-03-17 16:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17  8:55 [PATCH V2] tools/xenstore-watch: Add new timeout parameter Razvan Cojocaru
2016-03-17 16:39 ` Ian Jackson [this message]
2016-03-17 16:46   ` Razvan Cojocaru

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=22250.56759.655965.841132@mariner.uk.xensource.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).