iversonk56044 / gss-scripts

Automatically exported from code.google.com/p/gss-scripts
0 stars 0 forks source link

Remove Invalid/Blank Record under Network section #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What would you like a script to be able to do?

Remove invalid records automatically, and write content of invalid record 
to log for review.

If you would like an enhancement to an existing script, which one?

DelClient.wsf -OR- new script CleanDB.wsf

Background:

I'm laying down a challenge that Symantec Support could not help me with; 
Symantec support have been unable to identify the cause of the problem.

When I go under networks, listed under our subnet, there is a "blank" 
client.  

It cannot be renamed or deleted, and properties reveals no details.  

It has no Machine ID and is not counted against the number of licences: 
i.e. If About Ghost lists you as having X licensed clients, then under the 
subnet you would have X+1 items listed.

It's not only ugly, but causes the Ghost Console to crash with a generic 
error.

I've backed-up and restored using your tools. No diff.

I've even tried a refresh install of ghost on a fresh server.

Nothing has worked!

I figure there is a corrupted Ghost client running somewhere on our 
network and I cannot identify it.  That's the only explanation I can think 
of that would allow the blank record to keep appearing consistently.

So, can you devise a script that would do the following?

a) Remove the offending client (i.e. Clean up invalid records)
b) Report any info about the offending client, or any orphan records in 
any table

Meanwhile, I'm going to see if I can re-engineer your scripts myself to do 
just that.  Just figured you'd be able to do it much more quickly.

TA

~ mattR

Original issue reported on code.google.com by mri...@gmail.com on 20 Feb 2010 at 2:34

GoogleCodeExporter commented 8 years ago
Capital suggestion! Thanks for posting this.

First off, however, in order to create a suitable clean-up script I'll need a 
closer 
look at the specifics of your console database so I can see more precisely what 
kind 
of removal query will target the problem client records without accidentally 
removing 
other clients. I'd also hope that I could debug through whatever is causing the 
console to fail when handling the client so I can add a code fix for a future 
release 
to reduce the impact of this (or ideally, find and fix whatever leads it to 
happen in 
the first place).

To do that I'll need to look at one of your backup cabinet files so I can 
restore 
that to one of my development systems and work through it. It's not a good idea 
to 
attach that anywhere unsecure, so it's best to contact me directly on my Gmail 
account which is same as the ID displayed here, and listed under "additional 
information" on my Connect forum profile page at https://www-
secure.symantec.com/connect/user/nigel-bree

If you do that I'll create a secure upload area for you on one of Symantec's 
servers 
and reply with the credentials to use, so that way your server DB data is kept 
properly secured. Then I can examine it more closely, and it will also give me 
a way 
to test that the script changes I make actually do the right thing before 
publishing 
them to here.

Original comment by nigel.bree@gmail.com on 20 Feb 2010 at 5:08

GoogleCodeExporter commented 8 years ago
From working with the database and running the console under a debugger, it 
transpires that the root cause of the problem you are observing is a fault in 
the 
console code's processing of the results of a database query. There's nothing 
at all 
wrong in the database itself, so there's nothing a script can do - only a code 
change 
in the console will get rid of the extraneous entry and the problems that it 
causes.

Now, the console and the database design allows shortcuts to machines to be 
present 
in different folders under the "Machine Groups" section in the treeview. This 
is 
normally fine, but the query that generates the Network folder views doesn't 
handle 
the fact that the query it does returns multiple references to the same 
machine; 
instead of filtering those out properly, in the memory list it builds up from 
the 
query results it generates the invalid data you see (and any faults in the 
console 
are due to it running in to this invalid data).

I've made a change to the console source code which I can submit to the source 
control system for eventual inclusion in the product, although I don't have any 
idea 
when that might be picked up by the team responsible for the release process. 
I'll 
contact you separately to discuss testing that.

Original comment by nigel.bree@gmail.com on 22 Feb 2010 at 10:33

GoogleCodeExporter commented 8 years ago
Thanks.  It worked.

Original comment by mri...@gmail.com on 23 Feb 2010 at 12:20

GoogleCodeExporter commented 8 years ago
Closing as verified

Original comment by nigel.bree@gmail.com on 25 Mar 2010 at 10:18