C4A groups no populating

This forum is for the discussions and support for the Chocolatey For Automate plugin. Inside you will find the Documentation Project forum that describes the operation of the plugin.
revero2749
Posts: 8
Joined: Thu May 16, 2024 3:30 pm

C4A groups no populating

Post by revero2749 »

I just need to check if this could be an issue

The only group that is populating is C4A Deploy Chocolatey and I am able to open the autojoin search attached to it
All 4 of the other groups does not seem to populate and when trying to open the autojoin searches, automate is unable to read the searches at all

Is this by design?

What led me to this is that I found that enabling to use sources does not update the agent sources, And I have added a repo in the global plugin dashboard, so I investigated and found that but not sure if its by design

It also appears that chocolatey is failing to install\upgrade on the enabled agents
We have a server with chocolatey 0.10.15 on it,and the deploy chocolatey script detects that and markes it as installed.Granted,I dont think we have the chocolatey apps set to approved\active currently,which could explain why its not updating

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

Re: C4A groups no populating

Post by Cubert »

Make sure you on lates version 3.6.0.11,

Next, it sounds like your install of Chocolatey failed to couple the groups with their search scripts and maybe even the scheduled script tasks.

This is a problem and will prevent services from working and is not by design. Automate likes tossing us curve balls all the time so it maybe a one off fluke or a sign of some other issue we have not seen yet. If it happens again then let us know so we can start tracking the issue.


Anyhow, You will need to fix the associations between each group and its search and scheduled script functions. Each Group has a particular search and script it executes. These must be there for operations to work as expected. It they are missing are easily fixed by the following.

Open each group and check the search to match the search provided in images below for each group. Then select the computers tab in the same group and then the Scheduled scripts sub tab. There should be a single scheduled script in the scheduled scripts list. If not use the tool above the list to locate this script by name and then schedule it as you see fit. You can choose our default settings (see image) or choose a different schedule based on the needs of your environment.

Save each group after edits and you should be good to go.


The Main Chocolate For Automate Group

Screenshot 2024-05-17 124707.png
Screenshot 2024-05-17 124707.png (16.13 KiB) Viewed 848 times
Screenshot 2024-05-17 124841.png
Screenshot 2024-05-17 124841.png (44.02 KiB) Viewed 848 times



C4A Auto Install Approved Applications

Screenshot 2024-05-17 125021.png
Screenshot 2024-05-17 125021.png (26.21 KiB) Viewed 848 times
Screenshot 2024-05-17 125056.png
Screenshot 2024-05-17 125056.png (43.67 KiB) Viewed 848 times



C4A Deploy Chocolatey

Screenshot 2024-05-17 125258.png
Screenshot 2024-05-17 125258.png (27.58 KiB) Viewed 848 times
Screenshot 2024-05-17 125327.png
Screenshot 2024-05-17 125327.png (44.84 KiB) Viewed 848 times



C4A Manage Sources

Screenshot 2024-05-17 125457.png
Screenshot 2024-05-17 125457.png (24.43 KiB) Viewed 848 times
Screenshot 2024-05-17 125538.png
Screenshot 2024-05-17 125538.png (44.5 KiB) Viewed 848 times



C4A Manage UNC Caches

Screenshot 2024-05-17 125702.png
Screenshot 2024-05-17 125702.png (23.68 KiB) Viewed 848 times
Screenshot 2024-05-17 125753.png
Screenshot 2024-05-17 125753.png (43.32 KiB) Viewed 848 times



C4A Manage UNC Sources

Screenshot 2024-05-17 125920.png
Screenshot 2024-05-17 125920.png (23.61 KiB) Viewed 848 times
Screenshot 2024-05-17 125955.png
Screenshot 2024-05-17 125955.png (43.26 KiB) Viewed 848 times

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

Re: C4A groups no populating

Post by Cubert »

Also let us know if any of the searches or scripts are not where images show they should be in the folder structure for searches and scripts.

revero2749
Posts: 8
Joined: Thu May 16, 2024 3:30 pm

Re: C4A groups no populating

Post by revero2749 »

Thank you for you response and assistance

The groups are there and the scripts and searches are set up as you indicated too
The searches are in the correct location aswell, but if I go directly to the search and try to open it, automate throws out an error like it is unable to read the search to give me the details.Almost like the search was created on plugin install,but no contents are in them or something

I was thinking of just removing those searches that are "corrupt" and recreate them manually and attach to the groups,but I wont have them exactly the same way as they are supposed to be,which is why I am hesitant to do so

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

Re: C4A groups no populating

Post by Cubert »

You should be able to remove all bad searches, restart the DBagent and it will create the missing searches from scratch again. Same for scripts and groups

You may need to re associate them to groups afterwards, but they should rebuild.

revero2749
Posts: 8
Joined: Thu May 16, 2024 3:30 pm

Re: C4A groups no populating

Post by revero2749 »

I removed the searches from the linked groups then deleted the searches that were unreadable

They have been recreated,but still not able to open them

I think we will need to completely remove the plugin,scripts and groups from automate,then reinstall fresh and see what happens

I will provide an update once this has been done

revero2749
Posts: 8
Joined: Thu May 16, 2024 3:30 pm

Re: C4A groups no populating

Post by revero2749 »

I have completely removed the plugin from automate,deleted the existing .dll file in the plugins folder,deleted the existing chocolatey groups and searches

Reinstalled the plugin afterwards with no luck
groups are created,searches are created but the searches are not automatically linked to the groups after groups creation,and the searches I am still unable to open them
Untitled.jpg
Untitled.jpg (27.49 KiB) Viewed 528 times
the plugin C4A_errors.txt has the following error too:

LTAgent v240.146 - 5/27/2024 1:00:04 PM - Plugin Error ChocolateyForAutomate, Version=3.6.0.11, Culture=neutral, PublicKeyToken=null: SetSQLTable 'labtech.plugin_p4a_chocolatey_agent_apps' doesn't exist:::

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

Re: C4A groups no populating

Post by Cubert »

Thanks for pointing out, This table was removed in 3.6 but a database clean up function still had a DELETE FROM tied to that table. Not hurting anything but added log noise. I have removed this in 3.6.0.12, should no longer be an issue.
LTAgent v240.146 - 5/27/2024 1:00:04 PM - Plugin Error ChocolateyForAutomate, Version=3.6.0.11, Culture=neutral, PublicKeyToken=null: SetSQLTable 'labtech.plugin_p4a_chocolatey_agent_apps' doesn't exist:::
As for the searches. Let me do a full systems flush of my currently running 3.6.0.11 and see if I can replicate your issue.

I do log failures during initial setups of Automate after a DBagent database restart.

So if there are any Groups, searches, scripts, SQL tables or script schedules that fail during creation should log errors on the automate host @ "C:\Program Files\LabTech\Logs\Plugin_ChocolateyForAutomate.txt"


Send me your current Automate version.

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

Re: C4A groups no populating

Post by Cubert »

Ok I think I found the issue. With all the things we have to create, if we do not do them in an exact order, then things get wonky.

II adjusted the search and EDF builds and it looks like we resolved our issues.

Here is what to do:

If you have MySQL access to host or ask Automate Support to execute the following code SQL on the Automate host.

Code: Select all


# Drop Tables
drop table if exists plugin_p4a_chocolatey_applications;
drop table if exists plugin_p4a_chocolatey_client_applications;
drop table if exists plugin_p4a_chocolatey_clients;
drop table if exists plugin_p4a_chocolatey_enable;
drop table if exists plugin_p4a_chocolatey_cache;
drop table if exists plugin_p4a_chocolatey_properties;
drop table if exists plugin_p4a_chocolatey_installed_packages;
drop table if exists plugin_p4a_chocolatey_installed_sources;
drop table if exists plugin_p4a_chocolatey_commands;
drop table if exists plugin_p4a_chocolatey_update_log;
drop table if exists plugin_p4a_chocolatey_repos;
drop table if exists plugin_p4a_chocolatey_logs;

#Remove groupscripts
DELETE FROM `groupscripts` WHERE GroupID = (SELECT GroupID FROM mastergroups WHERE Name = 'C4A Auto Install Approved Applications');
DELETE FROM `groupscripts` WHERE GroupID = (SELECT GroupID FROM mastergroups WHERE Name = 'C4A Manage UNC Sources');
DELETE FROM `groupscripts` WHERE GroupID = (SELECT GroupID FROM mastergroups WHERE Name = 'C4A Deploy Chocolatey');
DELETE FROM `groupscripts` WHERE GroupID = (SELECT GroupID FROM mastergroups WHERE Name = 'C4A Manage UNC Caches');
DELETE FROM `groupscripts` WHERE GroupID = (SELECT GroupID FROM mastergroups WHERE Name = 'C4A Manage Sources');
DELETE FROM `groupscripts` WHERE GroupID = (SELECT GroupID FROM mastergroups WHERE Name = 'Chocolatey For Automate');

#remove master groups
DELETE FROM mastergroups WHERE Name = 'C4A Auto Install Approved Applications';
DELETE FROM mastergroups WHERE Name = 'C4A Manage UNC Sources';
DELETE FROM mastergroups WHERE Name = 'C4A Deploy Chocolatey';
DELETE FROM mastergroups WHERE Name = 'C4A Manage UNC Caches';
DELETE FROM mastergroups WHERE Name = 'C4A Manage Sources';
DELETE FROM mastergroups WHERE Name = 'Chocolatey For Automate';

#remove LT Scripts
DELETE FROM lt_scripts where ScriptName = 'P4A Chocolatey Auto Install Approved Applications';
DELETE FROM lt_scripts where ScriptName = 'P4A Chocolatey Cache Management';
DELETE FROM lt_scripts where ScriptName = 'P4A Chocolatey Sources';
DELETE FROM lt_scripts where ScriptName = 'P4A Scan Chocolatey Packages'; 
DELETE FROM lt_scripts where ScriptName = 'P4A Deploy Chocolatey';

#Remove EDF's
DELETE FROM extrafield WHERE Name = 'LastScan' and Section = 'Chocolatey';
DELETE FROM extrafield WHERE Name = 'Approved Applications Installed' and Section = 'Chocolatey';
DELETE FROM extrafield WHERE Name = 'Auto Install Approved Applications' and Section = 'Chocolatey';
DELETE FROM extrafield WHERE Name = 'UNC Cache Master' and Section = 'Chocolatey';
DELETE FROM extrafield WHERE Name = 'UNC Cache Enabled' and Section = 'Chocolatey';
DELETE FROM extrafield WHERE Name = 'Sources Enabled' and Section = 'Chocolatey';
DELETE FROM extrafield WHERE Name = 'Use UNC Cache' and Section = 'Chocolatey';
DELETE FROM extrafield WHERE Name = 'Current Version' and Section = 'Chocolatey';
DELETE FROM extrafield WHERE Name = 'LastUpdate' and Section = 'Chocolatey';
DELETE FROM extrafield WHERE Name = 'Enable MSP License';
DELETE FROM extrafield WHERE Name = 'Enable Extra Sources';
DELETE FROM extrafield WHERE Name = 'Chocolatey Installed';
DELETE FROM extrafield WHERE Name = 'Chocolatey Approved';


#remove Sensor checks
DELETE FROM sensorchecks WHERE Name = 'P4A Chocolatey Auto Install Apps';
DELETE FROM sensorchecks WHERE Name = 'P4A Chocolatey UNC Deployment';
DELETE FROM sensorchecks WHERE Name = 'P4A Chocolatey Source Deployment';
DELETE FROM sensorchecks WHERE Name = 'P4A Chocolatey Cache Managers';
DELETE FROM sensorchecks WHERE Name = 'Chocolatey For Automate Ready';
DELETE FROM sensorchecks WHERE Name = 'P4A Deploy Chocolatey';

#remove User class
DELETE FROM userclasses Where Name = 'Chocolatey';


Next, upgrade Chocolatey plugin to 3.6.0.12 +

Then restart DBagent

Close and relaunch your Automate console.

Check groups to now be configured as expected and searches are now readable.


3.6.0.12 will auto update tonight, Or you can get it here
https://delivery.shopifyapps.com/-/ae75 ... cc755fd212

If your having issues then just flush the database, restart the dbagent , and relaunch your console.

revero2749
Posts: 8
Joined: Thu May 16, 2024 3:30 pm

Re: C4A groups no populating

Post by revero2749 »

Thank you for your assistance so far,again.

I have done the steps as you suggested and it seems to be resolved.
I am able to read all the searches.the groups exist and the scripts have been scheduled on them al,along with the searches too.All the scripts are readable too.

I just noticed that the group "C4A Auto Ins5tall Approved Applications" is not created as a subgroup under Chocolatey for Automate,its not a big issue really,but just want to notify you about that
Untitled.png
Untitled.png (42.6 KiB) Viewed 347 times
Thank you for finding the problem and resolving it

Post Reply

Return to “Chocolatey For Automate”