-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NT_STATUS_LOGON_FAILURE when rollout restart a Samba Statefulset with CTDB feature #262
Comments
Thanks for reporting this! That's all speculation so far. First question - can we assume things were working OK prior to running the restart command? Next, the persistent tdb files should be stored on a PV. Can you help us confirm that the pods are mounting a persistent volume for the relevant paths under /var/lib - a full Finally, it would be helpful to see some of logs from the init containers from both before and after Thanks! |
Thanks for the reply! I'm still researching what is causing the tdb files to disappear after rollout restart. It seems that this problem only happens when restarting a Samba server with CTDB feature enabled. Maybe it is the difference in the behavior of rollout restart in
I checked samba with
the full YAML file for samba Statefulset is as below:
Logs of init containers before
Logs of init containers after
|
UPDATES: Looks like the user information is mounted successfully in the pod:
And when I execute |
Very interesting! No, this is not intended behavior. I would consider this a bug. I think what might be happening is that when all the pods restart they are not importing all the configuration data - because some data is expected to persist in the samba db files, but other data like the users/groups stored in /etc are kept in system files and these files are "reset" every time the container is started. The code may be failing to distinguish between configuration data that needs to be recreated on every container vs. configuration data that persists and then simply doesn't bother trying to recreate the former type of configuration data. In addition, when we test with AD enabled we might miss this because in the AD case the users/groups data is not stored in the containers. One of my teammates @anoopcs9 suggested that we should incorporate the rolling restart into one of test cases. I agree. We should try to fix this issue and create an integration test to verify the fix! |
@anoopcs9 this issue may also be more in sambacc if we tightly couple the creation of /etc/passwd and /etc/group with the population of the samba passdb. We may need to make sure that the passdb can be populated independently of the /etc/{passwd,group} files and maybe have an init container that creates the latter every time the pod is started? At the very least it's a good first place to look if we can reproduce the error. |
Hi, is there any news regarding this issue? |
Unfortunately, no. I don't think anyone on the team has had the time to work on the CTDB support in a while. It's still on our radar though! |
@phlogistonjohn I think I figured out where the problem is. In Samba Statefulset, there is a init container to do some initialization works:
This command includes importing samba config and user data to registry. When performing a rollout restart, the node file is still in state pvc and init container "wrongly" thinks that the initialization process has been done. |
Ohh, interesting. That could be it. Can you see if there are other unique states we could key off of to tell when the rollout is occuring vs. a typical bringup? |
@phlogistonjohn To my understanding, there isn't a specific field or status condition in k8s api that indicates whether a resource is undergoing a rollout restart. If this method is not feasible, an alternative (but not convenient) way may be manually adding custom labels/annotations to the Statefulset before rollout. |
@FTS152, thanks for reporting this! Like @phlogistonjohn , I am not familiar with Regarding the tdb files vanishing from Those local tdb copies (LTDBs) should not be manipulated directly. One can use the ctdb tool or ltdbtool for onteraction with the clustered or local databases. |
Hi, I am trying to deploy a Samba service with CTDB support on a bare-metal k3s cluster, here is my environment:
I use rook-ceph as my backend storage and metalLB as my load balancer:
I deploy a Samba statefulset with
minClusterSize=3
and so far so good:However when I restart samba by
kubectl rollout restart
without any changes, I cannot login to samba server anymore after rolling update is done:What I figured out are that
account_policy.tdb
,group_mapping.tdb
andregistry.tdb
disappeared in/var/lib/samba
in the pod, and some error messages in log file of samba container:Also samba share information is lost in registry in the pod.
Any ideas? Thanks.
The text was updated successfully, but these errors were encountered: