-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sap_swpm: Argument list can be too long when setting file permissions #721
Comments
We could just skip all the |
Solves issue sap-linuxlab#721. Signed-off-by: Bernd Finger <bfinger@redhat.com>
@berndfinger I would suggest different approach. It is easier to create batches of 100 files and run them in loop. This is short example I made for test, which splits into batches of 3: vars:
file_input: "fileA fileB fileC fileD fileE fileF fileG fileX"
tasks:
- name: Assign file_input into file_list
ansible.builtin.set_fact:
file_list: "{{ file_input.split(' ') }}"
- name: Show file_list in loop per batch
ansible.builtin.debug:
msg: "{{ item | join(' ') }}"
loop: "{{ file_list | batch(3) }}"
loop_control:
label: "Batch {{ (file_list.index(item[0]) // 3) + 1 }}" TASK [Show file_list in loop per batch] *********************************************************************************************************************
ok: [localhost] => (item=Batch 1) => {
"msg": "fileA fileB fileC"
}
ok: [localhost] => (item=Batch 2) => {
"msg": "fileD fileE fileF"
}
ok: [localhost] => (item=Batch 3) => {
"msg": "fileG fileX"
} |
@marcelmamula Nice idea, thanks! I tested with a batch size of 100, a directory name of length 100, and several 1000 files with a 22 character file name. I would still skip the extracted directories, as there should never be any need to change owners and permissions of extracted files. |
In the task
community.sap_install/roles/sap_swpm/tasks/swpm/prepare_software.yml
Line 72 in 4636753
[Errno 7] Argument list too long: '/bin/sh'
can occur if there are a lot of files (e.g. more than 683) in the __sap_swpm_fact_files_non_sapcar_chown_arg_list. This can happen if there are directories with many extracted files insap_swpm_software_path
, e.g. from a previous installation.Workaround: Skip setting file permissions and ownership by setting role parameter
sap_swpm_set_file_permissions
tofalse
, or ensure there are no directories insap_swpm_software_path
with files which are not needed for the SWPM installation.See also #663.
The text was updated successfully, but these errors were encountered: