Triton headnode的状态检查
headnode启动后可以运行sdc-healthcheck命令来查看各个服务的状态。
[root@headnode (masan) ~]# sdc-healthcheck ZONE STATE AGENT STATUS global running - online assets running - online sapi running - online binder running - online manatee running - online moray running - online amonredis running - svc-err redis running - svc-err ufds running - online workflow running - online amon running - online sdc running - online papi running - online napi running - online rabbitmq running - online imgapi running - online cnapi running - online dhcpd running - online fwapi running - online vmapi running - online ca running - online mahi running - online adminui running - online cloudapi running - online docker running - online global running ur online global running smartlogin online
正常应该都是online的状态。像上面的输出中,有两个zone处于svc-err,意味着这两个zone上有服务出现错误。我们可以登陆上去检查、修复。
[root@headnode (masan) ~]# sdc-login redis [Connected to zone '0d378bc6-dc59-4b13-86d1-4aaa7b6152d5' pts/2] Last login: Sat Apr 30 09:13:46 on pts/2 [root@0d378bc6-dc59-4b13-86d1-4aaa7b6152d5 (masan:redis0) ~]# svcs -xv svc:/application/redis:default (Redis server) State: maintenance since Sat Apr 30 11:41:43 2016 Reason: Method failed. See: http://illumos.org/msg/SMF-8000-8Q See: /var/svc/log/application-redis:default.log Impact: This service is not running. [root@0d378bc6-dc59-4b13-86d1-4aaa7b6152d5 (masan:redis0) ~]# svcadm restart redis [root@0d378bc6-dc59-4b13-86d1-4aaa7b6152d5 (masan:redis0) ~]# svcadm clear redis [root@0d378bc6-dc59-4b13-86d1-4aaa7b6152d5 (masan:redis0) ~]# svcs -xv
sdc-login redis用于登陆的redis这个zone上;svcs -xv列出有错误的服务;可以看到是redis服务启动失败;svcadm restart redis重启此服务,然后用svcadm clear redis来清除它原来的maintenance状态,再次用svcs -xv来确认服务已经正常启动。
同样可以来修复amoneredis zone上的错误。