From 8ab9dca8374717ea2c4ae37ddf310c4085c0266f Mon Sep 17 00:00:00 2001 From: Leopold Talirz Date: Thu, 15 Jun 2023 00:08:08 +0200 Subject: [PATCH 1/7] ci: remove docker vfs workaround , fix yum task (#11) * ci: remove docker vfs workaround it appears to be no longer needed * use molecule action * fix role name * fix role name * fix yum packages --- .github/workflows/ci.yml | 26 ++------------------------ meta/main.yml | 2 ++ tasks/packages.yml | 2 +- 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a29659..2cab1e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,31 +25,9 @@ jobs: with: path: ${{ env.galaxy-name }} - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - uses: gofrolist/molecule-action@v2 with: - python-version: 3.8 - - - name: Upgrade pip - run: | - pip install --upgrade pip wheel - pip --version - - - name: Install requirements - run: | - pip install -r requirements.txt - working-directory: ${{ env.galaxy-name }} - - # See https://github.com/geerlingguy/raspberry-pi-dramble/issues/166 - - name: Force GitHub Actions' docker daemon to use vfs. - run: | - sudo systemctl stop docker - echo '{"cgroup-parent":"/actions_job","storage-driver":"vfs"}' | sudo tee /etc/docker/daemon.json - sudo systemctl start docker - - - name: Run molecule - run: molecule test - working-directory: ${{ env.galaxy-name }} + molecule_working_dir: ${{ env.galaxy-name }} env: MOLECULE_DISTRO: ${{ matrix.distro }} diff --git a/meta/main.yml b/meta/main.yml index b15b917..e960c3c 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,4 +1,6 @@ galaxy_info: + role_name: cvmfs_client + namespace: compute_canada author: Compute Canada CVMFS Team description: CVMFS client role company: Compute Canada diff --git a/tasks/packages.yml b/tasks/packages.yml index 9167689..aa845e6 100644 --- a/tasks/packages.yml +++ b/tasks/packages.yml @@ -2,7 +2,7 @@ - name: Install CVMFS client and configuration packages yum: - name: "['cvmfs'] + {{ cvmfs_auto_setup_package }} + {{ cvmfs_fuse3_package }} + {{ cvmfs_configuration }}" + name: "{{ ['cvmfs'] + cvmfs_auto_setup_package + cvmfs_fuse3_package + cvmfs_configuration }}" vars: cvmfs_auto_setup_package: "{{ ['cvmfs-auto-setup'] if cvmfs_auto_setup|bool else [] }}" cvmfs_fuse3_package: "{{ ['cvmfs-fuse3'] if cvmfs_use_fuse3|bool else [] }}" From 548d1660531c8e9d3d2b548f786c764f0785e498 Mon Sep 17 00:00:00 2001 From: Ryan Taylor <1686627+rptaylor@users.noreply.github.com> Date: Wed, 14 Jun 2023 15:10:46 -0700 Subject: [PATCH 2/7] try rocky 8 --- molecule/default/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index cc1d989..26744e0 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -8,7 +8,7 @@ driver: name: docker platforms: - name: instance - image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu1804}-ansible:latest" + image: "geerlingguy/docker-rockylinux8-ansible:latest" command: ${MOLECULE_DOCKER_COMMAND:-""} volumes: - /sys/fs/cgroup:/sys/fs/cgroup:ro From 593aa682b3fcfc77db57be6a0663960a74bb5216 Mon Sep 17 00:00:00 2001 From: Ryan Taylor <1686627+rptaylor@users.noreply.github.com> Date: Wed, 14 Jun 2023 15:14:02 -0700 Subject: [PATCH 3/7] increase cache size enough to avoid warning, remove debian task --- molecule/default/converge.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index d23ad4d..73a4808 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -4,14 +4,9 @@ hosts: all become: true - pre_tasks: - - name: Update apt cache. - apt: update_cache=yes cache_valid_time=600 - when: ansible_os_family == 'Debian' - roles: - role: cvmfs_contrib.cvmfs_client vars: cvmfs_client_configure_storage: false - cvmfs_cache_size: "1000" # small cache size for CI + cvmfs_cache_size: "1500" # small cache size for CI cvmfs_http_proxy: "DIRECT" From 86327f28179829ed50d80e61af3f07f0edceb700 Mon Sep 17 00:00:00 2001 From: Ryan Taylor <1686627+rptaylor@users.noreply.github.com> Date: Wed, 14 Jun 2023 15:27:05 -0700 Subject: [PATCH 4/7] try ansible diff --- molecule/default/molecule.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 26744e0..a46b538 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -18,3 +18,5 @@ provisioner: name: ansible playbooks: converge: converge.yml + options: + diff: True From 0225543a8b9cc5e25a3405989cbf010e49233475 Mon Sep 17 00:00:00 2001 From: Ryan Taylor <1686627+rptaylor@users.noreply.github.com> Date: Wed, 14 Jun 2023 15:36:11 -0700 Subject: [PATCH 5/7] debug --- tasks/packages.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tasks/packages.yml b/tasks/packages.yml index aa845e6..557298b 100644 --- a/tasks/packages.yml +++ b/tasks/packages.yml @@ -6,3 +6,17 @@ vars: cvmfs_auto_setup_package: "{{ ['cvmfs-auto-setup'] if cvmfs_auto_setup|bool else [] }}" cvmfs_fuse3_package: "{{ ['cvmfs-fuse3'] if cvmfs_use_fuse3|bool else [] }}" + +- name: TEST install cvmfs-auto-setup + yum: + name: cvmfs-auto-setup + state: present + + +- debug: + msg: "cvmfs_configuration is {{ cvmfs_configuration }}" + +- name: TEST install cvmfs_configuration + yum: + name: "{{ cvmfs_configuration }}" + state: present From 15b9675a6f8272d44c909efc0e20e9ebfaa4dfcf Mon Sep 17 00:00:00 2001 From: Ryan Taylor <1686627+rptaylor@users.noreply.github.com> Date: Wed, 14 Jun 2023 15:47:50 -0700 Subject: [PATCH 6/7] print yum output --- tasks/packages.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tasks/packages.yml b/tasks/packages.yml index 557298b..57430e2 100644 --- a/tasks/packages.yml +++ b/tasks/packages.yml @@ -6,6 +6,14 @@ vars: cvmfs_auto_setup_package: "{{ ['cvmfs-auto-setup'] if cvmfs_auto_setup|bool else [] }}" cvmfs_fuse3_package: "{{ ['cvmfs-fuse3'] if cvmfs_use_fuse3|bool else [] }}" + register: yum + +- name: Print yum stdout + debug: + msg: "{{ yum.stdout }}" +- name: Print yum stderr + debug: + msg: "{{ yum.stderr }}" - name: TEST install cvmfs-auto-setup yum: From ade122ae489fbf4e552435c366b0db6ae5570a80 Mon Sep 17 00:00:00 2001 From: Ryan Taylor <1686627+rptaylor@users.noreply.github.com> Date: Wed, 14 Jun 2023 15:57:21 -0700 Subject: [PATCH 7/7] fix output --- tasks/packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/packages.yml b/tasks/packages.yml index 57430e2..16e130a 100644 --- a/tasks/packages.yml +++ b/tasks/packages.yml @@ -10,10 +10,10 @@ - name: Print yum stdout debug: - msg: "{{ yum.stdout }}" + var: yum.stdout_lines - name: Print yum stderr debug: - msg: "{{ yum.stderr }}" + var: yum.stderr_lines - name: TEST install cvmfs-auto-setup yum: