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

7.4 backports: fix build in nspawn, bug fixes #7705

Merged
merged 3 commits into from Sep 19, 2017

Conversation

martinpitt
Copy link
Member

@martinpitt martinpitt commented Sep 18, 2017

@martinpitt martinpitt added the backport apply a commit from master to a stable branch label Sep 18, 2017
@martinpitt
Copy link
Member Author

Sigh, we just got rhel-7.4 branch tests working a few weeks ago, and now it seems the package build got broken (there's no build log in the results directory). I can actually reproduce that locally, and it appears to be a really strange tar error:

DEBUG: + cd /builddir/build/BUILD
DEBUG: + cd /builddir/build/BUILD
DEBUG: + rm -rf cockpit-138.x
DEBUG: + /usr/bin/gzip -dc /builddir/build/SOURCES/cockpit-138.x.tar.gz
DEBUG: + /usr/bin/tar -xf -
DEBUG: gzip: /builddir/build/SOURCES/cockpit-138.x.tar.gz: unexpected end of file
DEBUG: /usr/bin/tar: Unexpected EOF in archive
DEBUG: /usr/bin/tar: Unexpected EOF in archive
DEBUG: /usr/bin/tar: Error is not recoverable: exiting now
DEBUG: Fehler beim Bauen des RPM:
DEBUG: Fehler: Fehler-Status beim Beenden von /var/tmp/rpm-tmp.F44XVJ (%prep)
DEBUG:     Fehler-Status beim Beenden von /var/tmp/rpm-tmp.F44XVJ (%prep)
DEBUG: Child return code was: 1
INFO: EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 590, in do
    raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
Error: Command failed: 
 # /usr/bin/systemd-nspawn -q -M 8ae2add60e7e47c484be076ae9c51cc6 -D /var/lib/mock/epel-7-x86_64/root --setenv=LANG=de_DE.UTF-8 --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOSTNAME=mock --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=HOME=/builddir --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PS1=<mock-chroot> \s-\v\$  -u mockbuild bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/cockpit.spec

@martinpitt
Copy link
Member Author

On second run I didn't hit the weird tar EOF error, but got some test failures instead; these sound like issue #7395, we aren't prepared yet for building in nspawn, at least not on the rhel-7.4 branch. Our rhel-7 images now have nspawn enabled in mock, so I take it these got fixed on master, but I'm not sure if that's worth backporting.

petervo and others added 3 commits September 18, 2017 18:00
This is necessary to be able to build Cockpit in an nspawn-enabled mock
(which RHEL 7.4 now enables by default). Otherwise the unit tests fail
with

    Message: couldn't lookup group: mockbuild: Success
    ERROR:src/ws/test-remotectlcertificate.c:127:test_combine_good: assertion failed (test->ret == 0): (1 == 0)

as that group doesn't seem to exist in mock's nspawn.

Cherry-picked from b186e4c (PR cockpit-project#7594)
and not into foo.service.  This allows us to enable and disable the
actual timer, and not the service that runs when the timer expires.

Also, avoid partial lines in the unit files.

Put timers into WantedBy=timers.target. This is the recommended thing to
do.  Also, WantedBy=default.target does not seem to work with certain
versions of systemd.

Cherry-picked from 5ba8277 (PR cockpit-project#6324)

Bug https://bugzilla.redhat.com/show_bug.cgi?id=1478832
The connection properties' "port" field  can be an integer, so stringify
it (or any other field except "visible" which is a boolean and already
special-cased) when building the GVariant wrapper in update_saved_machine().

Adjust TestMultiMachineAdd to reproduce/verify this case by putting the
second external machine (m3) onto port 2222.

Fixes cockpit-project#6291
Cherry-picked from 4f6c6ae (PR cockpit-project#6466)
Closes cockpit-project#7705

Bug https://bugzilla.redhat.com/show_bug.cgi?id=1478828
@martinpitt martinpitt changed the title lib: Fix remote hosts with nonstandard port 7.4 backports: fix build in nspawn, bug fixes Sep 18, 2017
@martinpitt
Copy link
Member Author

I backported the test fix for nspawn, which seems harmless enough - in exchange cockpit can be built on the default RHEL 7.4 mock configuration, which is no small win. I also backported the timers fix, so this PR now contains both changes which we want to make to 7.4 base.

@petervo
Copy link
Contributor

petervo commented Sep 18, 2017

So this is interesting, the rhel-7-4 tests fail because this PR is patching packages that are part of base on so not installed on that system. So it looks like we might need changes to the way that image is built when it is run on the rhel-7-4 branch.

@martinpitt
Copy link
Member Author

@petervo: Right; I was going to explain that once the rhel-7 tests pass (there is a flake). The rhel-7 tests prove that the fixes (and accompanying test changes) work once these fixes land in RHEL 7.4. While the rhel-7-4 test failures prove that the test cases actually detect/reproduce the bug and that these two features are really broken in current RHEL.

My gut feeling is that for updates to RHEL base (i. e. this branch) the "rhel-7" tests are definitive and should stay green, while the rhel-7-4 tests should be definitive for PRs to RHEL extras (we don't currently have/need a branch for that, but we might again), and of course for master. I would like that better than crippling the rhel-7-4 tests in that branch, only to uncripple them in a couple of weeks when the fixes land. WDYT?

@petervo
Copy link
Contributor

petervo commented Sep 18, 2017

That makes sense. I kind of would like something better than having red x for 7.4 meaning things are good here. But I don't have a better suggestion ATM.

@petervo petervo merged commit c9a5bec into cockpit-project:rhel-7.4 Sep 19, 2017
@martinpitt martinpitt deleted the 7.4-fixes branch September 19, 2017 20:26
martinpitt added a commit to martinpitt/cockpit that referenced this pull request Sep 19, 2017
These two special cases covered known bugs in RHEL 7.4 base's cockpit
138 packages. These are more suitable as known issues (cockpit-project#7710 and cockpit-project#7711),
particularly as they are being fixed in RHEL too (PR cockpit-project#7705).

Closes cockpit-project#7712
petervo pushed a commit that referenced this pull request Sep 20, 2017
These two special cases covered known bugs in RHEL 7.4 base's cockpit
138 packages. These are more suitable as known issues (#7710 and #7711),
particularly as they are being fixed in RHEL too (PR #7705).

Closes #7712
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport apply a commit from master to a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants