Confirmed users
3,990
edits
| Line 180: | Line 180: | ||
=== Check the hostkey === | === Check the hostkey === | ||
* Check that the hostkeys on the master and the slave are the same | * Check that the hostkeys on the master and the slave are the same | ||
** in master: /etc/opsi/pckeys | ** in master: grep talos-r3-xp-066 /etc/opsi/pckeys | ||
** in slave: C:\Program Files\opsi.org\preloginloader\cfg\locked.cfg | ** in slave: cat C:\Program Files\opsi.org\preloginloader\cfg\locked.cfg | ||
** The slave's hostkey is generated with a service on boot | *** The value of the slave should be the same as on the master. See [[ReleaseEngineering/OPSI#Understanding_the_key_generation]] section below. | ||
*** | ** The slave's hostkey is generated with a service on boot. | ||
* If | *** OPSI package -> [http://hg.mozilla.org/build/opsi-package-sources/file/default/hostkey-generator/CLIENT_DATA/hostkey.ins hostkey.ins] for Win2003 slaves | ||
schtasks /create /tn opsikey /tr d:\\mozilla-build\\python25\\python.exe d:\\tools\\buildfarm\\opsi\\regenerate-hostkey.py /sc ONSTART /ru SYSTEM | |||
* If it does not match check [[ReleaseEngineering/OPSI#Fix_hostkey]] | |||
=== Fix the hostkey === | |||
I've seen before XP slaves not running the regenerate-hostkey.py service and require you to run it manually: | |||
<pre> | |||
C:\>cat "C:\Program Files\opsi.org\preloginloader\cfg\locked.cfg" | |||
[shareinfo] | |||
pckey = 80dc2294bff215b3fab57d8e7ff61ccd | |||
C:\>C:\mozilla-build\python25\python.exe C:\tools\buildfarm\opsi\regenerate-hostkey.py | |||
C:\>cat "C:\Program Files\opsi.org\preloginloader\cfg\locked.cfg" | |||
[shareinfo] | |||
pckey = db4bb6ed05f5359cf5ef23870fea3f93 | |||
</pre> | |||
* After rebooting you should be good to go | |||
=== Understanding the key generation === | |||
* Both locked.cfg and /etc/opsi/pckeys have to match and both are generated with the same code from two different scripts | |||
** md5(str).hexdigest() [http://hg.mozilla.org/build/opsi-package-sources/file/default/look-for-new-slaves.py#l82 look-for-new-slave.py#l82] and [http://hg.mozilla.org/build/tools/file/default/buildfarm/opsi/regenerate-hostkey.py#l18 regenerate-hostkey.py#l18] | |||
* On the master [http://hg.mozilla.org/build/opsi-package-sources/file/default/look-for-new-slaves.py#l145 look-for-new-slaves.py] is called and adds an entry like this to /etc/opsi/pckeys like this: | |||
talos-r3-xp-067.uib.local:db4bb6ed05f5359cf5ef23870fea3f93 | |||
* On the slave [http://hg.mozilla.org/build/tools/file/default/buildfarm/opsi/regenerate-hostkey.py#l35 regenerate-hostkey.py] is run and locked.cfg is generated: | |||
<pre> | |||
[shareinfo] | |||
pckey = db4bb6ed05f5359cf5ef23870fea3f93 | |||
</pre> | |||
If your slave was to match any of these values then it means that you have the key for one of the [http://hg.mozilla.org/build/tools/file/default/buildfarm/opsi/regenerate-hostkey.py#l13 ref machines] and it has to be fixed: | |||
<pre> | |||
>>> md5('win2k3-ref-img').hexdigest() | |||
'9b4cefa1c3a1f9159cf51a6d28155be8' | |||
>>> md5('win32-ix-ref').hexdigest() | |||
'c1cdfb2077205f086680ada04310f8c2' | |||
>>> md5('talos-r3-xp-ref').hexdigest() | |||
'80dc2294bff215b3fab57d8e7ff61ccd' | |||
</pre> | |||
Look at this code to understand the uniqueness of the value: | |||
<pre> | |||
>>> from md5 import md5 | |||
>>> import sys | |||
>>> from socket import gethostname | |||
>>> gethostname() | |||
'talos-r3-xp-067' | |||
>>> md5(gethostname()).hexdigest() | |||
'db4bb6ed05f5359cf5ef23870fea3f93' | |||
>>> md5('talos-r3-xp-ref').hexdigest() | |||
'80dc2294bff215b3fab57d8e7ff61ccd' | |||
</pre> | |||
=== Check the opsiconfd log === | === Check the opsiconfd log === | ||