Rocks cluster7 用户信息无法同步
2018-12-24 本文已影响0人
real3721
我们越过山和大海,也穿过人山人海,克服重重困难之后,终于将Rocks cluster7 安装完成。
这时你新建了几个账号,运行"rocks sync users"命令进行同步时,却发现以下密密麻麻的报错:
[root@XXX ~]# useradd test
[root@XXX ~]# passwd test
Changing password for user test.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@fuanhua ~]# rocks sync users
make: Entering directory `/var/411'
rm -rf /etc/411.d/*
make
make[1]: Entering directory `/var/411'
/opt/rocks/sbin/411put --comment="#" /etc/auto.master
Event '411Alert' dispatched! Coalescing enabled: false
411 Wrote: /etc/411.d/etc.auto..master
Size: 729/235 bytes (encrypted/plain)
/opt/rocks/sbin/411put --comment="#" /etc/auto.misc
Event '411Alert' dispatched! Coalescing enabled: false
411 Wrote: /etc/411.d/etc.auto..misc
Size: 1531/829 bytes (encrypted/plain)
/opt/rocks/sbin/411put --comment="#" /etc/auto.share
Event '411Alert' dispatched! Coalescing enabled: false
411 Wrote: /etc/411.d/etc.auto..share
Size: 5981/4123 bytes (encrypted/plain)
/opt/rocks/sbin/411put --comment="#" /etc/auto.home
Event '411Alert' dispatched! Coalescing enabled: false
411 Wrote: /etc/411.d/etc.auto..home
Size: 6090/4202 bytes (encrypted/plain)
/opt/rocks/sbin/411put --comment="#" /etc/auto.net
Event '411Alert' dispatched! Coalescing enabled: false
411 Wrote: /etc/411.d/etc.auto..net
Size: 2860/1808 bytes (encrypted/plain)
/opt/rocks/sbin/411put --comment="#" /etc/auto.smb
Event '411Alert' dispatched! Coalescing enabled: false
411 Wrote: /etc/411.d/etc.auto..smb
Size: 1823/1044 bytes (encrypted/plain)
/opt/rocks/sbin/411put --comment="#" /etc/ssh/shosts.equiv
Event '411Alert' dispatched! Coalescing enabled: false
411 Wrote: /etc/411.d/etc.ssh.shosts..equiv
Size: 883/348 bytes (encrypted/plain)
/opt/rocks/sbin/411put --comment="#" /etc/ssh/ssh_known_hosts
Event '411Alert' dispatched! Coalescing enabled: false
411 Wrote: /etc/411.d/etc.ssh.ssh_known_hosts
Size: 5981/4127 bytes (encrypted/plain)
/opt/rocks/sbin/411put --nocomment /etc/passwd
Event '411Alert' dispatched! Coalescing enabled: false
411 Wrote: /etc/411.d/etc.passwd
Size: 13417/9627 bytes (encrypted/plain)
/opt/rocks/sbin/411put --nocomment /etc/group
Event '411Alert' dispatched! Coalescing enabled: false
411 Wrote: /etc/411.d/etc.group
Size: 12445/8910 bytes (encrypted/plain)
/opt/rocks/sbin/411put --nocomment /etc/shadow
Event '411Alert' dispatched! Coalescing enabled: false
411 Wrote: /etc/411.d/etc.shadow
Size: 13073/9375 bytes (encrypted/plain)
make[1]: Leaving directory `/var/411'
make: Leaving directory `/var/411'
[root@XXX ~]#
不知道你是什么个心情,反正我是有点懵。
果然,用户只在管理节点上被创建了,计算节点上什么都没有。
- 如果你也有同样的困惑,我觉得你的问题有救了,虽然我到现在也没完全明白这个bug的机制是啥,但应该可以解决你的问题。
解决办法
- 查看你的uid和gid,看看他们是否到大于等于1000。
[root@XXXX ~]# id test
uid=1001(test) gid=1001(test) groups=1001(test)
在Rocks cluster 7 的世界里,1000以内的都是系统用户,所以你需要修改你的uid,gid即可实现同步。
- 查看你的httpd服务是否开启
[root@XXX ~]# service httpd status
Redirecting to /bin/systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2018-11-19 15:20:31 CST; 18h ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 2638 (httpd)
Status: "Total requests: 3; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
├─2638 /usr/sbin/httpd -DFOREGROUND
├─3232 /usr/sbin/httpd -DFOREGROUND
├─3233 /usr/sbin/httpd -DFOREGROUND
├─3235 /usr/sbin/httpd -DFOREGROUND
├─3237 /usr/sbin/httpd -DFOREGROUND
└─3238 /usr/sbin/httpd -DFOREGROUND
Nov 19 15:20:30 fuanhua.com systemd[1]: Starting The Apache HTTP Server...
Nov 19 15:20:31 fuanhua.com httpd[2638]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf.d/411.conf:7
Nov 19 15:20:31 fuanhua.com systemd[1]: Started The Apache HTTP Server.
- 如果仍未有改观,终极杀器
ssh到计算节点,输入一下命令,强行同步
411get --all
一般来说都可以成功,但一旦有添加用户或修改密码都要在所有的计算节点上运行,不过仍不失是一个很好的解决办法。
如果本文解决了你的问题,那么,英雄给点个赞再走呗!!!