Hello
i posted this already, maybe in the wrong forum.
The Habitat Linux Update Manager shows no Updates in the List window:
http://support.plugins4labtech.com/view ... 8841#p8841
Can I have support for this issue ?
Habitat Linux Update Manager shows no Updates
Re: Habitat Linux Update Manager shows no Updates
Yeap, You in the correct forums for Habitat Tools.
Lets see what we can do for you.
I haven't personally done a Debian agent myself but should be similar to Ubuntu, using Apt-Get as its package manager.
If you open the SQL analyzer in Habitat and execute (with the checkbox checked to return data) the following. Replace the Your ID here with the agent ID of the Linux box in question.
If you get status data but no package data then these updates maybe considered optional or feature updates and may not be included in package view.
The "Habitat LUM Maintenance Service" manages the collection of packages available on each agent. When the Automation calls for Update scans it calls a function in this script that starts a "list packages available for update" scan and imports that data into Automate. The view you posted should display those packages.
The script uses a small Python script to query Apt-Get for the package data and package counts. You can see this script being scheduled on you Debian agent daily. By following the script logs and the commands executed by script in the commands log you can see what was sent to agent and what agent returned. If the data is missing here then the agent is not reporting these packages. If the data appears in the database but not in plugin then we have something broken and I'll need to look at the code base to see what might be going on.
Lets see what we can do for you.
I haven't personally done a Debian agent myself but should be similar to Ubuntu, using Apt-Get as its package manager.
If you open the SQL analyzer in Habitat and execute (with the checkbox checked to return data) the following. Replace the Your ID here with the agent ID of the Linux box in question.
andSELECT * FROM plugin_p4a_habitat_lum_status WHERE ComputerID = 'Your ID Here';
To see if they spit out any package data.SELECT * FROM plugin_p4a_habitat_lum_packages WHERE ComputerID = 'Your ID Here';
If you get status data but no package data then these updates maybe considered optional or feature updates and may not be included in package view.
The "Habitat LUM Maintenance Service" manages the collection of packages available on each agent. When the Automation calls for Update scans it calls a function in this script that starts a "list packages available for update" scan and imports that data into Automate. The view you posted should display those packages.
The script uses a small Python script to query Apt-Get for the package data and package counts. You can see this script being scheduled on you Debian agent daily. By following the script logs and the commands executed by script in the commands log you can see what was sent to agent and what agent returned. If the data is missing here then the agent is not reporting these packages. If the data appears in the database but not in plugin then we have something broken and I'll need to look at the code base to see what might be going on.
Re: Habitat Linux Update Manager shows no Updates
Hi,
the first query returns the total_updates
the second query on the same Computer is empty
The Script is LUM maintenance Service
Can i start the script with debug ? What is the first variable mycmd ?
the first query returns the total_updates
the second query on the same Computer is empty
The Script is LUM maintenance Service
Can i start the script with debug ? What is the first variable mycmd ?
Re: Habitat Linux Update Manager shows no Updates
the MYCMD variable is used by Habitat to control what parts of the script get run. Its a means to select functions out of the script instead of running each and every line.
So if MYCMD = UPGRADE then it run the entire Then statement section. If MYCMD = anything else it goes to the else section where we test it further to see if it equals a given command value. In this case we are looking for SCAN, if it is set as MYCMD then we will seek out the scan function in the else statement and execute till the next exit script function.
This allows us to have 1 script but many functions we can call.
You do not need debug, what you need is to view the script and command output logs in the agent console for the time stamps that the script is running. The script should log some data and the executing commands on agent will log the commands return so you can see the raw output from any command execution.
Sounds like it is not getting package list back correctly from agent. We need to see what was returned during this scan.
So if MYCMD = UPGRADE then it run the entire Then statement section. If MYCMD = anything else it goes to the else section where we test it further to see if it equals a given command value. In this case we are looking for SCAN, if it is set as MYCMD then we will seek out the scan function in the else statement and execute till the next exit script function.
This allows us to have 1 script but many functions we can call.
You do not need debug, what you need is to view the script and command output logs in the agent console for the time stamps that the script is running. The script should log some data and the executing commands on agent will log the commands return so you can see the raw output from any command execution.
Sounds like it is not getting package list back correctly from agent. We need to see what was returned during this scan.
Re: Habitat Linux Update Manager shows no Updates
i'm not sure what agent console is - where exactly do i look for the commands output ?
Re: Habitat Linux Update Manager shows no Updates
Actually do not bother, I believe I found the issue.
It appears that ConnectWise may have updated the Shell and other script commands functions where now we get execution of a shell but no returns. So if you run in enhanced shell cat /etc/hosts it will no longer return the file output but now just returns "OK" .
So when we try to test to see if execution produced the correct file we get "OK" instead.
I have corrected this in the next build due out ASAP (next 24 to 48hr.) Should be Habitat build 1.0.1.14. We also tweaked the UI a little bit to make it a bit nicer. Here is a sample of the new layout and working collections.
It appears that ConnectWise may have updated the Shell and other script commands functions where now we get execution of a shell but no returns. So if you run in enhanced shell cat /etc/hosts it will no longer return the file output but now just returns "OK" .
So when we try to test to see if execution produced the correct file we get "OK" instead.
I have corrected this in the next build due out ASAP (next 24 to 48hr.) Should be Habitat build 1.0.1.14. We also tweaked the UI a little bit to make it a bit nicer. Here is a sample of the new layout and working collections.
Re: Habitat Linux Update Manager shows no Updates
Great, thank you - looking forward for the new version
But Can you explain where to look at agent console ? It might be useful for other problems .
But Can you explain where to look at agent console ? It might be useful for other problems .
Re: Habitat Linux Update Manager shows no Updates
This is the agent console and you should select the gear and then select either commands or scripts to see the logs for either. This is the heart of how to see and troubleshoot automation tasks.
Re: Habitat Linux Update Manager shows no Updates
ok, thank you - i know this place but log is only
No results were returned, exiting script-> [OK]
I thought there's a more detailed log
No results were returned, exiting script-> [OK]
I thought there's a more detailed log
Re: Habitat Linux Update Manager shows no Updates
Sometime silence speaks volumes!
The fact you received an "OK" actually tells us that the command returned NULL. A NULL value from a command cause Automate to display "OK". If the value was just blank it would be a blank return or if any data or errors exist it should be that.
OK tells us that most likely the command failed to execute at all which is what we started seeing here. The script function called was read file from agent. This should of returned either file not found or file contents but it returned OK instead. So it saw the file but failed to read it. That's an Automate issue and not the plugin. We had to rewrite the script to call different commands before we were able to start retrieving the files again.
So sometimes an OK means so much more if your able to read between the O and the K.
The fact you received an "OK" actually tells us that the command returned NULL. A NULL value from a command cause Automate to display "OK". If the value was just blank it would be a blank return or if any data or errors exist it should be that.
OK tells us that most likely the command failed to execute at all which is what we started seeing here. The script function called was read file from agent. This should of returned either file not found or file contents but it returned OK instead. So it saw the file but failed to read it. That's an Automate issue and not the plugin. We had to rewrite the script to call different commands before we were able to start retrieving the files again.
So sometimes an OK means so much more if your able to read between the O and the K.