2022-01-27
04:57 PM
- 最終編集日:
2024-07-23
04:02 PM
、編集者:
JapanTAC_CSC
このドキュメントでは、Nexus Dashboard cluster のトラブルシューティングに使う基本コマンドとその出力例を紹介します。
環境: Nexus Dashboard version 2.1(1e)
※ Version によって使用できるコマンドやその出力が変わる可能性がありますので、ご使用の version でサポートしているコマンドは Cisco Nexus Dashboard ページにある User Guide 等をご参照ください。Version 2.1 の User Guide はこちら。
※ Nexus Dashboard version 3.x の acs コマンドについてはこちらをご参照ください。
Nexus Dashboard (以下 ND) node 上で CLI コマンドを実行するには、rescue-user というユーザ (パスワードは admin と同じもの) で ssh アクセスしてください。
acs コマンドは、ND cluster/node の設定や基本的なステータスを確認したり、再起動したりする際に使うコマンドです。
サポートしているオプションとその説明は "acs -h" または "acs --help" と実行すると確認できます。
$ acs -h usage: [-h] [-v] {debug-token,version,config,system-config,reboot,health,techsupport,cluster,apps,bootstrap,failover,rma,installer,node-join,login-prompt,ntp,ping,ip,nslookup,mongo} ... positional arguments: {debug-token,version,config,system-config,reboot,health,techsupport,cluster,apps,bootstrap,failover,rma,installer,node-join,login-prompt,ntp,ping,ip,nslookup,mongo} debug-token show debug token version show version config show system config system-config show systemconfig reboot reboot node health check health techsupport techsupport collect/clean cluster show cluster info apps show app info bootstrap bootstrap virtual node failover standby failover when two masters are down rma rma recovery when two masters are down installer installer options node-join join existing cluster using passphrase login-prompt enable/disable login prompt ntp ntp options ping run ping in host namespace ip run ip in host namespace nslookup run nslookup in host namespace mongo mongodb cli optional arguments: -h, --help show this help message and exit -v, --verbose verbose
もっとも基本的なコマンドの1つとして、"acs version" コマンドでその ND node の OS version を確認できます。
$ acs version Nexus Dashboard 2.1.1e
ND cluster の状態を確認したり、構築時や運用中の cluster のトラブルシューティングをする際は、"acs health" コマンドをまず使用します。ND cluster が正常に稼働している場合は "All components are healthy" と表示されます。
$ acs health All components are healthy
Kubernetes 上の何かしらの resource に問題がある場合はその旨が表示されます。以下は kafka に問題がある場合の出力例です。
$ acs health k8s: services not in desired state - kafka
-d オプションをつけることでこのコマンドでチェックしている全項目の状態確認と、Kubernetes の全 Pod のステータス確認をするときに使用する "kubectl get pods -A -o wide" コマンドの出力が確認できます。
"kubectl get pods -A -o wide" コマンドの出力では、各 Pod の STATUS が Running や Completed であれば問題ありません。
$ acs health -d data network is reachable to all nodes clusterd is healthy k8s: etcd cluster is ready k8s: apiserver is reachable k8s: all nodes are ready k8s: cluster is healthy k8s: all services are ready k8s: infra namespaces are present - kafka,kube-system,zk node is correctly bootstrapped k8s: network is healthy installer: no failed upgrade found elasticsearch: cluster state is green elasticsearch-nir: cluster state is green k8s: autoinstalled namespaces are present - cisco-appcenter firmwared: no application errors found ntp: synchronised with NTP server All components are healthy Debug information ================= kubectl get pods -A -o wide --------------------------- NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES authy authy-57d8d674f5-8d5qh 4/4 Running 0 49d 172.17.27.13 jtac-se3 <none> <none> authy authy-57d8d674f5-j7kjc 4/4 Running 0 49d 172.17.27.18 jtac-se1 <none> <none> authy authy-57d8d674f5-tcmmq 4/4 Running 0 49d 172.17.27.15 jtac-se2 <none> <none> cisco-appcenter apiserver-7bdd5b869b-jxhnq 1/1 Running 0 49d 172.17.27.80 jtac-se3 <none> <none> cisco-appcenter appcenter-ui-786dcf6455-4vbqj 1/1 Running 0 49d 172.17.27.82 jtac-se2 <none> <none> cisco-appcenter appcenterconnector-79fb58979c-tb76t 1/1 Running 0 49d 172.17.27.76 jtac-se1 <none> <none> cisco-appcenter appsync-5d6654f6bd-2v6ln 1/1 Running 0 49d 172.17.27.77 jtac-se1 <none> <none> cisco-appcenter store-59dbf-rlwr5 1/1 Running 0 49d 172.17.27.78 jtac-se1 <none> <none> cisco-intersightdc deviceconnector-bjpnt 1/1 Running 0 49d 172.17.27.42 jtac-se1 <none> <none> cisco-intersightdc deviceconnector-khl2f 1/1 Running 0 49d 172.17.27.59 jtac-se3 <none> <none> cisco-intersightdc deviceconnector-rthpt 1/1 Running 0 49d 172.17.27.64 jtac-se2 <none> <none> cisco-nir-nae-nb-mongodb mongodb-0 2/2 Running 0 49d 172.17.27.86 jtac-se2 <none> <none> cisco-nir-nae-nb-mongodb mongodb-1 2/2 Running 0 49d 172.17.27.88 jtac-se1 <none> <none> ----- snip -----
ND cluster の設定を確認するためには "acs cluster config" コマンドを使用します。
cluster 名 (Name) や DNS server (NameServers)、NTP server (NtpServers) の設定が正しいか、このコマンドを実行した node 以外の node の Serial Number と In-band IP address (SeedList) が正しいか、などが確認できます。
$ acs cluster config ┌──────────────────────────┬───────────────────────────────────────────────────────────┐ │ ATTRIBUTES │ APP SE CONFIG │ ├──────────────────────────┼───────────────────────────────────────────────────────────┤ │ ActiveMasters │ 3 │ │ AllMastersUp │ true │ │ AppNetwork GatewayIP │ <nil> │ │ AppNetwork Iface │ app-vnic │ │ AppNetwork IfaceIP │ 172.17.0.0 │ │ AppNetwork Subnet │ 172.17.0.0/16 │ │ ClusterVersion │ 2.1.1e │ │ DNSDomain │ jtac-aci-se.case.local │ │ ExistingCluster │ true │ │ HealthyCluster │ true │ │ ID │ fa0da1d8-1a9f-46bf-bced-045f1ee0abcd │ │ InbandIface │ bond0br100 │ │ MaxMasters │ 3 │ │ Mode │ standalone │ │ Name │ jtac-aci-se │ │ NameServers │ [X.X.X.X] │ │ NtpServers │ [10.66.141.50] │ │ SeedList │ [{WZP23460YYA 192.168.200.3} {WZP23460YYC 192.168.200.2}] │ │ ServiceNetwork GatewayIP │ <nil> │ │ ServiceNetwork Iface │ │ │ ServiceNetwork IfaceIP │ 100.80.0.0 │ │ ServiceNetwork Subnet │ 100.80.0.0/16 │ │ StandbyList │ [] │ │ TargetVersion │ │ │ WorkerList │ [] │ └──────────────────────────┴───────────────────────────────────────────────────────────┘
"acs cluster masters" コマンドで各 ND node の In-band/management network の設定や、各種ステータスが確認できます。
$ acs cluster masters ┌───────────────────────┬──────────────────────────────────────┬──────────────────────────────────────┬──────────────────────────────────────┐ │ ATTRIBUTES │ JTAC-SE1 │ JTAC-SE2 │ JTAC-SE3 │ ├───────────────────────┼──────────────────────────────────────┼──────────────────────────────────────┼──────────────────────────────────────┤ │ CleanReboot │ false │ false │ false │ │ DataNetwork GatewayIP │ 192.168.200.254 │ 192.168.200.254 │ 192.168.200.254 │ │ DataNetwork Iface │ bond0br100 │ bond0br100 │ bond0br100 │ │ DataNetwork IfaceIP │ 192.168.200.1 │ 192.168.200.2 │ 192.168.200.3 │ │ DataNetwork Subnet │ 192.168.200.1/24 │ 192.168.200.2/24 │ 192.168.200.3/24 │ │ FirmwareVersion │ 2.1.1e │ 2.1.1e │ 2.1.1e │ │ FirstMaster │ true │ false │ false │ │ ID │ 10d72974-e60b-4422-b7ab-6160b020ae5a │ 79770963-620b-4ad3-86ad-773a55b971c8 │ 94bf508b-6369-4df8-9340-41fa2ddb8105 │ │ Labels │ │ │ │ │ MgmtNetwork GatewayIP │ 10.71.168.254 │ 10.71.168.254 │ 10.71.168.254 │ │ MgmtNetwork Iface │ bond1br │ bond1br │ bond1br │ │ MgmtNetwork IfaceIP │ 10.71.168.201 │ 10.71.168.202 │ 10.71.168.203 │ │ MgmtNetwork Subnet │ 10.71.168.201/24 │ 10.71.168.202/24 │ 10.71.168.203/24 │ │ Model │ SE-NODE-G2 │ SE-NODE-G2 │ SE-NODE-G2 │ │ Name │ jtac-se1 │ jtac-se2 │ jtac-se3 │ │ Role │ Master │ Master │ Master │ │ SecondaryStatus │ Alive │ Alive │ Alive │ │ Self │ true │ false │ false │ │ SerialNumber │ WZP23460YYG │ WZP23460YYC │ WZP23460YYA │ │ Status │ Active │ Active │ Active │ └───────────────────────┴──────────────────────────────────────┴──────────────────────────────────────┴──────────────────────────────────────┘
"acs techsupport" コマンドでその node の techsupport の取得や消去ができます。cluster に問題がある場合など、GUI から cluster 全体の techsupport 取得ができない場合に利用します。
取得する場合は "acs techsupport collect -s system" と実行します。-s の後は cisco-nir などど指定して特定の App log のみを取得することもできますが、特段の理由がない限り -s system で全てのログを取得します。
$ acs techsupport collect -s system
Started: TS collection may take 15-20 minutes to complete. Monitor /techsupport/ for the file
$ ls /techsupport/ 2022-01-27T07-33-38Z-ts-jtac-se1.jtac-aci-se.case.local.tgz
ダウンロード後は、"acs techsupport clean" を実行することで /techsupport/ directory の中身を消去できます。
$ acs techsupport clean Local TS cleanup complete
acs reboot コマンドで ND node の再起動ができます。利用可能なオプションがいくつかありますので、解説します。
コマンド | 説明 |
acs reboot | service や設定を残したまま再起動 |
acs reboot clean | ND や各 application 上のデータを削除して再起動。bootstrap 時の初期設定や pod image は残したまま実施。 |
acs reboot clean-wipe | ND や各 application 上のデータに加えて applicatoin/pod image も削除して再起動。bootstrap 時の初期設定のみ残したまま。 |
acs reboot factory-reset | ND や各 application 上のデータに加えて bootstrap 時の初期設定も削除して再起動。applicaton/pod image は残したまま。 |
acs reboot factory-wipe | ND や各 application 上のデータ、bootstrap 時の初期設定に加えて application/pod image も削除して再起動。 |
検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう
シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします
下記より関連するコンテンツにアクセスできます