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

Fedora 31 #12619

Merged
merged 2 commits into from
Sep 11, 2019
Merged

Fedora 31 #12619

merged 2 commits into from
Sep 11, 2019

Conversation

croissanne
Copy link
Contributor

@croissanne croissanne commented Aug 22, 2019

  • image-refresh fedora-31

Issues:

@croissanne croissanne added the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Aug 22, 2019
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, a few things though:

  1. Before this PR should come PR that would declare fedora-31 into testmap.py so it can be triggered.

  2. This needs to be added into bots/image-trigger

  3. Bunch of naughties needs to be copied over, but I agree with with firstly running tests and copying only those, that are needed

  4. Adding master as default target for fedora-31 (see point 0.)

  5. Needs to be mentioned in README

  6. Needs to build image in this PR

  7. There are a few tests that behave differently on fedora-30, they also needs to check for fedora-31

# 02110-1301 USA.

BASE=$(dirname $0)
$BASE/virt-install-fedora "$1" x86_64 "http://dl.fedoraproject.org/pub/fedora/linux/releases/31/Server/x86_64/os/"
Copy link
Member

Choose a reason for hiding this comment

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

This URl does not exists (yet), please use https://dl.fedoraproject.org/pub/fedora/linux/development/31/Everything/x86_64/os/

@marusak
Copy link
Member

marusak commented Aug 22, 2019

  1. Needs to build image in this PR

I see you added it. Don't forget to add bot label when ready so bots really pick it up

@croissanne croissanne changed the title Fedora 31 WIP Fedora 31 Aug 22, 2019
@croissanne croissanne added the bot label Aug 22, 2019
@croissanne croissanne changed the title WIP Fedora 31 Fedora 31 Aug 22, 2019
@cockpituous cockpituous changed the title Fedora 31 WIP: 3-ci-srv-06: [no-test] Fedora 31 Aug 22, 2019
@cockpituous
Copy link
Contributor

image-refresh in progress on 3-ci-srv-06.
Log: https://209.132.184.41:8493/logs/image-refresh-12619-20190822-092626/

@cockpituous
Copy link
Contributor

@cockpituous cockpituous changed the title WIP: 3-ci-srv-06: [no-test] Fedora 31 Fedora 31 Aug 22, 2019
@cockpituous
Copy link
Contributor

image-refresh in progress on 1-ci-srv-03.
Log: https://209.132.184.41:8493/logs/image-refresh-12619-20190822-122626/

@cockpituous cockpituous changed the title Fedora 31 WIP: 1-ci-srv-03: [no-test] Fedora 31 Aug 22, 2019
@cockpituous
Copy link
Contributor

@cockpituous cockpituous changed the title WIP: 1-ci-srv-03: [no-test] Fedora 31 Fedora 31 Aug 22, 2019
@cockpituous
Copy link
Contributor

image-refresh in progress on centosci-tasks-w4dn3.
Log: https://logs-https-cockpit.apps.ci.centos.org/logs/image-refresh-12619-20190823-074646/

@cockpituous cockpituous changed the title Fedora 31 WIP: centosci-tasks-w4dn3: [no-test] Fedora 31 Aug 23, 2019
@cockpituous
Copy link
Contributor

@cockpituous cockpituous changed the title WIP: centosci-tasks-w4dn3: [no-test] Fedora 31 Fedora 31 Aug 23, 2019
@cockpituous
Copy link
Contributor

image-refresh in progress on 3-cockpit-8.
Log: https://209.132.184.41:8493/logs/image-refresh-12619-20190823-081515/

@cockpituous cockpituous changed the title Fedora 31 WIP: 3-cockpit-8: [no-test] Fedora 31 Aug 23, 2019
@cockpituous
Copy link
Contributor

@martinpitt
Copy link
Member

martinpitt commented Sep 6, 2019

Notes about the curl check-realms failure: My initial thought was that F31 may have switched from the kernel keyring to the user-land KCM (keyring cache daemon) by default. But /etc/krb5.conf.d/kcm_default_ccache already exists in F30, and so does sssd-kcm.service. On F31 this service is active, and in klist I do see the ticket:

# klist
Ticket cache: KCM:0
Default principal: admin@COCKPIT.LAN

Valid starting       Expires              Service principal
06.09.2019 10:02:54  07.09.2019 10:02:53  host/x0.cockpit.lan@COCKPIT.LAN
06.09.2019 10:02:53  07.09.2019 10:02:53  krbtgt/COCKPIT.LAN@COCKPIT.LAN
06.09.2019 10:03:01  07.09.2019 10:02:53  HTTP/x0.cockpit.lan@COCKPIT.LAN

But with curl

curl --negotiate --delegation always -u : -D- http://x0.cockpit.lan:9090/cockpit/login

you get

cockpit-session: gssapi auth failed: Request ticket server HTTP/x0.cockpit.lan@COCKPIT.LAN not found in keytab (ticket kvno 1)

But it's cleary there:

# klist -k /etc/cockpit/krb5.keytab 
Keytab name: FILE:/etc/cockpit/krb5.keytab
KVNO Principal
---- --------------------------------------------------------------------------
   1 HTTP/x0.cockpit.lan@COCKPIT.LAN
   1 HTTP/x0.cockpit.lan@COCKPIT.LAN

This is pretty much exactly how it looks like on Fedora 30.

FTR, this is not about the user ticket, that works fine (with KCM and kernel keyring, and you get a ticket either way). This is about kerberos not being able to authenticate the cockpit service.

Interestingly, when we move the cockpit server keytab to the default location, it works:

mv /etc/krb5.keytab{,.disabled}
mv /etc/cockpit/krb5.keytab /etc/krb5.keytab

after that, curl gets a valid login/session. So it seems whatever we do to support a custom keytab in the server stopped working.

I downloaded the older 1.17-4.fc30 version of libkadm5, krb-workstation, and krb5-libs from
Fedora 30, downgraded (rpm -U --force --nodeps), and it immediately started working again. That gives some chance of bisecting between -4 and -40, possibly the $KRB5_KTNAME support got broken? Fortunately it's still the same upstream version.

When looking through the diff, the secure_getenv() patch (backported from upstream) caught my attention, as cockpit-session is suid root. And indeed when I downgrade to 1.17-15 (the version immediately before that), things work. When I upgrade to 1.17-16 (the version that introduced secure_getenv), it fails.

There is unfortunately no other way to set the keytab than through the environment, as changing the global configuration file is out of the question for cockpit-session. So we either need to convince secure_getenv() into accepting the variable, or I'll file an upstream and downstream bug and ask if there's another trick or this could be partially reverted.

I asked on the original upstream PR for advice.

@cockpituous
Copy link
Contributor

image-refresh in progress on 2-cockpit-9.
Log: https://209.132.184.41:8493/logs/image-refresh-12619-20190906-162424/

@cockpituous cockpituous changed the title Fedora 31 WIP: 2-cockpit-9: [no-test] Fedora 31 Sep 6, 2019
@cockpituous
Copy link
Contributor

@cockpituous cockpituous changed the title WIP: 2-cockpit-9: [no-test] Fedora 31 Fedora 31 Sep 6, 2019
@martinpitt martinpitt added the blocked Don't land until something else happens first (see task list) label Sep 7, 2019
@martinpitt
Copy link
Member

I sent a fix for custom krb keytab in PR #12732. Adding "blocked" for that. Feel free to rope in the commit in the meantime if you wan to run tests on CI.

@martinpitt martinpitt removed the blocked Don't land until something else happens first (see task list) label Sep 9, 2019
@martinpitt
Copy link
Member

Unblocking. PR #12732 landed, so kerberos (check-realms) should work now.

@croissanne croissanne force-pushed the fedora-31 branch 2 times, most recently from bcf6494 to 8ce48a6 Compare September 9, 2019 12:25
Copy link
Member

@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, great work! Please do some squashing here, this should be by and large just two commits ("add fedora-31", and the image refresh), plus possibly the two unrelated changes (dashboard as "admin" user, and firewall test generalizations) unless you split them out.

bots/images/scripts/fedora.setup Show resolved Hide resolved
# https://github.com/cockpit-project/cockpit/issues/12670
if [ "$IMAGE" != fedora-31 ]; then
COCKPIT_DEPS="$COCKPIT_DEPS atomic docker"
fi
Copy link
Member

Choose a reason for hiding this comment

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

If that's a temporary hack, fine. If it's planned (or at least likely) that docker just won't be a thing any more in F31, then let's swap this around: Only add docker to fedora-30 (legacy mode).

docker build -t cockpit/base /var/tmp/cockpit-base
# HACK docker not available on f31
# https://github.com/cockpit-project/cockpit/issues/12670
if [ "$IMAGE" != fedora-31 ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Let's perhaps make this if type docker >/dev/null 2>&1, as long as it's not yet clear which relelases docker will end up on in the long run. Or something similar to $HAVE_KUBERNETES?

bots/images/scripts/fedora.setup Show resolved Hide resolved
@@ -91,6 +92,9 @@ else
echo '====== skipping rpmlint check, not installed ====='
fi
EOF
chmod +x /tmp/rpmlint
su builder -c "/usr/bin/mock --offline --copyin /tmp/rpmlint /var/tmp/rpmlint"
su builder -c "/usr/bin/mock --offline --shell /var/tmp/rpmlint"
Copy link
Member

Choose a reason for hiding this comment

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

Can you please split this out into a separate commit (or even PR) with a more detailled explanation?

@@ -634,7 +634,7 @@ bastion hosts, and a basic dashboard.
%endif

%ifarch x86_64 %{arm} aarch64 ppc64le i686 s390x
%if 0%{?fedora}
%if 0%{?fedora} && 0%{?fedora} <= 30
Copy link
Member

Choose a reason for hiding this comment

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

Not sure why this is in the "docker: Skip docker tests on fedora-31" and the previous "add fedora-31" commit. (github web UI bug?). Either way, this commit should be squashed into the "add fedora-31 image" commit.

bots/naughty/fedora-31/10038-abrtd-crash-fn-2 Show resolved Hide resolved
@@ -34,6 +34,12 @@ def wait_unit_state(machine, unit, state):

wait(lambda: active_state(unit) == state, delay=0.2)

def get_active_rules(machine):
Copy link
Member

Choose a reason for hiding this comment

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

Most of this commit looks like it could go into a separate PR and be landed first, as it's some generalization? Then the "add fedora-31" main commit can just add the "fedora-31" special cases to the lists.

@@ -0,0 +1,3 @@
File "test/verify/check-realms", line *, in *
self.assertIn("HTTP/1.1 200 OK", output)
AssertionError: 'HTTP/1.1 200 OK' not found in 'HTTP/1.1 401*
Copy link
Member

Choose a reason for hiding this comment

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

This should be fixed properly now in master, and can be dropped.

@@ -94,7 +94,7 @@ class TestBasicDashboard(MachineCase, DashBoardHelpers):

# Start second browser and check that it is in sync
b2 = self.new_browser()
b2.default_user = "root"
b2.default_user = "admin"
Copy link
Member

Choose a reason for hiding this comment

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

This could also be split out and landed separately. (If it helps, then you don't need to run the entire set of tests for this PR)

@martinpitt
Copy link
Member

This now conflicts after PR #12735, sorry.

@croissanne croissanne removed needs-rebase needswork no-test For doc/workflow changes, or experiments which don't need a full CI run, labels Sep 11, 2019
Copy link
Member

@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.

Some nitpicks still, but looking really good now!

bots/images/scripts/fedora.setup Show resolved Hide resolved
bots/images/scripts/fedora.setup Show resolved Hide resolved
bots/images/scripts/fedora.setup Outdated Show resolved Hide resolved
croissanne and others added 2 commits September 11, 2019 12:59
It's currently unclear whether or not docker will make it to
fedora-31, so we can't run docker tests for now.
Copy link
Member

@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! Still needs a Closes #, although it's also fine to just squash the two commits.

@croissanne croissanne merged commit 9eb7ce7 into cockpit-project:master Sep 11, 2019
@croissanne croissanne deleted the fedora-31 branch September 23, 2019 19:20
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.

4 participants