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

Debian packaging and testing #452

Merged
merged 5 commits into from
Jul 29, 2020

Conversation

martinpitt
Copy link
Member

podman 2.0 is now in Debian unstable, so I'd like to start testing it there. It would be nice to upload cockpit-podman to Debian once we have something working decently.

After hammering on it a lot, I now have TEST_OS=debian-testing make vm working. Let's see how it fares in actual testing!

@martinpitt
Copy link
Member Author

Bah -- no dpkg-dev in our test containers. I suppose we need to build the dsc inside the VM. log

martinpitt added a commit to martinpitt/cockpit-podman that referenced this pull request Jul 23, 2020
- Adjust the `make vm` rule to pull in the rpm or deb bits depending on
  `$TEST_OS`.

- Adjust test/vm.install to build Debian source and binary packages,
  and install it from there.

- Enable user namespaces in the kernel.

This still requires a good deal of bug workarounds.

Closes cockpit-project#452
martinpitt added a commit to martinpitt/cockpit-podman that referenced this pull request Jul 23, 2020
- Adjust the `make vm` rule to pull in the rpm or deb bits depending on
  `$TEST_OS`.

- Adjust test/vm.install to build Debian source and binary packages,
  and install it from there.

- Enable user namespaces in the kernel.

This still requires a good deal of bug workarounds.

Closes cockpit-project#452
martinpitt added a commit to martinpitt/cockpit-podman that referenced this pull request Jul 23, 2020
- Adjust the `make vm` rule to pull in the rpm or deb bits depending on
  `$TEST_OS`.

- Adjust test/vm.install to build Debian source and binary packages,
  and install it from there.

- Enable user namespaces in the kernel.

This still requires a good deal of bug workarounds.

Closes cockpit-project#452
@martinpitt
Copy link
Member Author

On debian-testing, system podman.service fails with

[graphdriver] prior storage driver overlay failed: remount /var/lib/containers/storage/overlay, flags: 0x40000: invalid argument

user podman seems to work better, I can at least do stuff. So while most tests will still be broken, I think this is good enough progress to land this -- debian-testing isn't yet triggered automatically.

@martinpitt martinpitt marked this pull request as ready for review July 23, 2020 13:01
@martinpitt
Copy link
Member Author

https://bugs.debian.org/966118 got fixed in the meantime, so dropping the hack. Rebased to current master.

martinpitt added a commit to martinpitt/cockpit-podman that referenced this pull request Jul 29, 2020
- Adjust the `make vm` rule to pull in the rpm or deb bits depending on
  `$TEST_OS`.

- Adjust test/vm.install to build Debian source and binary packages,
  and install it from there.

- Enable user namespaces in the kernel.

This still requires a good deal of bug workarounds.

Closes cockpit-project#452
@marusak
Copy link
Member

marusak commented Jul 29, 2020

Been playing with this for a bit and here are three things I noticed:

  1. The [graphdriver] prior storage driver overlay failed seem to be related to us doing self.restore_dir("/var/lib/containers") in SetUp. We sometimes see this in fedora as well. It would be worth figuring this one out. In fedora it happens only sometimes, so it might be that we bind-mount while podman is doing some actions that cause this problem.
  2. The new build is affected by events Rest API changes in v1.12 containers/podman#7078 so unusable
  3. time.sleep(60) (random number, maybe something much smaller is enough) just before self.restore_dir("/var/lib/containers") seems to avoid that failure from 1)

martinpitt added a commit to martinpitt/cockpit-podman that referenced this pull request Jul 29, 2020
- Adjust the `make vm` rule to pull in the rpm or deb bits depending on
  `$TEST_OS`.

- Adjust test/vm.install to build Debian source and binary packages,
  and install it from there.

- Enable user namespaces in the kernel.

This still requires a good deal of bug workarounds.

Closes cockpit-project#452
@martinpitt
Copy link
Member Author

Yay, 2.0.2 is in testing now, so I dropped the "get from unstable" hack and put back the "install correct units" hack. I filed https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=966501 to block 2.0.3 from entering testing. Once 2.0.4 hits testing, we can clean all that up.

marusak
marusak previously approved these changes Jul 29, 2020
Copy link
Member

@marusak marusak left a comment

Choose a reason for hiding this comment

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

Thanks!
There is this major regression where all tests fail, that would be great if we could address that.

However this is all good, so have my ack :)

@@ -3,7 +3,6 @@ Section: admin
Priority: optional
Maintainer: Cockpit <[email protected]>
Build-Depends: debhelper-compat (= 12),
appstream-util,
Copy link
Member

Choose a reason for hiding this comment

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

This commit debian: Drop appstream-util check could be merged into the previous one as it directly fixes it.

Copy link
Member Author

Choose a reason for hiding this comment

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

That was by intent -- it's easier to revert once we get appstream-util into the Debian image's pbuilder.

We don't test RHEL 8.2 on master any more, and this file does not exist
on Debian.
Put it into packaging/, as having a top-level debian/ directory in the
upstream tarball collides with downstream packaging.
Our current debian-testing bots image does not have appstream-util in
its pbuilder. We validate it in upstream CI already, so that is not very
important.
- Adjust the `make vm` rule to pull in the rpm or deb bits depending on
  `$TEST_OS`.

- Adjust test/vm.install to build Debian source and binary packages,
  and install it from there.

- Enable user namespaces in the kernel.

This still requires a good deal of bug workarounds.

Closes cockpit-project#452
Stop podman.service before setting up the /var/lib/containers/ overlay
directory, so that we don't clobber an already existing /overlay mount
inside it.

Also, stop podman.service before tearing down the temporary
/var/lib/containers/.

Don't enable podman.socket in vm.install, as the tests already do it,
and talking to podman before the restore_dir() would mess things up.
@martinpitt
Copy link
Member Author

I think I fixed the /overlay thing now. Tests still fail but "much less bad" 😁

@martinpitt martinpitt requested a review from marusak July 29, 2020 14:25
@martinpitt
Copy link
Member Author

Yay, there's (at least) one successful test now 🎉

Copy link
Member

@marusak marusak left a comment

Choose a reason for hiding this comment

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

Thank you @martinpitt !

@martinpitt martinpitt merged commit 3f78931 into cockpit-project:master Jul 29, 2020
martinpitt added a commit that referenced this pull request Jul 29, 2020
- Adjust the `make vm` rule to pull in the rpm or deb bits depending on
  `$TEST_OS`.

- Adjust test/vm.install to build Debian source and binary packages,
  and install it from there.

- Enable user namespaces in the kernel.

This still requires a good deal of bug workarounds.

Closes #452
@martinpitt martinpitt deleted the debian-package branch July 29, 2020 14:37
@g3blv
Copy link

g3blv commented Aug 14, 2020

Does this mean that cockpit-podman will be available in the Ubuntu repos?

@marusak
Copy link
Member

marusak commented Aug 14, 2020

Does this mean that cockpit-podman will be available in the Ubuntu repos?

Please see #481

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