Bug 8169 - from-to Time Modifiers doesn't work
from-to Time Modifiers doesn't work
Product: smbta
Classification: Unclassified
Component: smbtad
All All
: P5 critical
: ---
Assigned To: Holger Hetterich
Depends on:
Blocks: 8168 8171
  Show dependency treegraph
Reported: 2011-05-26 09:35 UTC by Benjamin Brunner
Modified: 2011-05-27 11:24 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Brunner 2011-05-26 09:35:05 UTC
Timestamps for time modifiers throughing a segmentation fault.
smbtaquery -M pgsql -N smbtad -S holger -H seizewell -I 0  -d 10 -q 'global from 21-05-2011 to 25-05-2011, usage r;' 
smbtaquery -M pgsql -N smbtad -S holger -H seizewell -I 0  -d 10 -q 'global since 25-05-2011, usage r;' 

Shortcuts like yesterday and today are working.
Comment 1 Holger Hetterich 2011-05-26 09:39:03 UTC
segfaulting on this input is a bug

If you use a timestamp as input, please provide a full timestamp including hh:mm:ss.

It should however interpret also input like this.
Comment 2 Benjamin Brunner 2011-05-26 10:19:17 UTC
Then, this is wrong in the documentation. I'll have a look at it by myself.

Time Modifiers
Any functions that are called on objects can make use of time modifiers, that allow to specifiy a time range the function shall work on. The supported keywords must be used on objects and are called: FROM - TO and SINCE.

Example for FROM-TO:
global from 10-10-2010 to today, total rw;

Example for SINCE:
user holger since yesterday, total rw;
Comment 3 Benjamin Brunner 2011-05-26 13:46:24 UTC
The segfault is fixed with commit
in devel.
But it still doesn't parse the time, because of the whitespace.
Comment 4 Holger Hetterich 2011-05-26 17:33:54 UTC
This needs functional qouting support in the interpreter which I'll look at tonight. And yes, this is a critical bug.
Comment 5 Holger Hetterich 2011-05-26 18:08:47 UTC

should fix this, it works for me with "since",
Benni could you please check from..to ?

Quoting should be done with '

That means a -q request on smbtaquery can be done like this:
-q "global, total rw;"
or like this:
-q 'global, total rw;'

and... if the user needs to quote:
-q "global since '2011-23-23 00:00:00', total rw;"
Comment 6 Benjamin Brunner 2011-05-27 11:24:01 UTC
Fixed with commit 
on devel.