samba 4.7.0 AD DC: FSMO roles transfer error

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

samba 4.7.0 AD DC: FSMO roles transfer error

Samba - samba-technical mailing list
Hi samba team,
I'm upgrading my two DCs to 4.7.0 from 4.6.5 and as advised I started
upgrading the DC which doesn't hold the FSMO roles.

After successfully upgraded it I tried to transfer the roles to the
other one but encountered some issues:

[root@kdc02:~/src/samba-4.7.0]# samba-tool fsmo transfer --role=all -U
administrator
FSMO transfer of 'rid' role successful
ERROR: Transfer of 'pdc' role failed: Failed FSMO transfer:
NT_STATUS_IO_TIMEOUT
[root@kdc02:~/src/samba-4.7.0]# samba-tool fsmo transfer --role=all -U
administrator
This DC already has the 'rid' FSMO role
This DC already has the 'pdc' FSMO role
FSMO transfer of 'naming' role successful
ERROR: Transfer of 'infrastructure' role failed: Failed FSMO transfer:
NT_STATUS_IO_TIMEOUT
[root@kdc02:~/src/samba-4.7.0]# samba-tool fsmo transfer --role=all -U
administrator
This DC already has the 'rid' FSMO role
This DC already has the 'pdc' FSMO role
This DC already has the 'naming' FSMO role
This DC already has the 'infrastructure' FSMO role
This DC already has the 'schema' FSMO role
Password for [SAITEL\administrator]:
ERROR(<type 'exceptions.AttributeError'>): uncaught exception - 'module'
object has no attribute 'drs_utils'
  File
"/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/__init__.py",
line 176, in _run
    return self.run(*args, **kwargs)
  File
"/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/fsmo.py",
line 515, in run
    "domaindns", samdb)
  File
"/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/fsmo.py",
line 129, in transfer_dns_role
    except samba.drs_utils.drsException, e:

AFAICS, there's a missing "import samba.drs_utils" in fsmo.py.

Also, if I add a time.sleep(1) between the "transfer_role" statements I
don't hit the timeout issue when transferring multiple roles on the same
time.

Daniele.


Reply | Threaded
Open this post in threaded view
|

Re: samba 4.7.0 AD DC: FSMO roles transfer error

Samba - samba-technical mailing list
On Wed, 11 Oct 2017 12:25:51 +0200
Daniele Dario via samba-technical <[hidden email]>
wrote:

> Hi samba team,
> I'm upgrading my two DCs to 4.7.0 from 4.6.5 and as advised I started
> upgrading the DC which doesn't hold the FSMO roles.
>
> After successfully upgraded it I tried to transfer the roles to the
> other one but encountered some issues:
>
> [root@kdc02:~/src/samba-4.7.0]# samba-tool fsmo transfer --role=all -U
> administrator
> FSMO transfer of 'rid' role successful
> ERROR: Transfer of 'pdc' role failed: Failed FSMO transfer:
> NT_STATUS_IO_TIMEOUT
> [root@kdc02:~/src/samba-4.7.0]# samba-tool fsmo transfer --role=all -U
> administrator
> This DC already has the 'rid' FSMO role
> This DC already has the 'pdc' FSMO role
> FSMO transfer of 'naming' role successful
> ERROR: Transfer of 'infrastructure' role failed: Failed FSMO transfer:
> NT_STATUS_IO_TIMEOUT
> [root@kdc02:~/src/samba-4.7.0]# samba-tool fsmo transfer --role=all -U
> administrator
> This DC already has the 'rid' FSMO role
> This DC already has the 'pdc' FSMO role
> This DC already has the 'naming' FSMO role
> This DC already has the 'infrastructure' FSMO role
> This DC already has the 'schema' FSMO role
> Password for [SAITEL\administrator]:
> ERROR(<type 'exceptions.AttributeError'>): uncaught exception -
> 'module' object has no attribute 'drs_utils'
>   File
> "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/__init__.py",
> line 176, in _run
>     return self.run(*args, **kwargs)
>   File
> "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/fsmo.py",
> line 515, in run
>     "domaindns", samdb)
>   File
> "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/fsmo.py",
> line 129, in transfer_dns_role
>     except samba.drs_utils.drsException, e:
>
> AFAICS, there's a missing "import samba.drs_utils" in fsmo.py.
>
> Also, if I add a time.sleep(1) between the "transfer_role" statements
> I don't hit the timeout issue when transferring multiple roles on the
> same time.
>
> Daniele.
>
>

Not sure that is the problem, 'samba.drs_utils' is only used when
transferring the dns FSMO roles and you seem to be having problems
before this:  ERROR: Transfer of 'pdc' role failed:

What OS is this running on and are the two DCs local ?

Rowland


Reply | Threaded
Open this post in threaded view
|

Re: samba 4.7.0 AD DC: FSMO roles transfer error

Samba - samba-technical mailing list
Hi Rowland,
the DCs are both local and running on ubuntu 16.04 x64.

The timeout problem disappear if I put a second delay between transfer
calls.

The other error happens exactly when transfer dns roles is performed and
adding the import seems to fix the issue.

Daniele

On Oct 11, 2017 5:07 PM, "Rowland Penny via samba-technical" <
[hidden email]> wrote:

> On Wed, 11 Oct 2017 12:25:51 +0200
> Daniele Dario via samba-technical <[hidden email]>
> wrote:
>
> > Hi samba team,
> > I'm upgrading my two DCs to 4.7.0 from 4.6.5 and as advised I started
> > upgrading the DC which doesn't hold the FSMO roles.
> >
> > After successfully upgraded it I tried to transfer the roles to the
> > other one but encountered some issues:
> >
> > [root@kdc02:~/src/samba-4.7.0]# samba-tool fsmo transfer --role=all -U
> > administrator
> > FSMO transfer of 'rid' role successful
> > ERROR: Transfer of 'pdc' role failed: Failed FSMO transfer:
> > NT_STATUS_IO_TIMEOUT
> > [root@kdc02:~/src/samba-4.7.0]# samba-tool fsmo transfer --role=all -U
> > administrator
> > This DC already has the 'rid' FSMO role
> > This DC already has the 'pdc' FSMO role
> > FSMO transfer of 'naming' role successful
> > ERROR: Transfer of 'infrastructure' role failed: Failed FSMO transfer:
> > NT_STATUS_IO_TIMEOUT
> > [root@kdc02:~/src/samba-4.7.0]# samba-tool fsmo transfer --role=all -U
> > administrator
> > This DC already has the 'rid' FSMO role
> > This DC already has the 'pdc' FSMO role
> > This DC already has the 'naming' FSMO role
> > This DC already has the 'infrastructure' FSMO role
> > This DC already has the 'schema' FSMO role
> > Password for [SAITEL\administrator]:
> > ERROR(<type 'exceptions.AttributeError'>): uncaught exception -
> > 'module' object has no attribute 'drs_utils'
> >   File
> > "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/__init__.py",
> > line 176, in _run
> >     return self.run(*args, **kwargs)
> >   File
> > "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/fsmo.py",
> > line 515, in run
> >     "domaindns", samdb)
> >   File
> > "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/fsmo.py",
> > line 129, in transfer_dns_role
> >     except samba.drs_utils.drsException, e:
> >
> > AFAICS, there's a missing "import samba.drs_utils" in fsmo.py.
> >
> > Also, if I add a time.sleep(1) between the "transfer_role" statements
> > I don't hit the timeout issue when transferring multiple roles on the
> > same time.
> >
> > Daniele.
> >
> >
>
> Not sure that is the problem, 'samba.drs_utils' is only used when
> transferring the dns FSMO roles and you seem to be having problems
> before this:  ERROR: Transfer of 'pdc' role failed:
>
> What OS is this running on and are the two DCs local ?
>
> Rowland
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: samba 4.7.0 AD DC: FSMO roles transfer error

Samba - samba-technical mailing list
On Wed, 11 Oct 2017 20:03:03 +0200
Daniele Dario <[hidden email]> wrote:

> Hi Rowland,
> the DCs are both local and running on ubuntu 16.04 x64.
>
> The timeout problem disappear if I put a second delay between transfer
> calls.
>
> The other error happens exactly when transfer dns roles is performed
> and adding the import seems to fix the issue.
>
> Daniele

sudo apt-get install python

Might be a good idea, Just checked and Ubuntu 16.04 comes with python
3.5.1 by default and the whilst the Samba python code is being ported
to python 3, you still need python 2.7

Rowland

Reply | Threaded
Open this post in threaded view
|

Re: samba 4.7.0 AD DC: FSMO roles transfer error

Samba - samba-technical mailing list

Mhh.

On mer, 2017-10-11 at 19:11 +0100, Rowland Penny via samba-technical
wrote:

> On Wed, 11 Oct 2017 20:03:03 +0200
> Daniele Dario <[hidden email]> wrote:
>
> > Hi Rowland,
> > the DCs are both local and running on ubuntu 16.04 x64.
> >
> > The timeout problem disappear if I put a second delay between transfer
> > calls.
> >
> > The other error happens exactly when transfer dns roles is performed
> > and adding the import seems to fix the issue.
> >
> > Daniele
>
> sudo apt-get install python
>
> Might be a good idea, Just checked and Ubuntu 16.04 comes with python
> 3.5.1 by default and the whilst the Samba python code is being ported
> to python 3, you still need python 2.7
>
> Rowland
>

As far as I can see, there are both installed or am I missing something?

root@kdc02:~# apt list -a python3.5
Listing... Done
python3.5/xenial-updates,now 3.5.2-2ubuntu0~16.04.3 amd64 [installed]
python3.5/xenial-security 3.5.2-2ubuntu0~16.04.1 amd64
python3.5/xenial 3.5.1-10 amd64

root@kdc02:~# apt list -a python2.7
Listing... Done
python2.7/xenial-updates,xenial-security,now 2.7.12-1ubuntu0~16.04.1
amd64 [installed,automatic]
python2.7/xenial 2.7.11-7ubuntu1 amd64

Same on kdc01.

My python is not as good as I would but AFAIK if I want to address
samba.drs_utils this means drs_utils has to be something visible inside
samba but it isn't so I think it is needed to add the line
import samba.drs_utils

About the timeout error: the two DCs are local and traffic on LAN was
normal. I had just updated to 4.7.0 the first DC when tried to transfer
the roles to it before upgrading the other one.

Adding a timeout between transfers allowed to move the roles from one to
the other and vice-versa without timeouts reliably.

Daniele.


Reply | Threaded
Open this post in threaded view
|

Re: samba 4.7.0 AD DC: FSMO roles transfer error

Samba - samba-technical mailing list
On Thu, 12 Oct 2017 15:12:29 +0200
Daniele Dario <[hidden email]> wrote:

>
> Mhh.
>
> On mer, 2017-10-11 at 19:11 +0100, Rowland Penny via samba-technical
> wrote:
> > On Wed, 11 Oct 2017 20:03:03 +0200
> > Daniele Dario <[hidden email]> wrote:
> >
> > > Hi Rowland,
> > > the DCs are both local and running on ubuntu 16.04 x64.
> > >
> > > The timeout problem disappear if I put a second delay between
> > > transfer calls.
> > >
> > > The other error happens exactly when transfer dns roles is
> > > performed and adding the import seems to fix the issue.
> > >
> > > Daniele
> >
> > sudo apt-get install python
> >
> > Might be a good idea, Just checked and Ubuntu 16.04 comes with
> > python 3.5.1 by default and the whilst the Samba python code is
> > being ported to python 3, you still need python 2.7
> >
> > Rowland
> >
>
> As far as I can see, there are both installed or am I missing
> something?
>
> root@kdc02:~# apt list -a python3.5
> Listing... Done
> python3.5/xenial-updates,now 3.5.2-2ubuntu0~16.04.3 amd64 [installed]
> python3.5/xenial-security 3.5.2-2ubuntu0~16.04.1 amd64
> python3.5/xenial 3.5.1-10 amd64
>
> root@kdc02:~# apt list -a python2.7
> Listing... Done
> python2.7/xenial-updates,xenial-security,now 2.7.12-1ubuntu0~16.04.1
> amd64 [installed,automatic]
> python2.7/xenial 2.7.11-7ubuntu1 amd64
>
> Same on kdc01.
>
> My python is not as good as I would but AFAIK if I want to address
> samba.drs_utils this means drs_utils has to be something visible
> inside samba but it isn't so I think it is needed to add the line
> import samba.drs_utils
>
> About the timeout error: the two DCs are local and traffic on LAN was
> normal. I had just updated to 4.7.0 the first DC when tried to
> transfer the roles to it before upgrading the other one.
>
> Adding a timeout between transfers allowed to move the roles from one
> to the other and vice-versa without timeouts reliably.
>
> Daniele.
>

You are the first person to have this problem and 'fsmo.py' has never
had 'import samba.drs_utils'. This is why I think it is a problem with
python, the default on Ubuntu 16.04 is probably 3.5.2, what does
'python -V' show ?
Samba requires python >= 2.4

Rowland

Reply | Threaded
Open this post in threaded view
|

Re: samba 4.7.0 AD DC: FSMO roles transfer error

Samba - samba-technical mailing list



On gio, 2017-10-12 at 14:27 +0100, Rowland Penny via samba-technical
wrote:

> On Thu, 12 Oct 2017 15:12:29 +0200
> Daniele Dario <[hidden email]> wrote:
>
> >
> > Mhh.
> >
> > On mer, 2017-10-11 at 19:11 +0100, Rowland Penny via samba-technical
> > wrote:
> > > On Wed, 11 Oct 2017 20:03:03 +0200
> > > Daniele Dario <[hidden email]> wrote:
> > >
> > > > Hi Rowland,
> > > > the DCs are both local and running on ubuntu 16.04 x64.
> > > >
> > > > The timeout problem disappear if I put a second delay between
> > > > transfer calls.
> > > >
> > > > The other error happens exactly when transfer dns roles is
> > > > performed and adding the import seems to fix the issue.
> > > >
> > > > Daniele
> > >
> > > sudo apt-get install python
> > >
> > > Might be a good idea, Just checked and Ubuntu 16.04 comes with
> > > python 3.5.1 by default and the whilst the Samba python code is
> > > being ported to python 3, you still need python 2.7
> > >
> > > Rowland
> > >
> >
> > As far as I can see, there are both installed or am I missing
> > something?
> >
> > root@kdc02:~# apt list -a python3.5
> > Listing... Done
> > python3.5/xenial-updates,now 3.5.2-2ubuntu0~16.04.3 amd64 [installed]
> > python3.5/xenial-security 3.5.2-2ubuntu0~16.04.1 amd64
> > python3.5/xenial 3.5.1-10 amd64
> >
> > root@kdc02:~# apt list -a python2.7
> > Listing... Done
> > python2.7/xenial-updates,xenial-security,now 2.7.12-1ubuntu0~16.04.1
> > amd64 [installed,automatic]
> > python2.7/xenial 2.7.11-7ubuntu1 amd64
> >
> > Same on kdc01.
> >
> > My python is not as good as I would but AFAIK if I want to address
> > samba.drs_utils this means drs_utils has to be something visible
> > inside samba but it isn't so I think it is needed to add the line
> > import samba.drs_utils
> >
> > About the timeout error: the two DCs are local and traffic on LAN was
> > normal. I had just updated to 4.7.0 the first DC when tried to
> > transfer the roles to it before upgrading the other one.
> >
> > Adding a timeout between transfers allowed to move the roles from one
> > to the other and vice-versa without timeouts reliably.
> >
> > Daniele.
> >
>
> You are the first person to have this problem and 'fsmo.py' has never
> had 'import samba.drs_utils'. This is why I think it is a problem with
> python, the default on Ubuntu 16.04 is probably 3.5.2, what does
> 'python -V' show ?
> Samba requires python >= 2.4
>
> Rowland
>

[root@kdc02:~]# python -V
Python 2.7.12