Re: [PATCH 7/9] migration: don't remember image labels when migrating with shared fs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/9/2021 7:01 PM, Michal Prívozník wrote:
> On 8/23/21 4:41 AM, Peng Liang wrote:
>> When migrating with shared fs, the image labels has been remembered and
>> the ownership of the image has been set in the src host.  If the dst
>> host remembers the ownership of the image again, the ownership of the
>> image remembered in the src host (the origin ownership) will lost.
>>
>> Signed-off-by: Peng Liang <liangpeng10@xxxxxxxxxx>
>> ---
>>  src/security/security_dac.c | 32 +++++++++++++++++++++++---------
>>  1 file changed, 23 insertions(+), 9 deletions(-)
>>
> 
> 
> I thought that refcounting should do the trick here. At least that was
> my intent when implementing this feature. I mean, the source sets
> seclabels and since the domain runs just once all refcounters are equal
> to 1. Then, during migration when the destination sets labels the
> refcounter is (temporarily) increased to 2, but only until the source
> calls restore (in which case the refcounter is decreased back to 1 again).
> 
> Are you seeing different behaviour?

When the dst try to remember the labels (in
virSecuritySetRememberedLabel), it will find that the timestamp is
invalid, then it will remove all labels and set a new one instead of
increasing the refcounter to 2.  So I add
virSecurityManagerUpdateImageLabel to update labels (currently, only
update timestamp) during migration.

> 
> BTW: what FS are you using to test this? Because I'm not aware of any
> shared FS that would support XATTRs.

We are testing using ocfs2.

Thanks,
Peng

> 
> Michal
> 
> .
> 






[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux