故障起因:
1. 服务器重新安装
问题:
无法重新启动funcd 进程
解决方法:
1. 重新安装func ,无效
2. 修改/etc/hosts,无效
3. 删除/etc/pki/certmaster/* ,无效(slave端)
4. 删除/var/lib/certmaster/certmaster/certs/* ,成功(master端)
总结:
1. 原理这个时候就显示的很重要,你要知道它的工作原理,这样就容易判断问题在哪里。
2. 实际是为了更好的理解原理、真正的掌握和创造价值。
附录:
FUNC 使用指南
1. Func 简介:
·Fedora 统一网络控制器
·Fedora Unified Network Controller
·可以用在RedHat系列产品上
·是为了解决统一管理监控问题,而设计开发的系统管理基础框架
·Func 可以让你在主控机上一次管理任意多台服务器,或任意多个服务器组
·Func 命令行可以直接发送远程命令或者远程获取数据
·Func 通讯基于 XMLRPC 和 SSL 标准协议
·新装服务器也可以在 Kickstart 文件中自动安装 Func,自动注册到主控服务器
·建立了 Master - Slaves 主从 SSL 证书管控体系,可以将证书自动分发到所有受控服务器
1.4. Func 安装
·主控端与被控端都需安装
·Certmaster
Func
·下载:[http://download.fedora.redhat.com/pub/epel/]
·/etc/certmaster/certmaster.conf 编辑,允许autosign == yes
·让certmaster启动
·在 /etc/certmaster/minion.conf 指定certmaster服务器
·让funcd服务器启动
·在服务端上看有多少台客户端注册
·certmaster-ca --list-sign
·或
ls /var/lib/certmaster/certmaster/certs/
certmaster-ca -c hostname
或
rm /var/lib/certmaster/certmaster/certs/hostname.cert
·必须在服务端删除此客户机的cert文件
rm /var/lib/certmaster/certmaster/certs/hostname.cert
1.10. 如果在服务端删掉了客户端的 .cert文件怎么办
·可以将client的 /etc/pki/certmaster/hostname.cert 拷贝过来
·将client 的/etc/pki/certmaster/hostname.*也删掉,再重启funcd,cert文件会自动传输过来
CommandModule -- Running Arbitrary Commands Like SSH Does
IPtablesModule -- iptables management
NetworkTest -- Test out network stuff.
ProcessModule -- Process Info, memory usage, and Killing
ServiceModule --Service Status and Control
JBossModule -- monitoring and control jboss instances
HardwareModule -- Hardware Profilling
MountModule -- mount, unmount, and query mounted resources
NagiosCheck -- be able to call Nagios plugins and get their results,without needing to install nagios. Works with any plugin
·格式:
func hostname call command run command
·例:
func ’ssh-1′ call command run /usr/bin/uptime
func ’ssh-1′ call command run “date -s 09:47:40“
func ’ssh-1′ call command run “hwclock -w“
func “ssh-1″ call command run “cat /proc/cpuinfo” 不过排列不好看
·格式:
Func hostname call service start/stop/restart servername
·例:
func ssh-1 call service start httpd
func ssh-1 call service stop sendmail
Func ssh-1 call service restart named
·格式:
func hostname call hardware info
-例:
func ’ssh-1′ call hardware info
如果不能执行一般是因为 smolt 没有安装
·格式:
func hostname call iptables command
·例:
func “ssh-1″ call iptables policy func “ssh-1″ call iptables dump func “ssh-1″ call iptables.port drop_to 53 192.168.0.0/24 udp src
func ’ssh-1′ call iptables run “-L INPUT” func ’ssh-1′ call iptables policy OUTPUT DROP func ’ssh-1′ call iptables drop_from 192.168.0.10
·格式: Func hostname call command run command
·例: func ’ssh-1′ call command run ‘iptables -A INPUT -s 192.168.239.233 -j DROP’
·格式:
func hostname call jboss command
·例:
func “*” call jboss status
func “*” call jboss check
func “*” call jboss search_by_instance “default“
func “*” call jboss search_by_address “127.0.0.1“
func “*” call jboss search_by_port 8080
·格式:
Func hostname call process command
·例:
func ssh-1 call process info “aux”
func ssh-1 call process mem
func ssh-1 call process kill httpd SIGHUP
·格式:
Func hostname call sysctl command
·例:
func ssh-1 call sysctl list
func “*” call sysctl get <parameter> func “*” call sysctl set <parameter> <value>
func ssh-1 call sysctl set net.ipv4.tcp_syncookies 1
2.1.8. RpmModule模块 ( =rpm –qa )
func ssh-1 call rpms inventory
2.1.9. SmartModule模块 ( 看硬盘信息 )
func ssh-1 call smart info
func ssh-1 call yumcmd update
func ssh-1 call command run ‘yum update’
转载于:https://blog.51cto.com/shenyj/1404637