我們越過山和大海,也穿過人山人海,克服重重困難之后,終于將Rocks cluster7 安裝完成。
這時你新建了幾個賬號,運行"rocks sync users"命令進行同步時,卻發(fā)現(xiàn)以下密密麻麻的報錯:
[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 ~]#
不知道你是什么個心情,反正我是有點懵。
果然,用戶只在管理節(jié)點上被創(chuàng)建了,計算節(jié)點上什么都沒有。
- 如果你也有同樣的困惑,我覺得你的問題有救了,雖然我到現(xiàn)在也沒完全明白這個bug的機制是啥,但應該可以解決你的問題。
解決辦法
- 查看你的uid和gid,看看他們是否到大于等于1000。
[root@XXXX ~]# id test
uid=1001(test) gid=1001(test) groups=1001(test)
在Rocks cluster 7 的世界里,1000以內(nèi)的都是系統(tǒng)用戶,所以你需要修改你的uid,gid即可實現(xiàn)同步。
- 查看你的httpd服務(wù)是否開啟
[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到計算節(jié)點,輸入一下命令,強行同步
411get --all
一般來說都可以成功,但一旦有添加用戶或修改密碼都要在所有的計算節(jié)點上運行,不過仍不失是一個很好的解決辦法。
如果本文解決了你的問題,那么,英雄給點個贊再走唄!??!