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/salt: restart on config changes #48499

Merged
merged 3 commits into from Oct 30, 2018

Conversation

aneeshusa
Copy link
Contributor

Motivation for this change

Restart the Salt minion and master on config changes.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: salt

Partial log (click to expand)

copying path '/nix/store/9hs4kic935pdj85w4vnfmzhpx7wlrxd1-python2.7-backports_abc-0.5' from 'https://cache.nixos.org'...
copying path '/nix/store/rby9xsy0jqbkgja4mksbjj5m7x9i4d5w-python2.7-msgpack-0.5.6' from 'https://cache.nixos.org'...
copying path '/nix/store/6zckdzd0nn16sk7hcwrv9m35bx326nb3-python2.7-pycryptodome-3.6.6' from 'https://cache.nixos.org'...
copying path '/nix/store/iwgmgkv8ppyvirjaz1y25kz0l8x0hzxx-python2.7-singledispatch-3.4.0.3' from 'https://cache.nixos.org'...
copying path '/nix/store/1v2qw30vxfihxp2mz3v23ji90x7145v5-zeromq-3.2.5' from 'https://cache.nixos.org'...
copying path '/nix/store/ldrcxcnlp25s9vzy0mi0jdmr974mwdg4-python2.7-tornado-4.5.3' from 'https://cache.nixos.org'...
copying path '/nix/store/yd6pizjlc65wnnvzgry8jffi6x6sl77y-python2.7-pyzmq-17.1.2' from 'https://cache.nixos.org'...
copying path '/nix/store/vkfs0i8j9jk7b0y1n49ykraf49w0fqb4-python2.7-pycrypto-3.6.6' from 'https://cache.nixos.org'...
copying path '/nix/store/w4gx3lvm2k33wpk705qpcfbs17xdrcyn-salt-2018.3.2' from 'https://cache.nixos.org'...
/nix/store/w4gx3lvm2k33wpk705qpcfbs17xdrcyn-salt-2018.3.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: salt

Partial log (click to expand)

copying path '/nix/store/pwr2axcl11b3vx1l57i2pjqajhbbadvr-python2.7-msgpack-0.5.6' from 'https://cache.nixos.org'...
copying path '/nix/store/2bh882nzik3j4bza5fz4kivs8ayfy8c8-python2.7-py-1.5.4' from 'https://cache.nixos.org'...
copying path '/nix/store/9lmbrs3g4v02gj2azzvxwmx3jj2rzyxh-python2.7-pycryptodome-3.6.6' from 'https://cache.nixos.org'...
copying path '/nix/store/cy9g7dfkgyr6412yg6bm5a8wgcydn3c9-python2.7-singledispatch-3.4.0.3' from 'https://cache.nixos.org'...
copying path '/nix/store/qki0ymr28z52kfzlxllqr20j98s0g3wq-zeromq-3.2.5' from 'https://cache.nixos.org'...
copying path '/nix/store/c1diaxxw8pjg3w2in71ji9b1ic0yjdy1-python2.7-tornado-4.5.3' from 'https://cache.nixos.org'...
copying path '/nix/store/fh5ggc46cbr03agdymrrd76v3rz42ymh-python2.7-pyzmq-17.1.2' from 'https://cache.nixos.org'...
copying path '/nix/store/h6nl29297djh0l9fz030h4v0hs4md7dy-python2.7-pycrypto-3.6.6' from 'https://cache.nixos.org'...
copying path '/nix/store/gyp1ha7saxic99y4i43lc7v7jaffkjbi-salt-2018.3.2' from 'https://cache.nixos.org'...
/nix/store/gyp1ha7saxic99y4i43lc7v7jaffkjbi-salt-2018.3.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: salt

Partial log (click to expand)

copying path '/nix/store/x6hicldzj1wfw9j3shp0hyrf451ij7h6-python2.7-packaging-17.1' from 'https://cache.nixos.org'...
copying path '/nix/store/sblcwcdmfms8fbsfy8lzsc1lzm08yx3m-python2.7-tornado-4.5.3' from 'https://cache.nixos.org'...
copying path '/nix/store/17cqky2rv3jhlnkbqg9pkccrwhag0cmi-python2.7-cryptography-2.3.1-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/ip7dzwi1ql29mnb22266xklxcckqrlbs-python2.7-pyzmq-17.1.2' from 'https://cache.nixos.org'...
copying path '/nix/store/scgxqkppzrbg4blcfqfql8gslcrdym7y-python2.7-pyOpenSSL-18.0.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/8g3m3220jns733yv4iynxfadqn1a8ymk-python2.7-urllib3-1.23' from 'https://cache.nixos.org'...
copying path '/nix/store/8hn1gq9s3jmjbc4rr46qvgjy6m9ll8gw-python2.7-pycrypto-3.6.6' from 'https://cache.nixos.org'...
copying path '/nix/store/y6y2yfrw9fwyjs9fv9ssljpj68vqww3y-python2.7-requests-2.19.1-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/f4cislhbn2ws11xj3nz1pqh9yyhcpnia-salt-2018.3.2' from 'https://cache.nixos.org'...
/nix/store/f4cislhbn2ws11xj3nz1pqh9yyhcpnia-salt-2018.3.2

@Mic92 Mic92 changed the title Restart salt on config changes nixos/salt: restart on config changes Oct 19, 2018
@Mic92 Mic92 requested a review from andir October 19, 2018 08:15
Copy link
Member

@andir andir left a comment

Choose a reason for hiding this comment

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

It does look reasonable. I am not entirely sure why I am the right person to review. It has been almost 2y since I used salt-stack regulary :/ (cc @Mic92)

@Mic92
Copy link
Member

Mic92 commented Oct 30, 2018

@andir Then you have more experience then me. I only read other peoples configuration/documentation.

@andir
Copy link
Member

andir commented Oct 30, 2018

@Mic92 it looks fine to me thus the +1, I can not test it more then reading it and it reads fine. I guess the only way we could know is if any of us would be using Salt instead of Nix...

@aneeshusa Do you have some very basic configuration on how to test this? Could you write a nixos test so we can verify that it works in the future

@Mic92
Copy link
Member

Mic92 commented Oct 30, 2018

Should be fine:

sudo systemctl status salt-minion.service
● salt-minion.service - Salt Minion
   Loaded: loaded (/nix/store/gyibr8na6k3n44wa000c2d0ri6z3482i-unit-salt-minion.service/salt-minion.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-10-30 15:08:12 GMT; 30min ago
 Main PID: 11807 (.salt-minion-wr)
    Tasks: 4 (limit: 4915)
   Memory: 80.3M
   CGroup: /system.slice/salt-minion.service
           ├─11807 /nix/store/2brlr94ahy3a9mvcjy0qbqpv8zrb7b7s-python-2.7.15/bin/python2.7 /nix/store/v9jz3i2jlx72kqz55b5am7a7993bfznq-salt-2018.3.2/bin/.salt-minion-wrapped
           ├─11856 /nix/store/2brlr94ahy3a9mvcjy0qbqpv8zrb7b7s-python-2.7.15/bin/python2.7 /nix/store/v9jz3i2jlx72kqz55b5am7a7993bfznq-salt-2018.3.2/bin/.salt-minion-wrapped
           └─11858 /nix/store/2brlr94ahy3a9mvcjy0qbqpv8zrb7b7s-python-2.7.15/bin/python2.7 /nix/store/v9jz3i2jlx72kqz55b5am7a7993bfznq-salt-2018.3.2/bin/.salt-minion-wrapped

Oct 30 15:36:47 turingmachine salt-minion[11807]: [ERROR   ] DNS lookup or connection check of 'salt' failed.
Oct 30 15:36:47 turingmachine salt-minion[11807]: [ERROR   ] Master hostname: 'salt' not found or not responsive. Retrying in 30 seconds
Oct 30 15:37:17 turingmachine salt-minion[11807]: [ERROR   ] DNS lookup or connection check of 'salt' failed.
Oct 30 15:37:17 turingmachine salt-minion[11807]: [ERROR   ] Master hostname: 'salt' not found or not responsive. Retrying in 30 seconds
Oct 30 15:37:47 turingmachine salt-minion[11807]: [ERROR   ] DNS lookup or connection check of 'salt' failed.
Oct 30 15:37:47 turingmachine salt-minion[11807]: [ERROR   ] Master hostname: 'salt' not found or not responsive. Retrying in 30 seconds
Oct 30 15:38:17 turingmachine salt-minion[11807]: [ERROR   ] DNS lookup or connection check of 'salt' failed.
Oct 30 15:38:17 turingmachine salt-minion[11807]: [ERROR   ] Master hostname: 'salt' not found or not responsive. Retrying in 30 seconds
Oct 30 15:38:47 turingmachine salt-minion[11807]: [ERROR   ] DNS lookup or connection check of 'salt' failed.
Oct 30 15:38:47 turingmachine salt-minion[11807]: [ERROR   ] Master hostname: 'salt' not found or not responsive. Retrying in 30 seconds

@Mic92 Mic92 merged commit 6c7ec02 into NixOS:master Oct 30, 2018
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