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

cockroachdb: fix license #88804

Merged

Conversation

anmonteiro
Copy link
Member

@anmonteiro anmonteiro commented May 24, 2020

Motivation for this change

https://www.cockroachlabs.com/docs/releases/v20.1.0.html

Note: also changes the license to BSL as per https://www.cockroachlabs.com/docs/v20.1/licensing-faqs.html

P.S.: I couldn't manage to run the tests on my machine, as qemu kept timing out starting the CRDB server. I did, however, try out the binary and start a server locally with ./result/bin/cockroach start --insecure and things appear to be functioning normally.

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.

@anmonteiro
Copy link
Member Author

Note: tests pass with the following patch, which I'm not sure I should apply?

diff --git a/nixos/tests/cockroachdb.nix b/nixos/tests/cockroachdb.nix
index d0cc5e19837..9ea271fb49e 100644
--- a/nixos/tests/cockroachdb.nix
+++ b/nixos/tests/cockroachdb.nix
@@ -92,9 +92,6 @@ let
 
       # Hold startup until Chrony has performed its first measurement (which
       # will probably result in a full timeskip, thanks to makestep)
-      systemd.services.cockroachdb.preStart = ''
-        ${pkgs.chrony}/bin/chronyc waitsync
-      '';
     };
 
 in import ./make-test-python.nix ({ pkgs, ...} : {

@flokli
Copy link
Contributor

flokli commented May 31, 2020

@anmonteiro it seems this was once necessary, as cockroachdb was very sensitive to slightly differing clocks. Did you read the long comment section in nixos/tests/cockroachdb.nix?

On master, I tried removing all the chrony parts and immediately was able to get nodes kicked out of the cluster:

clock synchronization error: this node is more than 500ms away from at least half of the known nodes (0 of 1 are within the offset)

I didn't try on your PR. Are you aware of any changes done in cockroachdb 20.x regarding that?

@anmonteiro
Copy link
Member Author

@flokli thanks for the suggestion. I just tried removing all the chrony parts and I do get the same behavior that you describe, suggesting nothing changed in CockroachDB v20.1.

Let me restate my comment in the original post that opened the PR, as it could probably be clearer: with the current test definitions, I'm suspicious that chronyc waitsync never finishes, which leads to a timeout starting up any CockroachDB node and therefore running the tests. Removing that preStart command made it work, and tests passed in that configuration.

I'm trying other alternative commands to make tests pass. In the meantime, I'm open to other suggestions.

@anmonteiro anmonteiro changed the title cockroachdb: 19.1.5 -> 20.1.0 cockroachdb: 19.1.5 -> 20.1.1 May 31, 2020
@anmonteiro
Copy link
Member Author

Ok, so some more investigation revealed that the chronyd service in the VM just doesn't start because it's missing /dev/ptp0 and there's a ConditionPathExists for /dev/ptp0.

It sounds like I just can't run the tests locally, so I'd appreciate someone trying it out. This setup is working for me locally, while I'm developing against CockroachDB, but I have admittedly not tried the multi-node setup.

@flokli
Copy link
Contributor

flokli commented May 31, 2020

@thoughtpolice can you give this a look, especially w.r.t. #51338?

@risicle
Copy link
Contributor

risicle commented Sep 7, 2020

This has been mostly superseded by a bump to 20.1.4. This now only adds the license change, which we're still missing.

@anmonteiro anmonteiro changed the title cockroachdb: 19.1.5 -> 20.1.1 cockroachdb: fix license Nov 15, 2020
@anmonteiro
Copy link
Member Author

I just rebased this on master, and now the diff only contains the license change.

@flokli
Copy link
Contributor

flokli commented Nov 15, 2020

This does not seem to be rebased, but merged - now containing 3 commits. Can you rebase this, so it's a single commit changing the license?

@anmonteiro
Copy link
Member Author

@flokli I just squashed the commits as you suggested.

@thoughtpolice thoughtpolice merged commit 213804c into NixOS:master Nov 16, 2020
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

5 participants