Skip to content
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

Reinstall glibc in playbook #87

Merged
merged 12 commits into from
Mar 4, 2021
1 change: 1 addition & 0 deletions ansible/playbooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Before running the playbook, make sure the following settings are correct, and o
| prefix_snapshot_url | Directory (served over http(s)) containing snapshot files |
| prefix_snapshot_version | Date (`YYYYMMDD`) of the Portage snapshot file for the Prefix installation |
| prefix_python_targets | String consisting of [Gentoo Python targets](https://wiki.gentoo.org/wiki/Project:Python/PYTHON_TARGETS) Python targets used for the Prefix installation |
| prefix_user_defined_trusted_dir | Path to the user defined trusted dir for glibc |
| prefix_singularity_command | Singularity command for launching the container with the bootstrap script |
| prefix_source | Singularity container path used for the Prefix installtion |
| prefix_source_options | Arguments to be passed to the Prefix bootstrap script |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ gentoo_prefix_path: /cvmfs/{{ cvmfs_repository }}/{{ eessi_version }}/compat/{{
prefix_snapshot_url: http://cvmfs-s0.eessi-hpc.org/snapshots
prefix_snapshot_version: 20210222
prefix_python_targets: python3_8
prefix_user_defined_trusted_dir: /opt/eessi/lib
prefix_singularity_command: "singularity run -B {{ gentoo_prefix_path }}:{{ gentoo_prefix_path }}"
prefix_source: "docker://eessi/bootstrap-prefix:centos8-{{ eessi_host_arch }}"
prefix_source_options: "{{ gentoo_prefix_path }} noninteractive"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,3 @@
force: yes
with_items:
"{{ find_configs.results | rejectattr('files', 'equalto', []) | map(attribute='files') | list }}"

Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Install a specified list of sets and packages.
---
- name: Check if glibc has already been (re)installed with the user-defined-trusted-dirs option
command: "grep {{ prefix_user_defined_trusted_dir }} {{ gentoo_prefix_path }}/usr/lib64/libc.a"
register: glibc_reinstalled
when: eessi_host_os == "linux"
failed_when: glibc_reinstalled.rc >= 2

- name: Reinstall glibc with the user-defined-trusted-dirs option
portage:
package: sys-libs/glibc
noreplace: no
oneshot: yes
become: no
environment:
EXTRA_EMAKE: "user-defined-trusted-dirs={{ prefix_user_defined_trusted_dir }}"
when: eessi_host_os == "linux" and glibc_reinstalled.rc != 0

- name: Install package set {{ package_sets }}
portage:
package: "@{{ item }}"
Expand Down
4 changes: 2 additions & 2 deletions ansible/playbooks/roles/compatibility_layer/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
- block:
- include_tasks: prefix_configuration.yml

- include_tasks: create_host_symlinks.yml

- include_tasks: add_overlay.yml
args:
apply:
Expand All @@ -31,6 +29,8 @@

- include_tasks: install_packages.yml

- include_tasks: create_host_symlinks.yml

- name: Publish transaction
command: "cvmfs_server publish {{ cvmfs_repository }}"
when: cvmfs_start_transaction and cvmfs_publish_transaction
Expand Down