Patching a few Linux boxes
Patching a few Linux boxes
Can you please share the steps for us to be able to Patch few of the Linux servers using LUM as when we are clicking on Open Agent Console in LUM then it opens up the dashboard for the machine.
Can you please share the more details?
Can you please share the more details?
Re: Patching a few Linux boxes
I started to answer this question when I noted that our team had updated our Automate host recently and did not put LUM on the new host. So what better time to document a quick walk through to get plugin running, right? Well seems we have a few issues they have come up that has caused me to review the process we deploy to get data from agents and how it goes about updating agents.
So bare with me as I take a little time (24 hours) to revamp some functions and provide a little better view in to the agent updates.
I would like to see a list of packages available, the current version installed and the available version. Then I would also like to see a clear ability to push updates manually from main console.
There is already a manual update function under the agents console -> plugins -> Linux Update Manager.
So bare with me as I take a little time (24 hours) to revamp some functions and provide a little better view in to the agent updates.
I would like to see a list of packages available, the current version installed and the available version. Then I would also like to see a clear ability to push updates manually from main console.
There is already a manual update function under the agents console -> plugins -> Linux Update Manager.
Re: Patching a few Linux boxes
We have updated the Plugin Successfully which is 1.0.23
Please share the further steps
Please share the further steps
Re: Patching a few Linux boxes
Should be 1.0.25. Correct? This is the latest build.
Re: Patching a few Linux boxes
I just released build 1.0.26
Get build here:
https://delivery.shopifyapps.com/-/c496 ... 9b904a2348
In this build we correct an issue where (YUM) agents current versions and Available versions are switched under the agent plugins view.
This fix requires that the agent replaces the LUM.sh file. If after update and a full scan of the (YUM) agents the view remains the same and versions are swapped then you will need to manually remove the file and rerun scan. The scan will see the file is missing and will replace it with new file.
Simply open the agent console and select "Begin" to open menu strip, under tools will be run command, select this function. In newly made command window paste the following command to remove file.
You can also edit the LUM Maintenance Services script in the /scripts/maintenance/ script directory
Disable line 5 and enable line 7 will force the script to update on every run of script. This is fine but adds a few steps to script. Once your comfortable that all changes are made then you can revert your changes and speed up the script by 3 commands.
Green: Enable Function
Red: Disable Function
Get build here:
https://delivery.shopifyapps.com/-/c496 ... 9b904a2348
In this build we correct an issue where (YUM) agents current versions and Available versions are switched under the agent plugins view.
This fix requires that the agent replaces the LUM.sh file. If after update and a full scan of the (YUM) agents the view remains the same and versions are swapped then you will need to manually remove the file and rerun scan. The scan will see the file is missing and will replace it with new file.
Simply open the agent console and select "Begin" to open menu strip, under tools will be run command, select this function. In newly made command window paste the following command to remove file.
Code: Select all
rm -f /root/LUM/lum.sh
Disable line 5 and enable line 7 will force the script to update on every run of script. This is fine but adds a few steps to script. Once your comfortable that all changes are made then you can revert your changes and speed up the script by 3 commands.
Green: Enable Function
Red: Disable Function
Re: Patching a few Linux boxes
I just installed this plugin (build 1.0.26) and am running it for the first time. On one of my Linux systems it scans for updates fine, but on another one the LUM Maintenance Services script fails. Output shows
I tried disabling Step 5 and enabling Step 7 in the script to see if that would help, but same result on rescan. Any suggestions? I'm on Automate 2023.5, the working scan is running on Debian 11.0 and the failing scan on Debian 9.13.packages -> [sh: 1: /root/LUM/lum.sh: not found]
Re: Patching a few Linux boxes
Well the error says it cant find the file written in line 8.
So first test to see if line 6 actually created the directory "/root/LUM"
command line execute
Should list all items in the /root directory, see if LUM exists.
Next if LUM exists see if /root/LUM/LUM.sh exists
command line execute
If neither of these exist or only one exists then you have a permissions problem writing to that agent. Open up agent console and select to run command line tool.
Execute
and see what user you report as. It should be "root"
post findings here...
So first test to see if line 6 actually created the directory "/root/LUM"
command line execute
Code: Select all
ls -al /root
Next if LUM exists see if /root/LUM/LUM.sh exists
command line execute
Code: Select all
ls -al /root/LUM
Execute
Code: Select all
whoami
post findings here...
Re: Patching a few Linux boxes
Thanks @cubert, I ran the commands and verified the file does exist in the desired location. Output below:
Also to confirm, the commands above were run via Automate prompt, which runs as root:#ls -al /root
total 40
drwx------ 6 root root 4096 Jul 12 07:59 .
drwxr-xr-x 23 root root 4096 May 8 2019 ..
drwxrwxrwx 2 root root 4096 Aug 25 2020 apt-get
-rw------- 1 root root 447 Jul 11 14:13 .bash_history
-rw-r--r-- 1 root root 570 Jan 31 2010 .bashrc
drwx------ 3 root root 4096 Apr 30 2020 .cache
drwxr-xr-x 3 root root 4096 Jul 30 2020 .java
drwxr-xr-x 2 root root 4096 Jul 12 08:28 LUM
-rw-r--r-- 1 root root 148 Aug 17 2015 .profile
-rw-r--r-- 1 root root 180 May 8 2019 .wget-hsts
#ls -al /root/LUM
total 12
drwxr-xr-x 2 root root 4096 Jul 12 08:28 .
drwx------ 6 root root 4096 Jul 12 07:59 ..
-rwxrwxrwx 1 root root 2553 Jul 12 08:28 lum.sh
#whoami
root
Re: Patching a few Linux boxes
Hmm.
Then why would script report ([sh: 1: /root/LUM/lum.sh: not found]) is the lum.sh set as executable?
on line 22 we execute
If you run this on agent what is output?
Then why would script report ([sh: 1: /root/LUM/lum.sh: not found]) is the lum.sh set as executable?
on line 22 we execute
Code: Select all
/root/LUM/lum.sh SCAN
Re: Patching a few Linux boxes
Tried that and got the same result:Cubert wrote: ↑Mon Jul 17, 2023 1:13 pm Hmm.
Then why would script report ([sh: 1: /root/LUM/lum.sh: not found]) is the lum.sh set as executable?
on line 22 we execute
If you run this on agent what is output?Code: Select all
/root/LUM/lum.sh SCAN
#/root/LUM/lum.sh SCAN
sh: 1: /root/LUM/lum.sh: not found