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
ejabberd: 20.03 -> 20.04 #90462
Conversation
The test (in |
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
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. |
Ah, that's a different unrelated failure. Which might be fixed by a sleep in there, yes. 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. |
Hey! The test does not seems to enable I'm having a look at it. PS: Ofborg can now run the VM tests, you probably want to setup
|
After quite a bit of mud fighting with Ejabberd, I did not managed to setup In the meantime, I wrote a small patch allowing us to disable the I can't push anything to this branch, @iblech, could you apply the patch by running:
|
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.
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! |
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 [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. |
Hm, very interesting! First I just pushed Then regarding a more robust solution: I was under the impression that |
Hey Ingo,
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...
Systemd will consider the unit active once the ExecStartPre script has
been executed and until the ExecStart script is running.
Without any further tweaking, systemd won't know anything about the
internal state of the application. IE. whether the service finished its
initialization procedure and is able to process incoming requests. The
Erlang VM-based apps are well known for having a pretty long boot time,
that's probably the issue we're hitting here.
Perhaps the correct fix would actually amend the systemd unit to
create a placeholder cookie file before starting up ejabberd?
I don't think this is the solution we're looking for. I think we should
rather make sure the Ejabberd is indeed responsive before quering it.
I see two solutions here.
1. We accept the fact the service might take some time to boot and fail
to respond for a brief amount of time. In that case, we could replace
the server.succeed here [1] with wait_until_succeeds.
2. We create a ejabberd-wait-online oneshot service that'll be triggered
once the service gets online first. Something similar to [2]. You can
then wait for this unit in the test. The question then is what's the
condition to consider Ejabberd online. I can't really answer that :)
The solution 1 would be a nice way to fix the test. The solution 2 would
take that a step further and would create a new target you could
potentially use in some real world deployments; at the cost of being a
bit more costly to implement. I have no idea whether it worth the
trouble or not.
[1] https://github.com/NixOS/nixpkgs/blob/b20f9112d263e574672c004d6e2775d06ebb1fb7/nixos/tests/xmpp/ejabberd.nix#L255
[2] https://github.com/NixOS/nixpkgs/blob/b20f9112d263e574672c004d6e2775d06ebb1fb7/nixos/modules/system/boot/networkd.nix#L1207
|
20.07 is out now + the fix in #97526 seems nicer than just disabling upload. The other parts of this PR, e.g. the |
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
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)