On 01/03/17 22:41, Michael Gilbert wrote:
Hello,

I have a new install of Robinhood on a fairly large Lustre filesystem. We initially did a basic configuration with no policies or file classes just to get robinhood working. We are now starting to try to add policies, but not having any luck getting it to work. I added the following lines to the config file, in an attempt to create a very simple test policy that just sends the output of ls (of all the files of a user called "ricky") to a file:

|define_policy list_ricky { status_manager = basic; scope { type == directory and name == 'ricky' } default_action = cmd("ls -al >> /tmp/ricky_ls.out"); default_lru_sort_attr = none; } list_ricky_rules { rule default { condition { creation > 15w } } } |
Hello Michael,

Not related to your issue, but this doesn't look what you want to do:
    cmd("ls -al >> /tmp/ricky_ls.out");

Here you execute "ls -la" in robinhood current directory, probably '/'.

The action supposed to be per entry, so I guess you want to run something like:
    cmd("ls -ld {fullpath} >> /tmp/ricky_ls.out");


|DB schema change detected: field 'ENTRIES.list_ricky_status' must be added => Run 'robinhood --alter-db' to apply this change. |

I ran the command |robinhood --alter-db|, which took about 7 or 8 minutes to finish, but it failed with the following errors:

|2017/01/03 10:54:28 [38147/1] ListMgr | table ACCT_STAT does not exist (or wrong version): creating it. 2017/01/03 10:54:28 [38147/1] ListMgr | Populating accounting table from existing DB contents. This can take a while... (estim. duration: ~6.4min) 2017/01/03 11:05:19 [38147/1] ListMgr | Unhandled error 1030: default conversion to DB_REQUEST_FAILED 2017/01/03 11:05:19 [38147/1] ListMgr | Error 7 executing query 'INSERT INTO ACCT_STAT(uid,gid,type,list_ricky_status,size,blocks, count,sz0,sz1,sz32,sz1K,sz32K,sz1M,sz32M,sz1G,sz32G,sz1T) SELECT uid,gid,type,list_ricky_status,SUM(size),SUM(blocks),COUNT(id),SUM(size=0),SUM(sz_range(size)=0),SUM(sz_range(size)=1),SUM(sz_range(size)=2),SUM(sz_range(size)=3),SUM(sz_range(size)=4),SUM(sz_range(size)=5),SUM(sz_range(size)=6),SUM(sz_range(size)=7),SUM(sz_range(size)>=8) FROM ENTRIES GROUP BY uid,gid,type,list_ricky_status': Got error -1 from storage engine 2017/01/03 11:05:19 [38147/1] ListMgr | Failed to populate accounting table: Error: Got error -1 from storage engine 2017/01/03 11:05:19 [38147/1] Main | Error initializing list manager: request error (7) |

I don't know what this "Got error -1 from storage engine" means. Never saw it.

If you scan is not too long, you could try to drop the DB and rescan, so it will recreate the DB schema.

Also do you really need to maintain a "list_ricky_status"?
If not, you can specify "status_manager = none" so it will no longer need to change the DB schema.

I removed the policy lines from the config file in an effort to get things working the way they were previously, but I get the same exact errors. It tells me ACCT_STAT doesn’t exist, tries to create and populate it and then fails. So at this time, I can’t even get robin hood to start at all. Please help!

HTH
Thomas

Thank you!

Mike


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
robinhood-support mailing list
robinhood-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/robinhood-support


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
robinhood-support mailing list
robinhood-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/robinhood-support

Reply via email to