adoptium / infrastructure

This repo contains all information about machine maintenance.
Apache License 2.0
86 stars 102 forks source link

change distribution_release to 15.6 #3798

Closed AswathySK closed 1 week ago

AswathySK commented 2 weeks ago

Need to change the distribution release version from 15.5 to 15.6 in the common role to add the devel-tools repo.

Can we make a change to make this dynamic? Instead of using the hardcoded version , cant we make it dynamic? For example instead of 15.5 cant we make it {{ ansible_distribution_major_version }}.{{ ansible_distribution_release }}

Checklist
karianna commented 2 weeks ago

@AswathySK You'll need to sign the Eclipse CLA. Vagrant failure is unrelated

AswathySK commented 2 weeks ago

@karianna , Why cant we make it dynamic using {{ ansible_distribution_release }} instead?

karianna commented 2 weeks ago

Question for @sxa

sxa commented 2 weeks ago

@Haroon-Khel Noting also that we have a 15.4 reference in https://github.com/adoptium/infrastructure/blob/822366e945b4ef1f540aca9a29180f7999cf6026/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.sles15#L6

AswathySK commented 2 weeks ago

@sxa @karianna and @Haroon-Khel Can you please take a look at this issue as well: https://github.com/adoptium/infrastructure/issues/3799

AswathySK commented 2 weeks ago

There is one more issue @karianna , @Haroon-Khel , @sxa ,

While trying to add the Devel-Tools repo with the https://download.opensuse.org/repositories/devel:/tools/15.6/devel:tools.repo url facing the following error.

fatal: [rtj-sles15s390x-svl-test-lij45-1.fyre.ibm.com]: FAILED! => {"changed": false, "cmd": "/usr/bin/zypper --quiet --non-interactive --gpg-auto-import-keys refresh --force -r https://download.opensuse.org/repositories/devel:/tools/15.6/devel:tools.repo", "msg": "Repository 'https://download.opensuse.org/repositories/devel:/tools/15.6/devel:tools.repo' not found by its alias, number, or URI.\nSome of the repositories have not been refreshed because they were not known.", "rc": 3, "stderr": "Repository 'https://download.opensuse.org/repositories/devel:/tools/15.6/devel:tools.repo' not found by its alias, number, or URI.\nSome of the repositories have not been refreshed because they were not known.\n", "stderr_lines": ["Repository 'https://download.opensuse.org/repositories/devel:/tools/15.6/devel:tools.repo' not found by its alias, number, or URI.", "Some of the repositories have not been refreshed because they were not known."], "stdout": "", "stdout_lines": []}

As a fix tried adding the autorefresh parameter to the zypper_repository module as well tried to do a zypper refresh for the machine , both these fixes were not helpful.Even from cmd it was not working succesfully:

/usr/bin/zypper --quiet --non-interactive --gpg-auto-import-keys refresh --force -r https://download.opensuse.org/repositories/devel:/tools/15.6/devel:tools.repo
Repository 'https://download.opensuse.org/repositories/devel:/tools/15.6/devel:tools.repo' not found by its alias, number, or URI.
Some of the repositories have not been refreshed because they were not known.

Succesful execution of this task was able to be achieved by making the following change:

- name: Add Devel-Tools repository (SLES15)
  zypper_repository:
    repo: https://download.opensuse.org/repositories/devel:/tools/15.6/
    auto_import_keys: yes
    state: present
  when:
    - ansible_distribution_major_version == "15"
  tags: patch_update