eWaterCycle / infra

Instructions for system administrators to deploy the eWaterCycle platform
Apache License 2.0
0 stars 0 forks source link

Reusing storage #117

Closed sverhoeven closed 2 years ago

sverhoeven commented 2 years ago

Using the storage again in a new machines make task fail.

sverhoeven commented 2 years ago

For example:

TASK [ewatercycle : ESMValTool configuration directory] ************************
...
failed: [localhost] (item=user1) => {\"ansible_loop_var\": \"item\", \"changed\": false, \"gid\": 1008, \"group\": \"1008\", \"item\": \"user1\", \"mode\": \"0777\", \"msg\": \"chown failed: failed to look up user user1\", \"owner\": \"1006\", \"path\": \"/home/user1/.esmvaltool\", \"size\": 29, \"state\": \"directory\", \"uid\": 1006}

or

TASK [ewatercycle : ESMValTool configuration directory] ************************
....
failed: [localhost] (item=vfs) => {\"ansible_loop_var\": \"item\", \"changed\": false, \"gid\": 0, \"group\": \"root\", \"item\": \"vfs\", \"mode\": \"0755\", \"msg\": \"chown failed: failed to look up user vfs\", \"owner\": \"root\", \"path\": \"/home/vfs/.esmvaltool\", \"size\": 6, \"state\": \"directory\", \"uid\": 0}
failed: [localhost] (item=vfsMeta) => {\"ansible_loop_var\": \"item\", \"changed\": false, \"gid\": 0, \"group\": \"root\", \"item\": \"vfsMeta\", \"mode\": \"0755\", \"msg\": \"chown failed: failed to look up user vfsMeta\", \"owner\": \"root\", \"path\": \"/home/vfsMeta/.esmvaltool\", \"size\": 6, \"state\": \"directory\", \"uid\": 0}
sverhoeven commented 2 years ago

The Ansible task is trying to add a esmvaltool config file in each home directory. An already existing storage item can have home dirs of users that do not exist when the Ansible task is executed.

Added workaround which ignores errors when trying to chmod inside /home/*.