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

change distribution_release to 15.6 #3798

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AswathySK
Copy link
Contributor

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
  • commit message has one of the standard prefixes
  • faq.md updated if appropriate
  • other documentation is changed or added (if applicable)
  • playbook changes run through VPC or QPC (if you have access)
  • VPC/QPC not applicable for this PR
  • for inventory.yml changes, bastillion/nagios/jenkins updated accordingly

@karianna
Copy link
Contributor

karianna commented Nov 5, 2024

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

@AswathySK
Copy link
Contributor Author

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

@karianna
Copy link
Contributor

karianna commented Nov 6, 2024

Question for @sxa

Signed-off-by: Aswathy S Kumar <aswathyskumar144@gmail.com>
Copy link
Member

@sxa sxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

What do you think @Haroon-Khel - looks like you changed the URL path from SLE_15_SP3 to the current format in https://github.com/adoptium/infrastructure/pull/3060/files - if we can use an automatically set distribution version variable instead that sounds reasonable to me.
(Also tagging @steelhead31 since he's looked at some SLES stuff too)

Copy link
Contributor

@Haroon-Khel Haroon-Khel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont have a problem with it being dynamic, saves us having to keep changing the hardcoded variable

Copy link
Contributor

@Haroon-Khel Haroon-Khel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pr is fine to merge as it is btw

@sxa
Copy link
Member

sxa commented Nov 6, 2024

@Haroon-Khel Noting also that we have a 15.4 reference in

RUN zypper addrepo https://download.opensuse.org/distribution/leap/15.4/repo/oss/ "Main Repository" && zypper --gpg-auto-import-keys refresh

@AswathySK
Copy link
Contributor Author

AswathySK commented Nov 7, 2024

@sxa @karianna and @Haroon-Khel Can you please take a look at this issue as well: #3799

@AswathySK
Copy link
Contributor Author

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

AswathySK and others added 2 commits November 13, 2024 10:51
@@ -23,7 +23,8 @@

- name: Add Devel-Tools repository (SLES15)
zypper_repository:
repo: https://download.opensuse.org/repositories/devel:/tools/15.5/devel:tools.repo
name: devel-tools
repo: 'https://download.opensuse.org/repositories/devel:/tools/15.{{ ansible_distribution_release }}/'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pedantry, would it make more sense to make ansible_distribution_release the entire 15.6? Later on it might move to 16.x....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karianna , I did not change it because the when condition checks whether it is sles 15 or not.
We can either make it {{ ansible_distribution_major_version }}.{{ ansible_distribution_release }} or remove the when condition :

  when:
    - ansible_distribution_major_version == "15"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants