[Samba] {Device Timeout} The I/O operation specified in %hs was not completed before the timeout period expired
Elias Pereira
empbilly at gmail.com
Thu Jan 18 13:58:18 UTC 2024
Great explanation, Rowland!!!
Now I know there is a timeout and how to use the --async-op option.
On Thu, Jan 18, 2024 at 5:33 AM Rowland Penny via samba <
samba at lists.samba.org> wrote:
> On Wed, 17 Jan 2024 17:57:31 -0300
> Elias Pereira <empbilly at gmail.com> wrote:
>
> > >
> > > samba-tool drs replicate dc2 dc3
> > > DC=ForestDnsZones,DC=campus,DC=sertao,DC=ifrs,DC=edu,DC=br
> > > --async-op -d10 It should complete without the error.
> >
> >
> > My question is whether it will actually run without any errors. I
> > checked all the logs
> > in the /var/log/samba folder, and nothing is saved about the
> > execution with the --async-op option.
> >
> > If it runs in the background, it might open a fork of the samba root
> > process. Could this be the case?
> > Excuse my insistence, but how can I be sure that there really wasn't
> > an error in the command execution process?
> >
>
> As I understand it, the only error you had was that your logs were
> getting filled with the message in the subject line and everything was
> working correctly.
>
> Adding '--async-op' to the command seems to have fixed it, so how did I
> come up with that option ?
>
> I read the python code for the drs replicate command, were I found this:
>
> class cmd_drs_replicate(Command):
> """Replicate a naming context between two DCs."""
>
> Amongst its options is this:
>
> Option("--async-op", help="use ASYNC_OP for the replication",
> action="store_true"),
>
> Which if it is isn't used is set to False:
>
> def run(self, DEST_DC, SOURCE_DC, NC,
> add_ref=False, sync_forced=False, sync_all=False,
> full_sync=False,
> local=False, local_online=False, async_op=False,
> single_object=False,
> sambaopts=None, credopts=None, versionopts=None):
>
> Which leads to this piece of code being run:
>
> if not async_op:
> # Give the sync replication 5 minutes time
> server_bind.request_timeout = 5 * 60
>
> But if it is used, this code is used:
>
> req_options = 0
> ..............
> if async_op:
> req_options |= drsuapi.DRSUAPI_DRS_ASYNC_OP
>
> so 'DRSUAPI_DRS_ASYNC_OP' is set to 'something' but what ?
>
> You can find that here:
>
> librpc/idl/drsuapi.idl:20: DRSUAPI_DRS_ASYNC_OP
> = 0x00000001,
>
> It is being set to '1', but what does that do ?
>
> If you read the release notes for 4.5.0 , you will find this:
>
> samba-tool drs replicate with new options
> -----------------------------------------
>
> 'samba-tool drs replicate' got two new options:
>
> The option '--local-online' will do the DsReplicaSync() via IRPC
> to the local dreplsrv service.
>
> The option '--async-op' will add DRSUAPI_DRS_ASYNC_OP to the
> DsReplicaSync(), which won't wait for the replication result.
>
>
> It would seem that, whilst the replication was/is working correctly, a
> requested reply wasn't received in time, so you got that error message.
>
> Rowland
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
>
--
Elias Pereira
More information about the samba
mailing list