BUG: client deployment doesn't work from different network

Antworten
giner
Beiträge: 29
Registriert: 24 Sep 2014, 07:45

BUG: client deployment doesn't work from different network

Beitrag von giner »

Hello,

We have WINS disabled for all PCs (security policy for the whole company) and opsi-deploy-client-agent doesn't work when client and server are in different network segments.
  • If we try to install by ./opsi-deploy-client-agent -u 'domain\superadmin' mypc.domain.com then we get NT_STATUS_IO_TIMEOUT from winexe because winexe tries to reach the machine by broadcasting netbios name.
  • If we try to install by ./opsi-deploy-client-agent -c -u 'domain\superadmin' mypc.domain.com then winexe tries to use DNS instead of netbios name and fails with NT_STATUS_NO_MEMORY. This seems to be winexe issue.
Here is a work around to make it work (here we use IP instead of DNS name):

Code: Alles auswählen

--- /var/lib/opsi/depot/opsi-client-agent/opsi-deploy-client-agent.orig	2014-12-08 20:05:44.758541777 +0300
+++ /var/lib/opsi/depot/opsi-client-agent/opsi-deploy-client-agent	2014-12-08 20:23:34.715020708 +0300
@@ -204,7 +204,7 @@
 				hostCreated = True
 			hostObj = self.backend.host_getObjects(type = 'OpsiClient', id = hostId)[0]
 			
-			hn = hostId
+			hn = ipAddress
 			if self.useNetbios:
 				hn = hostName
I think connecting by IP address should be possible for all types of environment and thus this behaviour should be default for opsi-deploy-client-agent.

Best regards,
Stanislav
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: BUG: client deployment doesn't work from different netwo

Beitrag von n.wenselowski »

Hello Stanislav,

for the upcoming release the deployment via IP should be possible without touching the script.


With kind regards

Niko

Code: Alles auswählen

import OPSI
giner
Beiträge: 29
Registriert: 24 Sep 2014, 07:45

Re: BUG: client deployment doesn't work from different netwo

Beitrag von giner »

n.wenselowski hat geschrieben:Hello Stanislav,

for the upcoming release the deployment via IP should be possible without touching the script.
With kind regards
Niko
Hello Nico,

winexe is updated, right?
I suppose IP address is more reliable than DNS anyway, what do you think?

Stanislav
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: BUG: client deployment doesn't work from different netwo

Beitrag von n.wenselowski »

Hello Stanislav,

I just touched the script.
Providing a new version of winexe over Opensuse Build Service is a big pain. If you want a newer version I'd recommend compiling it yourself.

I prefer having a working DNS in my environment as it saves you a lot of hassle.


With kind regards

Niko

Code: Alles auswählen

import OPSI
giner
Beiträge: 29
Registriert: 24 Sep 2014, 07:45

Re: BUG: client deployment doesn't work from different netwo

Beitrag von giner »

n.wenselowski hat geschrieben:Hello Stanislav,

I just touched the script.
Providing a new version of winexe over Opensuse Build Service is a big pain. If you want a newer version I'd recommend compiling it yourself.

I prefer having a working DNS in my environment as it saves you a lot of hassle.

With kind regards
Niko
Hi Nico,

There is some misunderstanding here.

1) You've said:
> for the upcoming release the deployment via IP should be possible without touching the script.
so I was thinking you have updated winexe and not patched the script

2) > I prefer having a working DNS in my environment as it saves you a lot of hassle.
DNS is working here and problem is not in DNS but in winexe which do not work with DNS.

So the question is how it will fixed in the upcoming version? I thought by updating winexe but it seems I was wrong.

Best regards,
Stanislav
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: BUG: client deployment doesn't work from different netwo

Beitrag von n.wenselowski »

Hello Stanislav,
giner hat geschrieben:1) You've said:
> for the upcoming release the deployment via IP should be possible without touching the script.
so I was thinking you have updated winexe and not patched the script
The script can now handle an IP instead of a hostname / fqdn. This was giving weird results before.
giner hat geschrieben:2) > I prefer having a working DNS in my environment as it saves you a lot of hassle.
DNS is working here and problem is not in DNS but in winexe which do not work with DNS.
I did a quick test this morning accessing an client with winexe via an IP and it did work. I used the statically linked version that we ship with the opsi-client-agent for this test.
What errors does winexe show you?


With kind regards

Niko

PS: Small sidenote: the new script will make it possible to use the "old way" of deploying the client agent - mounting the client shares on the server (via smbclient) to copy the files over and then only use winexe for running the installation. Before this were two different scripts where each contained some bugfixes the other didn't.

Code: Alles auswählen

import OPSI
giner
Beiträge: 29
Registriert: 24 Sep 2014, 07:45

Re: BUG: client deployment doesn't work from different netwo

Beitrag von giner »

Hello Niko,
n.wenselowski hat geschrieben: The script can now handle an IP instead of a hostname / fqdn. This was giving weird results before.
This is the answer to my question. Thank you.
n.wenselowski hat geschrieben: I did a quick test this morning accessing an client with winexe via an IP and it did work. I used the statically linked version that we ship with the opsi-client-agent for this test.
What errors does winexe show you?
No errors when using IP :)

Best regards,
Stanislav
Antworten