samba-in-kubernetes / samba-operator

An operator for a Samba as a service on PVCs in kubernetes
Apache License 2.0
120 stars 24 forks source link

`TestShareAccessByDomainName` fails 100% on CentOS CI #252

Closed anoopcs9 closed 2 years ago

anoopcs9 commented 2 years ago
=== RUN   TestIntegration/smbSharesClustered/withDNS/TestShareAccessByDomainName
    smb_share_test.go:271: 
            Error Trace:    smb_share_test.go:271
            Error:          Received unexpected error:
                            context deadline exceeded
            Test:           TestIntegration/smbSharesClustered/withDNS/TestShareAccessByDomainName

This was not the case till we switched to reserving nodes from new EC2 pool fro CentOS CI infra.

anoopcs9 commented 2 years ago

Guess what?

# kubectl logs cshare2-65ww65-0 -n samba-operator-system -c dns-register
2022-09-16 09:20:35,476: INFO: enabling ctdb support: will check for leadership
2022-09-16 09:20:35,476: INFO: will watch source
Unknown command 'recmaster'
2022-09-16 09:20:35,518: ERROR: command SambaCommand('ctdb', ['recmaster'], None) failed: CalledProcessError(1, ['ctdb', 'recmaster'])
2022-09-16 09:20:35,518: INFO: skipping dns update. node not leader

Since the switch to fedora36 base image we started consuming Samba v4.16 which renamed recmaster ctdb sub-command to leader and caused dns not to be updated.

anoopcs9 commented 2 years ago
# kubectl logs cshare2-65ww65-0 -n samba-operator-system -c dns-register
2022-09-16 09:20:35,476: INFO: enabling ctdb support: will check for leadership
2022-09-16 09:20:35,476: INFO: will watch source
Unknown command 'recmaster'
2022-09-16 09:20:35,518: ERROR: command SambaCommand('ctdb', ['recmaster'], None) failed: CalledProcessError(1, ['ctdb', 'recmaster'])
2022-09-16 09:20:35,518: INFO: skipping dns update. node not leader

https://github.com/samba-in-kubernetes/sambacc/pull/50 is intended to fix the above error.

anoopcs9 commented 2 years ago

Fixed with https://github.com/samba-in-kubernetes/sambacc/pull/50 and https://github.com/samba-in-kubernetes/samba-container/pull/79