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

ejabberd: 20.03 -> 20.04 #90462

Closed
wants to merge 3 commits into from
Closed

ejabberd: 20.03 -> 20.04 #90462

wants to merge 3 commits into from

Conversation

iblech
Copy link
Contributor

@iblech iblech commented Jun 15, 2020

Motivation for this change

This is a simple version bump. "In addition to various bugfixes and improvements, this release massively improves audio and video calls support."

I have the new version deployed here and it works fine, but I just started hosting my own xmpp server yesterday so am not really qualified to judge.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ajs124
Copy link
Member

ajs124 commented Jun 15, 2020

The test (in nixos/tests/xmpp/ejabberd.nix) doesn't seem to work anymore, but that's true on master with or without this PR.
So if you want to fix it, that would be really cool. We can probably merge this either way.

@iblech
Copy link
Contributor Author

iblech commented Jun 15, 2020

Thank you for your feedback and for pointing me to the failing test (for any onlookers, here is the log of the failing test). :-) I had a quick look. The test looks reasonable enough and I cannot really fathom why it should fail.

Perhaps it's just because ejabberd is too slow to create the .erlang.cookie file? If so, we should give it some more slack by adding directly after line 253 of the test the following instruction:

server.sleep(15)

Unfortunately I cannot test this proposal, as I don't have access to any machine on which the flavor of qemu used by the test suite works.

@ajs124
Copy link
Member

ajs124 commented Jun 15, 2020

Ah, that's a different unrelated failure. Which might be fixed by a sleep in there, yes.
What I'm talking about is the client failing like this.

What's weird is that it works in the prosody test, which calls the exact same client code.

Aha! 8aea528 is probably at fault then. The test works again when reverting it at least. @NinjaTrappeur could you maybe look into this? Seems like the ejabberd test might not be configured for some of the features this is trying to test now.

@picnoir
Copy link
Member

picnoir commented Jun 17, 2020

Hey!

The test does not seems to enable mod_disco nor mod_upload_http. The issue is coming from there.

I'm having a look at it.

PS: Ofborg can now run the VM tests, you probably want to setup passthru.tests for this package to let the CI run those. It'll be simpler to see stuff breaking in the future. See

@picnoir
Copy link
Member

picnoir commented Jun 17, 2020

After quite a bit of mud fighting with Ejabberd, I did not managed to setup mod_upload_http for this test. I suspect we'd need a proper TLS setup for the test. I'm not 100% sure about that though, the logs are pretty scarce. I guess somebody actually using Ejabbered would be a better candidate to fix that: I never used this software.

In the meantime, I wrote a small patch allowing us to disable the http_upload check for the Ejabbered test. I took advantage of this to add the passthru attribute I was talking about in the previous post.

I can't push anything to this branch, @iblech, could you apply the patch by running:

curl "https://github.com/NinjaTrappeur/nixpkgs/commit/deb1bcf3b221d2e626085b36d7da7e4647880448.patch" | git am

We're adding a flag to xmpp-sendmessage to disable the mod_http_upload
check to let ejabberd use this script with its current configuration.

The current Ejabberd test config does not set up a http_upload
endpoint. Configuring such a endpoint would probably require us to
create a proper TLS setup for the test.

This is not an ideal solution, but at least it'll let us run some
basic test on Ejabberd. Ideally, we should properly setup a
http_upload endpoint in the Ejabberd test to keep it on par with the
prosody one.

We're also pointing passthru.tests to the NixOS VM test to let the
Nixpkgs CI run the test on each Ejabberd update.
@iblech
Copy link
Contributor Author

iblech commented Jun 17, 2020

Thanks to both of you for picking up this issue! :-) NinjaTrappeur, I applied your patch, thanks for the taking the effort and making it extra-convenient for me!

@picnoir
Copy link
Member

picnoir commented Jun 17, 2020

You're welcome :)

Interesting, looks like ofborg is experiencing the same cookie issue you were seeing on hydra: https://logs.nix.ci/?key=nixos/nixpkgs.90462&attempt_id=4491813c-4b62-4904-8daf-4cf3ef7ec73e. That's weird, I do not experience that on my machine.

You can now run the test on ofborg by pushing to this branch (see the ejabberd.passthru.tests check), I'll let you find a workaround for that :)

[Edit]: the ARM test succeeded: https://github.com/NixOS/nixpkgs/pull/90462/checks?check_run_id=782114907. Looks like a flakiness issue. You're probably right regarding the delay.

Question: do we have a way to trigger a systemd target when the service is ready to receive some requests? That'll be a better fix as it would make sure we won't be subject to any flakyness in the future, regardless of the service boot time.

@iblech
Copy link
Contributor Author

iblech commented Jun 17, 2020

Hm, very interesting!

First I just pushed sleep(15), to see whether this actually makes the issue go away.

Then regarding a more robust solution: I was under the impression that wait_for_unit waits till the unit is in "active" state. But apparently ejabberd creates the cookie file only after systemd believes the unit to be active... Perhaps the correct fix would actually amend the systemd unit to create a placeholder cookie file before starting up ejabberd?

@picnoir
Copy link
Member

picnoir commented Jun 18, 2020 via email

@ajs124 ajs124 mentioned this pull request Sep 9, 2020
10 tasks
@ajs124
Copy link
Member

ajs124 commented Sep 9, 2020

20.07 is out now + the fix in #97526 seems nicer than just disabling upload. The other parts of this PR, e.g. the passthru.tests and bump are still relevant, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants