[Kimchi-devel] [PATCH] model.templates: setting ISO ACL in template creation
Christy Perez
christy at linux.vnet.ibm.com
Wed Sep 3 21:18:04 UTC 2014
I tested this on a system with ACLs, and it isn't setting the ACL for
the directories containing the link, so the VM doesn't start. The
template creates fine.
A question I have (maybe for Aline), is why the template uses the path
to the file under /tmp/ instead of the file it links to. I think that
would remove this problem without having to change the ACL for /tmp.
Regards,
- Christy
On 09/03/2014 03:26 PM, Daniel Henrique Barboza wrote:
> Sometimes after a deep scan the template creation fails due to
> permission issues with the selected ISO. This patch sets the ACL
> (if necessary) of the ISO to avoid this scenario.
>
> Signed-off-by: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>
> ---
> src/kimchi/model/templates.py | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/src/kimchi/model/templates.py b/src/kimchi/model/templates.py
> index 9278cdc..a792a17 100644
> --- a/src/kimchi/model/templates.py
> +++ b/src/kimchi/model/templates.py
> @@ -27,7 +27,7 @@ from kimchi.exception import InvalidOperation, InvalidParameter
> from kimchi.exception import NotFoundError, OperationFailed
> from kimchi.kvmusertests import UserTests
> from kimchi.utils import pool_name_from_uri
> -from kimchi.utils import probe_file_permission_as_user
> +from kimchi.utils import probe_file_permission_as_user, run_setfacl_set_attr
> from kimchi.vmtemplate import VMTemplate
>
>
> @@ -44,9 +44,7 @@ class TemplatesModel(object):
> user = UserTests().probe_user()
> ret, excp = probe_file_permission_as_user(iso, user)
> if ret is False:
> - raise InvalidParameter('KCHISO0008E',
> - {'filename': iso, 'user': user,
> - 'err': excp})
> + run_setfacl_set_attr(iso)
>
> conn = self.conn.get()
> pool_uri = params.get(u'storagepool', '')
>
More information about the Kimchi-devel
mailing list