Bug #1056

fsrc check_restricted

Added by Grzegorz Koslacz about 8 years ago. Updated about 8 years ago.

Status:ClosedStart date:01/11/2012
Priority:LowDue date:
Assignee:Ruben S. Montero% Done:

0%

Category:-
Target version:Release 3.2
Resolution:worksforme Pull request:
Affected Versions:OpenNebula 3.2

Description

Locking /var/lib/one with fsrc locks all subdirectories as well
This makes the /var/lib/one/images problematic to be shared

It looks that problem lays in the fsrc's 'check_restricted' function that only checks if the RESTRICTED or SAFE directory string is contained in the 'directory' string, instead of compare them exactly.

So if /var/lib/one is restricted /var/lib/one/images is also restricted because it contains '/var/lib/one'

Perhaps somebody who has more experience than me could check and rewrite it?

Associated revisions

Revision c03688df
Added by Ruben S. Montero about 8 years ago

bug #1056: Added comment on how to specify several paths for SAFE_DIRS

History

#1 Updated by Ruben S. Montero about 8 years ago

Hi Grzegorz,

That's exactly the purpose of SAFE_DIRS. A configurations like:

RESTRICTED_DIRS="/var/lib/one" 

SAFE_DIRS="/var/lib/one/images" 

Should do the trick. Let me know if that does not work for you...

#2 Updated by Grzegorz Koslacz about 8 years ago

Well... you are right. It works.

The reason was I had in fs.conf
SAFE_DIRS="$HOME/public/,/var/lib/one/images"

semicolon instead of space separated...

I'm very sorry - just have my mind mixed after hours of learning to use glusterfs in OpenNebula that has this exceptional possibility. Therefore it will become a HA cluster.

#3 Updated by Ruben S. Montero about 8 years ago

Hi

I've updated the comment on the file to state that a space separated list of PATHs is needed.

We'll be glad to hear more about your experience with GlusterFS + OpenNebula....

Cheers

#4 Updated by Ruben S. Montero about 8 years ago

  • Status changed from New to Closed
  • Assignee set to Ruben S. Montero
  • Target version set to Release 3.2
  • Resolution set to worksforme

Also available in: Atom PDF