Linux Update Manager - Scheduling Updates

Support forums for the Habitat Automate plugin
Post Reply
otautomate
Posts: 2
Joined: Thu May 26, 2022 1:21 pm
1

Linux Update Manager - Scheduling Updates

Post by otautomate »

Hello,
We have Habitat and wanted to start leveraging it for Linux updates but it seems like we can only run them manually or by turning on Auto-update. We are looking for scheduling options, ideally on a monthly basis. We are a bit behind on the plugin version, but can anyone confirm if this functionality exists or is planned in the near future?

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Linux Update Manager - Scheduling Updates

Post by Cubert »

It does not exist, it checks nightly at midnight (automate time) and if set will send down commands to update.


This is something we can look to add.

otautomate
Posts: 2
Joined: Thu May 26, 2022 1:21 pm
1

Re: Linux Update Manager - Scheduling Updates

Post by otautomate »

Cubert,
We would definitely be interested in it, it is the one aspect that we are missing for being able to realistically manage linux patching. Is there any way we can encourage prioritizing this feature?
Thank you!
-M
A BitCoin or two? :)

All seriousness though, we have it added to our task list to expand in Habitat's Linux Manager which will get ported to LUM plugin once it has been field tested. I do not have a firm timeline currently for that but is will come to term soon.

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Linux Update Manager - Scheduling Updates

Post by Cubert »

We just released Habitat 1.0.1.26 which adds the new Linux Update Scheduler function to the global tool. Not to bad, request for feature under 20 days...

Habitat should auto update over the next 24 hours or you can manually update using link below.



https://delivery.shopifyapps.com/-/c76b ... c061cc8371


Here is what it looks like..


LUM_Update_Scheduler.png
LUM_Update_Scheduler.png (45.11 KiB) Viewed 1402 times

frankbe
Posts: 11
Joined: Thu Jun 13, 2019 2:48 pm
4

Re: Linux Update Manager - Scheduling Updates

Post by frankbe »

Hi,

nice feature, but i have two problems:

1. in the global screen, newly added linux VMs are not visible (20 out of 37)
2. Debian 10 and Debian 11 shows no Updates in the vm plugin page or vm plugin page

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Linux Update Manager - Scheduling Updates

Post by Cubert »

If linux agents are not showing up in the system then the Scan's SQL entry is failing or agent is not scanning.

To verify a scan is happening you should look at the agent console script logs and agent console command logs.

Verify that the LUM Maintenance Service script is being schedule on the agent in question, if so have a look at the script and command logs for the results of the scans.

You should see it attempt to add via SQL any packages it found.

If it fails to find and or add packages to database then it will not show in global list.


As for Debian, Same deal goes. If they show up in list but have no packages counts then in that case the scan did succeed but the data we received may have been null or 0. The script and command logs would let you see what the response was so we could better understand what Debian didn't like.

The second part to Debian is to make sure that APT is available to it as a package manager. Test that you can run "apt-get -v" at command line and that returns a 2.x.x number.

if not then make sure Apt is installed.

frankbe
Posts: 11
Joined: Thu Jun 13, 2019 2:48 pm
4

Re: Linux Update Manager - Scheduling Updates

Post by frankbe »

Thank you for the hint, i found the problem:

in Debian >=10 there's a translation for the messages in apt-get
so when we have LANG=de_DE.UTF-8 the output for apt-get --help is:
apt 2.2.4 (amd64)

"Aufruf: apt-get [Optionen] befehl"

but in your script you compare to

"apt-get [options] command"

I dit not check the whole script for language dependency, but for the command exist test you may use something like

command -v apt-get >\dev\null && echo 0 || echo 1

gives 0 if exits and 1 if not

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Linux Update Manager - Scheduling Updates

Post by Cubert »

Ah good to know, We could shorten that to look for "apt-get" which would result in the same thing. We just want to test that Apt-get works on host...

Post Reply

Return to “Habitat”