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

test: cockpit-pcp is deprecated - use cockpit-machines #181

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

richm
Copy link
Contributor

@richm richm commented Nov 15, 2024

The tests_packages_full test is failing on el9.6 and later - cockpit-pcp
is missing - use cockpit-machines instead which seems to be available
on all platforms.

Signed-off-by: Rich Megginson [email protected]

@richm richm requested a review from martinpitt November 15, 2024 17:43
@richm richm force-pushed the test-cockpit-pcp-deprecated branch 2 times, most recently from 8cd2fd4 to b79aebf Compare November 15, 2024 18:15
@richm
Copy link
Contributor Author

richm commented Nov 15, 2024

[citest]

1 similar comment
@richm
Copy link
Contributor Author

richm commented Nov 16, 2024

[citest]

@martinpitt
Copy link
Collaborator

OK -- Note that you will have to replace the "cockpit-pcp" fallback with something else eventually, it's gone in current Ubuntu version as well.

@richm
Copy link
Contributor Author

richm commented Nov 16, 2024

OK -- Note that you will have to replace the "cockpit-pcp" fallback with something else eventually, it's gone in current Ubuntu version as well.

Ok - I guess we'll need to do that when we add a CI test for Integration tests / ubuntu (ubuntu-24.04)

@richm
Copy link
Contributor Author

richm commented Nov 16, 2024

[citest]

@spetrosi
Copy link
Collaborator

[citest bad]

spetrosi
spetrosi previously approved these changes Nov 18, 2024
Copy link
Collaborator

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

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

Argh! I did a review three days ago, but apparently actually sending it failed. Sorry! (I was already wondering why I was being ignored..)

@richm
Copy link
Contributor Author

richm commented Nov 19, 2024

@martinpitt seems cockpit-podman is not available on all Ubuntu platforms

@martinpitt
Copy link
Collaborator

@richm weird -- it does exist in 22.04, 24.04, and latest: https://launchpad.net/ubuntu/+source/cockpit-podman

@martinpitt
Copy link
Collaborator

martinpitt commented Nov 19, 2024

I'm not sure I understand this -- what actually tells the role to install cockpit-podman? Shouldn't that be here? As far as I can see, this only changes the check after the role ran, but not the role invocation itself?

Update: That should happen through

__cockpit_packages_full:
  - cockpit-*

So this feels like a bug.

@richm
Copy link
Contributor Author

richm commented Nov 19, 2024

I'm not sure I understand this -- what actually tells the role to install cockpit-podman?

The test tells the cockpit role to install all packages specified in __cockpit_packages_full.

On RedHat family https://github.com/linux-system-roles/cockpit/blob/main/vars/RedHat-10.yml#L24
and by default if no OS customization is specified https://github.com/linux-system-roles/cockpit/blob/main/vars/default.yml#L16
the role installs cockpit-*

Shouldn't that be here?

Yes.

As far as I can see, this only changes the check after the role ran, but not the role invocation itself?

Right. So the problem is that installing cockpit-* on Ubuntu is not pulling in the cockpit-podman package.

Update: That should happen through

__cockpit_packages_full:
  - cockpit-*

So this feels like a bug.

@richm
Copy link
Contributor Author

richm commented Nov 19, 2024

yes, this is a bug - note this from the Ubuntu log:

TASK [linux-system-roles.cockpit : Set version specific variables] *************
task path: /home/runner/work/cockpit/cockpit/tests/roles/linux-system-roles.cockpit/tasks/set_vars.yml:32
ok: [localhost] => (item=/home/runner/work/cockpit/cockpit/tests/roles/linux-system-roles.cockpit/vars/Debian.yml) => {"ansible_facts": {"__cockpit_packages": {"default": "{{ __cockpit_packages_minimal + __cockpit_packages_default }}", "full": "{{ __cockpit_packages_minimal + __cockpit_packages_default + __cockpit_packages_full }}", "minimal": "{{ __cockpit_packages_minimal }}"}, "__cockpit_packages_default": ["cockpit", "cockpit-networkmanager", "cockpit-packagekit", "cockpit-storaged"], "__cockpit_packages_full": ["cockpit-doc", "cockpit-machines", "cockpit-pcp"], "__cockpit_packages_minimal": ["cockpit-system", "cockpit-ws"]}, "ansible_included_var_files": ["/home/runner/work/cockpit/cockpit/tests/roles/linux-system-roles.cockpit/vars/Debian.yml"], "ansible_loop_var": "item", "changed": false, "item": "/home/runner/work/cockpit/cockpit/tests/roles/linux-system-roles.cockpit/vars/Debian.yml"}

It is using Debian specific values on Ubuntu

@richm
Copy link
Contributor Author

richm commented Nov 19, 2024

@martinpitt ah - because Ubuntu is in Debian os_family and because there is a Debian.yml vars file, this code pulls in those variable definitions for Debian on Ubuntu - https://github.com/linux-system-roles/cockpit/blob/main/tasks/set_vars.yml#L32

so what should we do here? Should I create a vars/Ubuntu.yml which uses cockpit-* for __cockpit_packages_full? Also note that doing so would be unrelated to this PR, so I would do that in a separate PR.

@martinpitt
Copy link
Collaborator

That seems right in general -- Ubuntu as a derivative of Debian should be similar enough to Debian to not warrant another copy I think. So is the problem that https://github.com/linux-system-roles/cockpit/blob/main/vars/Debian.yml#L10 doesn't support a "cockpit-*" glob?

As a minimal fix for this PR you may perhaps use "cockpit-machines"? That exists everywhere aside from RHEL 7 (not sure if you still care about that), and it's part of the Debian __full definition. And perhaps in a follow-up add cockpit-podman there, if the globbing doesn't work?

Thanks!

@richm
Copy link
Contributor Author

richm commented Nov 19, 2024

That seems right in general -- Ubuntu as a derivative of Debian should be similar enough to Debian to not warrant another copy I think. So is the problem that https://github.com/linux-system-roles/cockpit/blob/main/vars/Debian.yml#L10 doesn't support a "cockpit-*" glob?

correct - and I don't know enough about Debian to know if it should be cockpit-*, or a discrete list of packages.

As a minimal fix for this PR you may perhaps use "cockpit-machines"? That exists everywhere aside from RHEL 7 (not sure if you still care about that), and it's part of the Debian __full definition. And perhaps in a follow-up add cockpit-podman there,

Where is "there"? In Debian.yml in the __cockpit_packages_full list?

if the globbing doesn't work?

ok - but we don't have testing on Debian, so I don't know if cockpit-* will work for all Debian os_family platforms.

Thanks!

@richm richm force-pushed the test-cockpit-pcp-deprecated branch from 732a191 to 4fa5e86 Compare November 19, 2024 15:38
@martinpitt
Copy link
Collaborator

Where is "there"? In Debian.yml in the __cockpit_packages_full list?

Yes, sorry.

I don't know if cockpit-* will work for all Debian os_family platforms.

This should largely be a function of Ansible and apt/python-apt, not of the specific distro (that seems highly unlikely to patch in a derivative), so if it works on Debian stable or Ubuntu 22.04, it ought to work everywhere.

@richm
Copy link
Contributor Author

richm commented Nov 19, 2024

Where is "there"? In Debian.yml in the __cockpit_packages_full list?

Yes, sorry.

I don't know if cockpit-* will work for all Debian os_family platforms.

This should largely be a function of Ansible and apt/python-apt, not of the specific distro (that seems highly unlikely to patch in a derivative), so if it works on Debian stable or Ubuntu 22.04, it ought to work everywhere.

ok - I'll do that in a separate PR

@richm
Copy link
Contributor Author

richm commented Nov 19, 2024

[citest]

martinpitt
martinpitt previously approved these changes Nov 19, 2024
Copy link
Collaborator

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM, if that goes green.

@martinpitt
Copy link
Collaborator

(although it could just use c-machines everywhere and be simplified, but I don't mind much)

The tests_packages_full test is failing on el9.6 and later - cockpit-pcp
is missing - use cockpit-machines instead which seems to be available
on all platforms/versions.

Signed-off-by: Rich Megginson <[email protected]>
@richm richm changed the title test: cockpit-pcp is deprecated - use cockpit-composer test: cockpit-pcp is deprecated - use cockpit-machines Nov 19, 2024
@richm
Copy link
Contributor Author

richm commented Nov 19, 2024

(although it could just use c-machines everywhere and be simplified, but I don't mind much)

Yes, much simpler

@richm
Copy link
Contributor Author

richm commented Nov 19, 2024

[citest]

@richm richm merged commit 2c90ac0 into linux-system-roles:main Nov 19, 2024
19 checks passed
@richm richm deleted the test-cockpit-pcp-deprecated branch November 19, 2024 17:15
@martinpitt
Copy link
Collaborator

Yay!

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.

3 participants