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

Fix libcgroup dependency in Ubuntu 22.10 and newer #163

Merged
merged 3 commits into from
Jan 5, 2024
Merged

Fix libcgroup dependency in Ubuntu 22.10 and newer #163

merged 3 commits into from
Jan 5, 2024

Conversation

deltabweb
Copy link
Contributor

I tried to run the role on Ubuntu 23.04 and got an error about the package libcgroup1 not existing.
After checking https://launchpad.net/ubuntu/+source/libcgroup, it looks like the package was renamed to libcgroup2 in Ubuntu 22.10
Both libcgroup1 and libcgroup2 seem to actually use the version 2 of libcgroup
I installed nomad successfully on Ubuntu 23.04 with this fix

@LordAro
Copy link

LordAro commented Sep 18, 2023

This is also an issue for debian 12, would be good if the same fix could be applied for that as per cgroup-bin below

@beechesII
Copy link
Collaborator

beechesII commented Oct 20, 2023

@deltabweb maybe you can change line 7 to:

  - "{% if ( ansible_distribution  == 'Ubuntu' and ansible_distribution_version is version('22.10', '<')) or \
      ( ansible_distribution  == 'Debian' and ansible_distribution_version is version('12', '<') ) \
    %}\

So the fix also works for Debian 12.

@deltabweb
Copy link
Contributor Author

@beechesII Sounds good, I have just updated the PR

Copy link
Collaborator

@beechesII beechesII left a comment

Choose a reason for hiding this comment

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

lgtm

tested with debian 12 - libcgroup2 will be installed and nomad installation via role works

@lanefu can we please merge this to master?

@LordAro
Copy link

LordAro commented Oct 25, 2023

I actually had a different solution to this on my end - just remove libcgroupN from the deps list entirely

It's not used directly as far I can tell and it's pulled in by cgroups-bin / cgroups-tools anyway - just let the package manager worry about it

@beechesII
Copy link
Collaborator

I actually had a different solution to this on my end - just remove libcgroupN from the deps list entirely

It's not used directly as far I can tell and it's pulled in by cgroups-bin / cgroups-tools anyway - just let the package manager worry about it

I'm not sure if every package manger will install libcgroup1 or libcgroup2 as a dependency. I only found information about this for debian. Therefore I think we shouldn't delete the installation for these packages.

@beechesII
Copy link
Collaborator

@bbaassssiiee @lanefu please have a look.

@beechesII
Copy link
Collaborator

@deltabweb can you please update your actual master. I added molecule tests for the role. Your PR should fix the tests for debian 12 and ubuntu 23.04.

@deltabweb
Copy link
Contributor Author

@beechesII I've just updated master with a merge commit, let me know if I should rebase instead

@beechesII beechesII merged commit 1a576a9 into ansible-community:master Jan 5, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants