airavata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Christie (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AIRAVATA-2589) Ansible: PGA deploy breaks when broken symlinks in user data directory
Date Wed, 08 Nov 2017 20:40:01 GMT

     [ https://issues.apache.org/jira/browse/AIRAVATA-2589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marcus Christie updated AIRAVATA-2589:
--------------------------------------
    Description: 
This task in the pga role fails when there are broken symlinks in the experiment data directory
{code}
- name: Create experiment data dir {{ experiment_data_dir }}
  file: path="{{ experiment_data_dir }}" state=directory owner="{{user}}" group="{{group}}"
mode=0777 recurse=yes follow=yes
  become: yes
{code}

I think it breaks because it can't follow them but the task has {{follow=yes}}.

I'm not 100% sure what is causing the broken symlinks but I think it happens when GFac copies
back files that are actually symlinks since the links seem to be pointing to files on the
remote compute resource. So one solution would be for GFac to either not copy back symlinks
or to resolve symlinks.

I don't think we can take off {{follow=yes}} from the task since we do have legitimate symlinks
the experiment data directory. For example, when we switched to Keycloak and forced usernames
to be lowercase, we created lowercase symlink aliases for all user data directories for users
who happened to have mixed case usernames.


h2. Workaround

For now here's what I do to find and delete broken symlinks:
{noformat}
cd /var/www/portals/gateway-user-data/
find . -type l ! -exec test -e {} \; -print | xargs rm
{noformat}


  was:
This task in the pga role fails when there are broken symlinks in the experiment data directory
{code}
- name: Create experiment data dir {{ experiment_data_dir }}
  file: path="{{ experiment_data_dir }}" state=directory owner="{{user}}" group="{{group}}"
mode=0777 recurse=yes follow=yes
  become: yes
{code}

I think it breaks because it can't follow them but the task has {{follow=yes}}.

I'm not 100% sure what is causing the broken symlinks but I think it happens when GFac copies
back files that are actually symlinks since the links seem to be pointing to files on the
remote compute resource. So one solution would be for GFac to either not copy back symlinks
or to resolve symlinks.

I don't think we can take off {{follow=yes}} from the task since we do have legitimate symlinks
the experiment data directory. For example, when we switched to Keycloak and forced usernames
to be lowercase, we created lowercase symlink aliases for all user data directories for users
who happened to have mixed case usernames.


> Ansible: PGA deploy breaks when broken symlinks in user data directory
> ----------------------------------------------------------------------
>
>                 Key: AIRAVATA-2589
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-2589
>             Project: Airavata
>          Issue Type: Bug
>            Reporter: Marcus Christie
>            Assignee: Marcus Christie
>
> This task in the pga role fails when there are broken symlinks in the experiment data
directory
> {code}
> - name: Create experiment data dir {{ experiment_data_dir }}
>   file: path="{{ experiment_data_dir }}" state=directory owner="{{user}}" group="{{group}}"
mode=0777 recurse=yes follow=yes
>   become: yes
> {code}
> I think it breaks because it can't follow them but the task has {{follow=yes}}.
> I'm not 100% sure what is causing the broken symlinks but I think it happens when GFac
copies back files that are actually symlinks since the links seem to be pointing to files
on the remote compute resource. So one solution would be for GFac to either not copy back
symlinks or to resolve symlinks.
> I don't think we can take off {{follow=yes}} from the task since we do have legitimate
symlinks the experiment data directory. For example, when we switched to Keycloak and forced
usernames to be lowercase, we created lowercase symlink aliases for all user data directories
for users who happened to have mixed case usernames.
> h2. Workaround
> For now here's what I do to find and delete broken symlinks:
> {noformat}
> cd /var/www/portals/gateway-user-data/
> find . -type l ! -exec test -e {} \; -print | xargs rm
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message