Closed horus1963 closed 3 years ago
The case for "Active" in the NAGTOKEN variable has changed. "Active" is now 'active', so grep in the script is not locating the line that needs to change to "false". Hope this helps
NAGTOKEN="data.status.toLowerCase !== 'active'"
same issue here, the above fix didn't work on my install. Version 6.2-15
NAGTOKEN="data.status.toLowerCase() !== 'active'"
Yes, the above is correct, cyr123. Sorry about that. I somehow lost the parenthesis () in my copy and paste.
Hey all; I'm working on this now. I'd like to handle all of the cases we've seen since the Proxmox folks started making changes in PVE 6.2 rather than just patching current but I'll put some effort into getting it out ASAP.
In: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
line 448 - before Proxmox.Utils.API2Request (
add:
orig_cmd();
return;
Just to clarify for anyone who comes across this - to use the temporary fix as supplied by @mrees64028 and @cyr123, here is step-by-step to temporarily fix the issue until @foundObjects issued an official patch:
sed -i 's/NAGTOKEN="data.status !== \x27Active\x27"/NAGTOKEN="data.status.toLowerCase() !== \x27active\x27"/g' /usr/share/pve-nag-buster.sh
bash /usr/share/pve-nag-buster.sh
You will likely need to log out and close your browser. The next time you log in it should be working.
Just to clarify for anyone who comes across this - to use the temporary fix as supplied by @mrees64028 and @cyr123, here is step-by-step to temporarily fix the issue until @foundObjects issued an official patch:
Thanks, @pconwell ! Just wanted to note this worked on three Proxmox Servers running 6.3-2. @foundObjects Thanks again for all the work you put into this.
Followed @pconwell's instructions, but still not working for me, running 6.3-2.
@rati0nal what does your /usr/share/pve-nag-buster.sh
look like? Specifically the NAGTOKEN=
line.
@pconwell Just the line:
NAGTOKEN="data.status !== 'active'"
I an post the whole file if you like?
Once you apply the patch, the line should look like:
NAGTOKEN="data.status.toLowerCase() !== 'active'"
The original source should look like NAGTOKEN="data.status !== 'Active'"
(notice the uppercase A), which is what the patch looks for. If I had to speculate, you attempted to manually fix the file at some point and changed Active
to active
- but I'm totally guessing. Either way, either change active
back to Active
and rerun the patch OR just manually change the line to NAGTOKEN="data.status.toLowerCase() !== 'active'"
.
After the line is fixed via your preferred method, rerun the file with bash /usr/share/pve-nag-buster.sh
and you should be good to go.
@pconwell You're exactly right, I tried to fix it myself from an older thread. Changed it back to 'Active' and re-ran the patch and the nag has disappeared.
Thank you.
Back to not working again FYI. Latest patches on 6.3-3
I'm on 6.3-3 and it's still working for me. Did you make any manual changes to the various files?
https://link.crc.id.au/proxmox - look at the nag removal part.
I'm on 6.3-3 and it's still working for me. Did you make any manual changes to the various files?
Nope, no changes. At least none that I can recall that should have had an impact (just LXC config files and downloading templates from pveam).
Weird. Did a fresh install because of other reasons and it all seems good. Sorry about that.
Hey everyone, sorry for the extremely long wait on this. I've pushed the new patch for v6.3+ now.
I got sick of the massive breakfest that using sed gives - rewrite to use patch - which is much more flexible.... Also added some logic around systemctl
to make it work on Proxmox Mail Gateway too....
#!/bin/bash
cd /usr/share/javascript/proxmox-widget-toolkit/
cat << EOF | patch -p1 --forward --reject-file /dev/null
diff --git a/proxmoxlib.js.orig b/proxmoxlib.js
index 4245059..5083967 100644
--- a/proxmoxlib.js.orig
+++ b/proxmoxlib.js
@@ -457,6 +457,8 @@ utilities: {
},
checked_command: function(orig_cmd) {
+ orig_cmd();
+ return;
Proxmox.Utils.API2Request(
{
url: '/nodes/localhost/subscription',
EOF
if [ -f /usr/lib/systemd/system/pveproxy.service ]; then
systemctl restart pveproxy
fi
if [ -f /lib/systemd/system/pmgproxy.service ]; then
systemctl restart pmgproxy
fi
@CRCinAU Patch isn't a bad idea, I've thought about it before but with the previous token replacement patch was prone to the same breakage as sed.
Your method to skip the API subscription call is definitely better and should allow patch to fuzz that in even if the file changes a bit. I'll play around with this a bit and get it working, probably with an actual patch file living in /usr/share/proxmox-nagbuster/ or somewhere similar, and look at adding PMG and PBS support too.
Just wanted to update you that it stopped working in 6.2-15