Page 1 of 1

[SOLVED] Machine problem not deleted from inventory

Published: February 7, 2023 - 4:28 PM
by flipflip
Hello everyone,

- Installed WAPT version: 2.3.0.13438 Discovery
- Server OS: Linux Debian 11
- Operating system of the administration/package creation machine: Windows 7 VM
- Target machine OS: Windows 7 VM

I resumed my tests of the WAPT solution and I am stuck again with my test machine.

At the beginning of my tests, I tried installing the PowerShell 5 package (a post about it exists, but I don't think the problem is package-related), along with the necessary dependencies, by adding them to the host package on my test machine. For various reasons, the deployment failed. I removed all those packages from the host package. But since then, wapt insists on installing the PowerShell 5 packages on this machine, even though the host package is empty.

wapt-1.png
wapt-1.png (53.43 KB) Viewed 2465 times

When I shut down the machine, the wapt agent window opens with the list of old packages to install, and of course, it fails again

wapt-2.png
wapt-2.png (32.13 KB) Viewed 2465 times

After a reboot, I open the wapt console and I can only note the errors.

wapt-3.png
wapt-3.png (42.13 KB) Viewed 2465 times

Actions attempted:
** test 1 **
- Delete the machine via the console while keeping "Delete machine configuration (Package)" checked;
- On the test machine, stop the wapt-service
- Register the machine again;
- Restart the wapt-service;
- Reboot the test machine.

** test 2 **
- Remove the machine from the console;
- On the test machine, uninstall the entire wapt component;
- Reboot the machine;
- Delete all directories related to wapt;
- Reinstall the agent;
- Save the machine again.

But the same problem persists.

I also tried restarting the server components (waptserver, wapttasks, waptservice), but it didn't help. It's as if the deletion of the test machine wasn't being registered. So I did some digging on the server side, and while browsing the log files, I came across this message when deleting the test machine:

Code: Select all

[waptserver     ] CRITICAL Get_websocket_auth_token failed EWaptAuthenticationFailure('Unknown host UUID 31B70366-EB20-453B-AAF6-0B3F1749CEFE. Please register first.')
So, I followed the instructions and registered the machine again. There was still only one "version" of my test machine in the console and nothing in the logs. I tried deleting it again, and this time there was no error message in the server logs. I rebooted the test machine, and the wapt installation window appeared (strange for a machine unregistered from the server). The same list of phantom packages was still there, and of course, the installations failed again.

After rebooting, without doing anything on the test machine, the server-side logs show:

Code: Select all

[waptserver     ] CRITICAL update_host failed EWaptMissingCertificate('You try to update status of an unknown host 31B70366-EB20-453B-AAF6-0B3F1749CEFE (mamachine). Please register first.')
 ...
[waptserver     ] WARNING Unauthenticated registration for mamachine
And of course, the machine reappears in the console with an error, still showing the list of old packages. Is there a way to force the removal of a machine from the inventory?

The unique feature of this test machine is that it is a Virtualbox VM installed on a Fedora 37 host.

Re: Problem: Machine not deleted from inventory

Published: February 14, 2023 - 11:12 AM
by flipflip
A brief update.

I managed to remove the phantom packages pending installation from the affected machine using the command:

Code: Select all

wapt-get forget nomdupaquet
After obtaining the waiting list for this machine

Code: Select all

wapt-get list-upgrade
Upon closing the session, packages that were waiting to be installed are no longer offered.