kairen / maas-wakeonlan-driver

Patch the WoL Driver in MAAS 2.2+
17 stars 19 forks source link

wakeonlan binary not working for me #1

Closed yosefrow closed 7 years ago

yosefrow commented 7 years ago

i used wakeonlan with format wakeonlan remote-mac and it didnt work. then i tried etherwake remote-mac and it worked. So i concluded your plugin didnt work because for some reason wakeonlan is not working with my remote machine.

I then tried replacing every instance of wakeonlan with etherwake in the patch and it still didnt work. So im clearly getting something wrong in configuration. Since I confirmed that the raw command etherwake remote-mac works 100% of the time

kairen commented 7 years ago

We can replace wakeonlan to etherwake as below, but wakeonlan can be performed successfully on my env.

        subprocess.call(["etherwake", context.get("power_mac")])
yosefrow commented 7 years ago

What version of maas are you running? I'm running 2.2.2

kairen commented 7 years ago

2.2.0 (bzr6054-0ubuntu1~16.04.1)

kairen commented 7 years ago

I try on v2.2.2 (6099-g8751f91-0ubuntu1~16.04.1), but I can work.

yosefrow commented 7 years ago

The problem was that maas must be used with etherwake to get it to work for me and etherwake require root perms

yosefrow commented 6 years ago

@kairen Thanks for all the great work you've done. if anyone complains of a similar problem to mine, where only etherwake works for them and not wakeonlan, you can point them to my fork. Feel free to integrate it into your own plugin as well.

basically the main difference as I said earlier is that etherwake requires root perms in my environment.

https://github.com/yosefrow/MAAS-WoL-driver