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

Merged
merged 3 commits into from
Nov 16, 2024

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

@AswathySK AswathySK force-pushed the devel-tools-correction branch from 4f497a6 to 0ff508e Compare November 6, 2024 08:20
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

@karianna karianna requested a review from Haroon-Khel November 10, 2024 01:19
@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 AswathySK requested review from karianna and sxa November 13, 2024 09:20
@AswathySK AswathySK requested a review from karianna November 15, 2024 05:20
@karianna karianna merged commit 309f5b3 into adoptium:master Nov 16, 2024
12 checks passed
mahdipub pushed a commit to mahdipub/infrastructure that referenced this pull request Dec 5, 2024
* change distribution_release to 15.6

Signed-off-by: Aswathy S Kumar <[email protected]>

* Make distribution release dynamic

Signed-off-by: Aswathy S Kumar <[email protected]>

---------

Signed-off-by: Aswathy S Kumar <[email protected]>
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