kairen / maas-wakeonlan-driver

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

maas-wol.diff: No such file or directory #2

Closed keithkk closed 7 years ago

keithkk commented 7 years ago

After running the third command sudo patch -p1 -d ${PATCH_DIR} < maas-wol.diff I receive the following error:

-bash: maas-wol.diff: No such file or directory

I'm running MAAS version: 2.2.2 (6099-g8751f91-0ubuntu1~16.04.1)

I've installed and used this driver successfully in the past on different systems. I'm not sure if anything has changed though with recent stable MAAS releases that may be affecting things. Likewise, I could have messed something up as well.

I did try a few reboots between the preceding command PATCH_DIR="/usr/lib/python3/dist-packages/provisioningserver/" to see if that would help, but unfortunately I received the same error. I also tried running the above command as sudo just in case, but no luck. I also removed the ${PATCH_DIR} variable as a separate attempt and put the full directory in placed of it, but no luck either.

I'm fully updated and dist-upgraded on the latest stable release of Ubuntu Server 16.04:

$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial

I have MAAS running in a KVM virtual machine on one of my Dell PowerEdge servers. There are plenty of hardware resources available to the VM to rule that out. I've been running the current MAAS controller stable this way with Juju, Conjure-Up and up to a few hundred mixed VM, container, and hardware nodes at different times. I'm pretty familiar and comfortable with using these tools to think everything is solid on my setup part, but I may have overlooked something along the way that is now causing the issue.

If anything stands out, please let me know what may be best to look at as the possible culprit. I'm reverting back to my snapshot prior to running the above commands that error'd out. I can easily do the same thing again as needed to test.

Thanks for providing this tool and the support. Much appreciated!!!

kairen commented 7 years ago

@keithkk Thanks you for your reply. Just to make sure, I will test v2.2.2 tomorrow.

kairen commented 7 years ago

@keithkk To check you already into this repos dir, and retry it.

kairen commented 7 years ago

@keithkk I have been tested on v2.2.2 (6099-g8751f91-0ubuntu1~16.04.1), it can working.

keithkk commented 7 years ago

I tried again after apt update and apt dist-upgrade but I'm unfortunatly still running into the same issue. With wakeonlan already installed, this is what I'm running into:

keith@maas:~$ PATCH_DIR="/usr/lib/python3/dist-packages/provisioningserver/" keith@maas:~$ sudo patch -p1 -d ${PATCH_DIR} < maas-wol.diff -bash: maas-wol.diff: No such file or directory

Since it is working fine for you, I'm guessing it may be something with my configurations, environment, or settings. Any thoughts on how I could best troubleshoot?

I read through the patch man page here to try and better understand how the PATCH_DIR line in the instructions works since I haven't used that in the past, http://manpages.ubuntu.com/manpages/xenial/man1/patch.1.html

If you can, please walk me through what is taking place with the small amount of steps indicated in the instructions. There are only a few commands which keeps it simple, but I'll diagnose each element as deep as I can to figure out what is causing my issue. Without testing further just yet, it may simply be a permission issue that I'll check after posting this reply.

These are the two lines I'm focusing on since the first and fourth lines are self explanatory:

$ PATCH_DIR="/usr/lib/python3/dist-packages/provisioningserver/" $ sudo patch -p1 -d ${PATCH_DIR} < maas-wol.diff

Thanks!

keithkk commented 7 years ago

Thanks for confirming. I tried again after apt update and apt dist-upgrade but I'm unfortunatly still running into the same issue. With wakeonlan already installed, this is what I'm running into:

keith@maas:~$ PATCH_DIR="/usr/lib/python3/dist-packages/provisioningserver/" keith@maas:~$ sudo patch -p1 -d ${PATCH_DIR} < maas-wol.diff -bash: maas-wol.diff: No such file or directory

Since it is working fine for you, I'm guessing it may be something with my configurations, environment, or settings. Any thoughts on how I could best troubleshoot?

I read through the patch man page here to try and better understand how the PATCH_DIR line in the instructions works since I haven't used that in the past, http://manpages.ubuntu.com/manpages/xenial/man1/patch.1.html

If you can, please walk me through what is taking place with the small amount of steps indicated in the instructions. There are only a few commands which keeps it simple, but I'll diagnose each element as deep as I can to figure out what is causing my issue. Without testing further just yet, it may simply be a permission issue that I'll check after posting this reply.

keithkk commented 7 years ago

Sorry, I got a little click-happy and hit the close issue button when about to type this reply. I guess at this point though, I'll go ahead and close the issue since it's now working.

I figured out where I was held up and what was causing my issue. Based on some of my non-standard directory structures and storage configurations, by creating a folder and simply specifying the full path to the maas-wol.diff file, all seems to be good to go. Wake On LAN does show up in my power type options on the MAAS GUI, so this tells me things should be set. I wasn't able to get to that point previously. If anything is needed beyond this, I can update what will be needed on my server that would be separate than what is covered or required with this driver.

Just an FYI, this ended up being what I entered for the line 3 command in the instructions of the readme with keith as the user and this driver extracted in the .wakeonlan directory:

sudo patch -p1 -d ${PATCH_DIR} < /home/keith/.wakeonlan/MAAS-WoL-driver-master/maas-wol.diff

Thanks again for providing this and the support. I greatly appreciate it!!!