I know this is an old topic, but I have struggled with OPSI server (config server + depot) renaming today so I can share my experience..
If you want to rename your server:
1. Change hostname and/or domainname
In my tests I was trying to rename
opsi.local.lan VM (provided by OPSI team, Xubuntu) to
opsinew.local.lan
Code: Alles auswählen
# sed -i 's/opsi/opsinew/' /etc/hostname
# sed -i 's/opsi/opsinew/g' /etc/hosts
# reboot
2. Execute:
Code: Alles auswählen
opsi-admin --no-depot -d method host_renameOpsiDepotserver <old-id> <new-id>
in my case:
Code: Alles auswählen
# opsi-admin --no-depot -d method host_renameOpsiDepotserver opsi.local.lan opsinew.local.lan
That's it
but not really..
a) Client's could not mount depot shares, because they were looking not for \\opsinew\opsi_depot, but \\opsinew\opsinew_depot – you have to edit /etc/samba/smb.conf or client config..
b) I have found a bug..
# opsi-admin -d method host_getObjects [] '{"type":"OpsiDepotserver"}'
[
{
"masterDepotId" : null,
"ident" : "opsinew.local.lan",
"networkAddress" : "192.168.1.0/255.255.255.0",
"description" : "",
"inventoryNumber" : "",
"ipAddress" : "192.168.1.200",
"repositoryRemoteUrl" : "webdavs://opsinewnew.local.lan:4447/repository",
"depotLocalUrl" : "file:///var/lib/opsi/depot",
"isMasterDepot" : true,
"notes" : "",
"hardwareAddress" : "08:00:27:0d:9a:35",
"maxBandwidth" : 0,
"repositoryLocalUrl" : "file:///var/lib/opsi/repository",
"opsiHostKey" : "feee94fbcb126b763bd88f0a02c89a5f",
"type" : "OpsiConfigserver",
"id" : "opsinew.local.lan",
"depotWebdavUrl" : "webdavs://opsinewnew.local.lan:4447/depot",
"depotRemoteUrl" : "smb://opsinew/opsinew_depot"
}
]
String
opsi was replaced multiple times in some places and I have got
opsinewnew instead of
opsinew so package management was not working until I fixed:
/var/lib/opsi/config/depots/opsinew.local.lan.ini
Now it looks like everything is OK
I am going to rename production server..