Remove Depot

Antworten
djm79
Beiträge: 65
Registriert: 04 Feb 2013, 14:03

Remove Depot

Beitrag von djm79 »

I have two depots that had to be reloaded due to hardware failure. They both are not syncing with the main Opsi server because in the logs it shows the sync job start but all the products show up to date. When I check both depots the /var/lib/opsi/repository is empty. I have tried using

Code: Alles auswählen

opsi-admin -d method deleteDepot <depotId>
but that doesnt seem to remove them so I can re-add them and sync. Is there a better method to remove the depots and the information? I also use Mysql as the backend.
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: Remove Depot

Beitrag von n.wenselowski »

Hi,

usually just registering a depot again does the trick.
Did you try that?

Regarding your initial problem: how are you syncing?


-Niko

Code: Alles auswählen

import OPSI
djm79
Beiträge: 65
Registriert: 04 Feb 2013, 14:03

Re: Remove Depot

Beitrag von djm79 »

I have tried to registering the two depots but they never pull any packages because in the updater log it shows them as synced with the main server. To start the initial while its setting at my desk I run:

Code: Alles auswählen

sudo opsi-product-updater -i
When I look at the updater log you can see the depot check in and for some reason it says all the packages are synced and doesn't sync any packages. Is there a way to remove the depots and all their package information from the main server so we can re-add them and start over in case of OS re-loads like we have had?
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: Remove Depot

Beitrag von n.wenselowski »

Hi,

Code: Alles auswählen

opsi-admin -d method host_delete <depotId>
This should delete it. Just in case: Make sure to have a backup!
djm79 hat geschrieben:To start the initial while its setting at my desk I run:

Code: Alles auswählen

sudo opsi-product-updater -i
Did you try running it with multiple -v?
It should show what version is found locally and what version is found on the remote.

Also you may want to check the settings of your depot:

Code: Alles auswählen

opsi-admin -d method host_getObjects '' '{"type":"OpsiDepotserver"}'
Check the local repository URL and the one specified in /etc/opsi/opsi-product-updater.conf


Kind regards

Niko

Code: Alles auswählen

import OPSI
djm79
Beiträge: 65
Registriert: 04 Feb 2013, 14:03

Re: Remove Depot

Beitrag von djm79 »

I ended up having to remove the MySQL entries for those depots so they reset they repository. It looks like the

Code: Alles auswählen

 opsi-admin -d method host_delete <depotId>
command would remove the entries for the flat file system back end but not the MySQL back end. Just a heads up you might want to look at that for a future release when a end user needs to clean up a depot that has been removed.
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: Remove Depot

Beitrag von n.wenselowski »

Hi,

did you know there is opsi-setup --cleanup-backend?

Did you use File and MySQL or just one of these backends?


Kind regards

Niko

Code: Alles auswählen

import OPSI
djm79
Beiträge: 65
Registriert: 04 Feb 2013, 14:03

Re: Remove Depot

Beitrag von djm79 »

I did see that command but I wasn't sure why you would need it. Our back end is MySQL once I did some digging I found where the depots and their listed products where located and just removed the ones for the two depots that had been rebuilt and they synced over the weekend.
Antworten