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 home-assistant: a couple of fixes #36338

Merged
merged 2 commits into from Mar 18, 2018
Merged

Conversation

peterhoeg
Copy link
Member

Motivation for this change

a) set path to /run/wrappers so ping works (what gets added is /run/wrappers/{bin,sbin})
b) restart if the configuration file changes
c) run via a target so we can easily inject other components (config copier, appdaemon)

Cc: @dotlambda

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

configFile
];
path = [
"/run/wrappers"
Copy link
Member

Choose a reason for hiding this comment

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

Can you mention ping here?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@@ -121,6 +120,19 @@ in {
ReadWritePaths = "${cfg.configDir}";
PrivateTmp = true;
};
restartTriggers = [
configFile
Copy link
Member

Choose a reason for hiding this comment

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

Good catch!

Copy link
Member

Choose a reason for hiding this comment

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

Actually, thinking about it, shouldn't this be unnecessary becasue configFile is mentioned in preStart?

Copy link
Member

Choose a reason for hiding this comment

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

Yes. It should be unnecessary, since preStart is regenerated if cfg.config changes.

@dotlambda
Copy link
Member

Can you rebase on staging so we can run the test?

@peterhoeg
Copy link
Member Author

I've run the test locally against unstable (with the pytest-mock upgrade reverted), which was fine, but of course we can try against staging.

a) set path to /run/wrappers so ping works
b) restart if the configuration file changes
c) run via a target so we can easily inject other components (config copier,
appdaemon)
@peterhoeg
Copy link
Member Author

Ehhh...... What the what? Rebasing against staging didn't exactly go as planned...

@dotlambda
Copy link
Member

@peterhoeg I have rebased. We can wait with merging until the pytest-mock fix is in master.

@GrahamcOfBorg test home-assistant

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

cannot build derivation '/nix/store/az1ss83szq492hym0dkq2hd4fv0lx1lv-user-units.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/pq9cz2p1sn4skg1d89vj1awh69613fzs-system-units.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/h3li50g2q81h5h4fhgi1cfb07x8w7mym-etc.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/yxmn6yk5yvcxnblsp1445j48f31xf4g0-nixos-system-hass-18.03.git.9b261bb.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/bjifxkw9jsvzsqkmgi6vj7h0dpqd1v19-closure-info.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/1l8hd6s30pja7yrc8akbrk1g5r3wbl83-run-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/x9kgf39wnrcs5b7knbhy8s1k0qvgs1q0-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/ar2gnzqh8mz0gkyp9hjix1jmgnxd8yc7-nixos-test-driver-home-assistant.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/1llryqh1xmdndgf242y75sn37zbqny48-vm-test-run-home-assistant.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/1llryqh1xmdndgf242y75sn37zbqny48-vm-test-run-home-assistant.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

cannot build derivation ‘/nix/store/23q3zswz08ir5n5bj91i4q400im5nqb3-system-units.drv’: 6 dependencies couldn't be built
cannot build derivation ‘/nix/store/vfii6wdcmmkxbhwhjhk4wwfivawmhl74-user-units.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/pi9i6nh44hv2qh6c35hnlpb1fywgzdwp-etc.drv’: 7 dependencies couldn't be built
cannot build derivation ‘/nix/store/6nbx71ajg5z3z7k2qa9f14rmg8dx0vks-nixos-system-hass-18.03.git.c3b6b9d.drv’: 9 dependencies couldn't be built
cannot build derivation ‘/nix/store/cc85478xrkakhgv7vxn2zzcldq2s2f8g-closure-info.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/1qv7kzd0pgkvi2j1ircww08hr4q83mp1-run-nixos-vm.drv’: 3 dependencies couldn't be built
cannot build derivation ‘/nix/store/j42v9vq5hmm6lxfhm362l1lh64isn8zp-nixos-vm.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/33ac1mzsrnalq02dq167ylskl7v741jj-nixos-test-driver-home-assistant.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/52wq9r9brmk7815zv0ci4bij2dgp46ba-vm-test-run-home-assistant.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/52wq9r9brmk7815zv0ci4bij2dgp46ba-vm-test-run-home-assistant.drv’ failed

@dotlambda
Copy link
Member

I don't know why ofborg failed. I tested locally and it works fine.

@dotlambda
Copy link
Member

@GrahamcOfBorg test home-assistant

@dotlambda dotlambda changed the base branch from staging to master March 18, 2018 10:19
@dotlambda
Copy link
Member

@GrahamcOfBorg test home-assistant

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: tests.home-assistant

Partial log (click to expand)

cleaning up
killing hass (pid 627)

### home-assistant.log ###
2018-03-18 10:58:05 WARNING (MainThread) [homeassistant.bootstrap] Skipping pip installation of required modules. This may cause issues
2018-03-18 10:58:15 WARNING (MainThread) [hbmqtt.mqtt.protocol.handler] BrokerProtocolHandler Unhandled exception in reader coro: IncompleteReadError('0 bytes read on a total of 1 expected bytes',)

vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/mqs28imh38jz0msji5jdx5mibgakb5km-vm-test-run-home-assistant

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.home-assistant

Partial log (click to expand)

cleaning up
killing hass (pid 593)

### home-assistant.log ###
2018-03-18 11:44:39 WARNING (MainThread) [homeassistant.bootstrap] Skipping pip installation of required modules. This may cause issues
2018-03-18 11:44:48 WARNING (MainThread) [hbmqtt.mqtt.protocol.handler] BrokerProtocolHandler Unhandled exception in reader coro: IncompleteReadError('0 bytes read on a total of 1 expected bytes',)

vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/87zl7v2qhc3bimbjaivrawbxg767v46b-vm-test-run-home-assistant

@dotlambda dotlambda merged commit 2859483 into NixOS:master Mar 18, 2018
@dotlambda
Copy link
Member

@peterhoeg Feel free to backport to 18.03.

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: tests.home-assistant

Partial log (click to expand)

cannot build derivation '/nix/store/60kx0617ci48yw7yk24rv90ij8l9qdvy-user-units.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/bwb0c5lsf2sbzbw1n7r54r97yqsca6mh-system-units.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/sj5dxx4pp76hr161w7bsab65vvy57jdq-etc.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/l4150l1hjc91fd49wbzyci1cyllzp94i-nixos-system-hass-18.09.git.f9f4a0d.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/kfmdnwwv17v8897y47n28zqcj3bc7fgh-closure-info.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/kybl9g1sscnhm5yhcchnk0077ba16qb2-run-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/1r5hvfyss8lncb8fgs826aayv6v65w9y-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/gxd8h6r8ghkwa4dp2fxswp5kqbf0dj8s-nixos-test-driver-home-assistant.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/sk5mhd8l0qf0qf3wbvi2chv5vz9lm7rh-vm-test-run-home-assistant.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/sk5mhd8l0qf0qf3wbvi2chv5vz9lm7rh-vm-test-run-home-assistant.drv' failed

peterhoeg added a commit that referenced this pull request Mar 18, 2018
a) set path to /run/wrappers so ping works
b) run via a target so we can easily inject other components (config copier,
appdaemon)

(cherry picked from commit 2859483)
@peterhoeg peterhoeg deleted the f/hass branch March 18, 2018 15:44
@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: tests.home-assistant

Partial log (click to expand)

building path(s) ‘/nix/store/fgngibgsw9ghnvmmqam17ndc4i05dflk-unit-udisks2.service’
cannot build derivation ‘/nix/store/z8r37d2ivl09shg8fsyn4yisdgcv53ca-system-units.drv’: 3 dependencies couldn't be built
cannot build derivation ‘/nix/store/7xs56nl0dkc92vqgmc6hxl66i8xzchgz-etc.drv’: 4 dependencies couldn't be built
cannot build derivation ‘/nix/store/rdvbyrcwk9xy1jng9rg8alb3vc269s0v-nixos-system-hass-18.09.git.a13e4ff.drv’: 3 dependencies couldn't be built
cannot build derivation ‘/nix/store/2i0ffw4knc8ahlirnjhx6y0canhp9cph-closure-info.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/3yf8rizziv0f3420l83xgg3d24hw5jfr-run-nixos-vm.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/kckfcabqy3r0w9b05zxp3bb3bdzqqgbn-nixos-vm.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/l0ypz42cwypba8ahdmn51ips8snh30z1-nixos-test-driver-home-assistant.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/yir3pfn8mvr5smrdr36acb64h0jvgniz-vm-test-run-home-assistant.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/yir3pfn8mvr5smrdr36acb64h0jvgniz-vm-test-run-home-assistant.drv’ failed

@peterhoeg peterhoeg restored the f/hass branch March 18, 2018 16:24
@peterhoeg peterhoeg deleted the f/hass branch March 19, 2018 01:11
@peterhoeg peterhoeg restored the f/hass branch March 19, 2018 01:42
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