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

nixos/nebula: wait for start notification to prevent startup race #273878

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

numinit
Copy link
Contributor

@numinit numinit commented Dec 13, 2023

Description of changes

Support slackhq/nebula#929. Marks the service as started when the tunnel is up.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@numinit
Copy link
Contributor Author

numinit commented Dec 13, 2023

cc @Jaculabilis

@numinit numinit self-assigned this Dec 13, 2023
@numinit
Copy link
Contributor Author

numinit commented Dec 13, 2023

Enabled by #272581

Copy link
Contributor

@jian-lin jian-lin left a comment

Choose a reason for hiding this comment

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

LGTM

Can #273273 be reverted after we have this change?

@numinit
Copy link
Contributor Author

numinit commented Dec 13, 2023

@jian-lin I think #273273 is probably good to keep because it's defensive. We should wait for the service to be up -- yes, it may be redundant, but I'm not sure if it's redundant with respect to systemctl restart.

@jian-lin
Copy link
Contributor

yes, it may be redundant, but I'm not sure if it's redundant with respect to systemctl restart

It is indeed redundant. systemctl restart is systemctl stop followed by systemctl start according to man systemctl.

I think #273273 is probably good to keep because it's defensive.

I see #273273 as a workaround for an issue in the nebula service and this PR fixes that issue properly.

@NickCao NickCao merged commit 223b0a4 into NixOS:master Dec 13, 2023
22 checks passed
@NickCao
Copy link
Member

NickCao commented Dec 13, 2023

Should this be backported?

@numinit
Copy link
Contributor Author

numinit commented Dec 13, 2023

We will have to backport 1.8.0 as well.

@numinit
Copy link
Contributor Author

numinit commented Dec 13, 2023

I created #274087. Once it's merged I'll do a manual backport PR with all these changes, including Nebula 1.8 which adds the more predictable systemd service start behavior.

numinit pushed a commit to numinit/nixpkgs that referenced this pull request Dec 14, 2023
nixos/nebula: wait for start notification to prevent startup race
numinit pushed a commit to numinit/nixpkgs that referenced this pull request Dec 14, 2023
nixos/nebula: wait for start notification to prevent startup race
numinit pushed a commit to numinit/nixpkgs that referenced this pull request Dec 14, 2023
nixos/nebula: wait for start notification to prevent startup race
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.

4 participants