2024-07-23 03:25 PM 2024-07-30 03:40 PM 更新
このドキュメントでは、Nexus Dashboard cluster のトラブルシューティングに使う基本コマンドとその出力例を紹介します。
環境: Nexus Dashboard version 3.1(1k)
※ Version によって使用できるコマンドやその出力が変わる可能性がありますので、ご使用の version でサポートしているコマンドは Cisco Nexus Dashboard ページにある User Guide 等をご参照ください。Version 3.1 の User Content はこちら。
※ Nexus Dashboard version 2.x の acs コマンドについてはこちらをご参照ください。
Nexus Dashboard (以下 ND) node 上で CLI コマンドを実行するには、rescue-user というユーザ (パスワードは admin と同じもの) で ssh アクセスしてください。
acs コマンドは、ND cluster/node の設定や基本的なステータスを確認したり、再起動したりする際に使うコマンドです。
サポートしているオプションとその説明は "acs -h" または "acs --help" と実行すると確認できます。
rescue-user@jtac-se1:~$ acs -h usage: [-h] [-v] {debug-token,passphrase,version,system-config,verify,reboot,shutdown,health,kafka,techsupport,show,bootstrap,deployment,upgrade,failover,rma,node-join,login-prompt,kubectl,ntp,passwd,ping,ip,nslookup,mongo,elasticsearch,audits,recover} ... positional arguments: {debug-token,passphrase,version,system-config,verify,reboot,shutdown,health,kafka,techsupport,show,bootstrap,deployment,upgrade,failover,rma,node-join,login-prompt,kubectl,ntp,passwd,ping,ip,nslookup,mongo,elasticsearch,audits,recover} debug-token show debug token passphrase show passphrase version show version system-config show systemconfig verify verify host reboot reboot node shutdown power down node health check health kafka kafka helpers techsupport techsupport collect/clean show show cluster or nodes info bootstrap bootstrap virtual node deployment show and configures deployment mode upgrade unified software upgrade commands failover standby failover when two masters are down rma rma recovery when two masters are down node-join join existing cluster using passphrase login-prompt enable/disable login prompt kubectl run a subset of kubectl commands ntp ntp status passwd update rescue-user SSH password ping run ping in host namespace ip run ip in host namespace nslookup run nslookup in host namespace mongo mongodb cli elasticsearch show elasticsearch instance info audits show audits operation recover Cluster recover operations after disaster recovery in case of two nodes failures options: -h, --help show this help message and exit -v, --verbose verbose
acs passwd コマンドを使って rescue-user (CLI) の password を変更することができます。
Cluster 内の全ての node で password が変更されます。
GUI の admin user の password は変更されないのでご注意ください。
rescue-user@jtac-se1:~$ acs passwd
Changing password for rescue-user.
Current password:
New password:
Retype new password:
passwd: password updated successfully
Note that rescue-user and admin passwords will be managed separately now.
もっとも基本的なコマンドの1つとして、"acs version" コマンドでその ND node の OS version を確認できます。
rescue-user@jtac-se1:~$ acs version
Nexus Dashboard 3.1.1k
ND cluster の状態を確認したり、構築時や運用中の cluster のトラブルシューティングをする際は、"acs health" コマンドをまず使用します。ND cluster が正常に稼働している場合は "All components are healthy" と表示されます。
rescue-user@jtac-se1:~$ acs health
======
Status
======
All components are healthy
Kubernetes 上の何かしらの resource に問題がある場合はその旨が表示されます。
rescue-user@jtac-se1:~$ acs health
======
Status
======
[minor] cisco-ndfc-controller-elasticsearch: could not fetch component status
[minor] cisco-nir-flow-elasticsearch: could not fetch component status
[minor] cisco-nir-main-elasticsearch: could not fetch component status
[minor] network-storage: nas - Usage has exceeded the configured alert threshold
-d オプションをつけることでこのコマンドでチェックしている全項目の詳細を確認できます。
rescue-user@jtac-se1:~$ acs health -d
[healthy] deployment: node jtac-se1 is bootstrapped
[healthy] deployment: cluster configuration is done
[healthy] spm: agent server is up
[healthy] spm: spm config has been created
[healthy] spm: systemd services have been deployed
[healthy] spm: pre-k8s services have been deployed
[healthy] spm: post-k8s services have been deployed
[healthy] deployment: k8s install is complete
[healthy] elasticsearch: reconciled checks are good
[healthy] nas: reconciled checks are good
[healthy] namespaces: reconciled checks are good
[healthy] pods: reconciled checks are good
[healthy] nodeconfigs: reconciled checks are good
[healthy] spm: reconciled checks are good
[healthy] nodes: reconciled checks are good
[healthy] kafka: reconciled checks are good
[healthy] prometheus: reconciled checks are good
[healthy] etcd: reconciled checks are good
[healthy] apiserverall: reconciled checks are good
[healthy] audits: reconciled checks are good
[healthy] firmwared: reconciled checks are good
[healthy] services: reconciled checks are good
[healthy] falconall: reconciled checks are good
======
Status
======
All components are healthy
※ version 3.0 までの場合はこのコマンド出力に kubectl get pods -A -o wide コマンドの出力 (k8s の各 pod の状態) なども含まれていましたが version 3.1 以降は含まれないため、必要な場合は個別に kubectl コマンドを実行してください。
cluster の情報・設定を確認するには acs show cluster コマンドを使用します。
rescue-user@jtac-se1:~$ acs show cluster ┌─────────────┬─────────┬────────────────────────┬─────────────┬─────────────────┬───────────────┐ │ NAME │ VERSION │ DNS │ # OF NODES │ SERVICE NETWORK │ APP NETWORK │ ├─────────────┼─────────┼────────────────────────┼─────────────┼─────────────────┼───────────────┤ │ jtac-aci-se │ 3.1.1k │ jtac-aci-se.case.local │ Masters: 3 │ 100.80.0.0/16 │ 172.17.0.1/16 │ │ │ │ │ Workers: 0 │ │ │ │ │ │ │ Standbys: 0 │ │ │ └─────────────┴─────────┴────────────────────────┴─────────────┴─────────────────┴───────────────┘
-o json オプションを付けると JSON 形式でより詳細が出力されます。
rescue-user@jtac-se1:~$ acs show cluster -o json { "metadata": { "name": "jtac-aci-se", "uid": "3d8640b9-0298-43e6-aa93-438b9ab45ae1", "resourceVersion": "179595167", "generation": 22, "creationTimestamp": "2023-09-21T09:15:21Z", "annotations": { "status.crd.case.cncf.io": "true" }, "finalizers": [ "falcon.case.cncf.io/clusterconfig-protection" ], "managedFields": [ { "manager": "nodectrlr.bin", "operation": "Update", "apiVersion": "case.cncf.io/v1", "time": "2024-06-27T03:13:09Z", "fieldsType": "FieldsV1", "fieldsV1": { "f:metadata": { "f:annotations": { ".": {}, "f:status.crd.case.cncf.io": {} }, "f:finalizers": { ".": {}, "v:\"falcon.case.cncf.io/clusterconfig-protection\"": {} } }, "f:spec": { ".": {}, "f:appNetwork": { ".": {}, "f:subnet": {} },
----- snip -----
各 node の情報・設定を確認するには acs show nodes コマンドを使用します。
rescue-user@jtac-se1:~$ acs show nodes ╭────────────────────┬────────────────┬──────────┬─────────┬────────────────────┬────────────────────┬─────────╮ │ NAME (*=SELF) │ SERIAL │ VERSION │ ROLE │ DATANETWORK │ MGMTNETWORK │ STATUS │ ├────────────────────┼────────────────┼──────────┼─────────┼────────────────────┼────────────────────┼─────────┤ │ *jtac-se1 │ WMP255000V4 │ 3.1.1k │ Master │ 192.168.200.1/24 │ 10.71.168.201/24 │ Active │ │ │ │ │ │ ::/0 │ ::/0 │ │ │ ------------------ │ -------------- │ -------- │ ------- │ ------------------ │ ------------------ │ ------- │ │ jtac-se2 │ WZP23460YYC │ 3.1.1k │ Master │ 192.168.200.2/24 │ 10.71.168.202/24 │ Active │ │ │ │ │ │ ::/0 │ ::/0 │ │ │ ------------------ │ -------------- │ -------- │ ------- │ ------------------ │ ------------------ │ ------- │ │ jtac-se3 │ WZP23460YYA │ 3.1.1k │ Master │ 192.168.200.3/24 │ 10.71.168.203/24 │ Active │ │ │ │ │ │ ::/0 │ ::/0 │ │ ╰────────────────────┴────────────────┴──────────┴─────────┴────────────────────┴────────────────────┴─────────╯
こちらも -o json オプションを付けると JSON 形式でより詳細が出力されます。
また、nodes の代わりに masters, workers, standbys などと指定すると対象の node のみが出力されます。(nodes の場合は全ての node タイプが出力されます)
acs ntp コマンドで NTP の設定・状態が確認できます。
rescue-user@jtac-se1:~$ acs ntp ind assid status conf reach auth condition last_event cnt =========================================================== 1 23070 961a yes yes none sys.peer sys_peer 1 remote refid st t when poll reach delay offset jitter ============================================================================== *10.66.141.50 .GNSS. 1 u 177 1024 377 158.333 +0.012 0.089
unified image となった version 3.1 以降では、acs deployment コマンドで利用可能な deployment mode を確認したり、現在のモードを確認したり、設定を変更したりできます。
acs deployment show コマンドで利用可能な deployment mode が確認できます。
rescue-user@jtac-se1:~$ acs deployment show ==================================================================== Deployment Name Services -------------------------------------------------------------------- ndfc Controller ndi Insights ndo Orchestrator ndfc-fabric-ndi Controller,Insights ndfc-ndi Controller,Insights ndo-ndi Orchestrator,Insights ====================================================================
acs deployment running コマンドで現在のモードが確認できます。この出力例ではモードが ndfc-fabric-ndi という NDFC と NDI が有効化された状態とわかります。
rescue-user@jtac-se1:~$ acs deployment running Running deployment mode ndfc-fabric-ndi
acs techsupport コマンドを用いた Tech Support の取得方法については Nexus Dashboard:Tech Support ファイルの取得方法 ND version 3.x の中にある CLI での取得 をご参照ください。
acs reboot コマンドで ND node の再起動ができます。利用可能なオプションがいくつかありますので、解説します。
コマンド | 説明 |
acs reboot | service や設定を残したまま再起動 |
acs reboot clean | ND や各 application 上のデータを削除して再起動。bootstrap 時の初期設定や pod image は残したまま実施。 |
acs reboot clean-wipe (version 3.1 以降廃止) | ND や各 application 上のデータに加えて applicatoin/pod image も削除して再起動。bootstrap 時の初期設定のみ残したまま。 |
acs reboot factory-reset | ND や各 application 上のデータに加えて bootstrap 時の初期設定も削除して再起動。applicaton/pod image は残したまま。 |
acs reboot factory-wipe (version 3.1 以降廃止) | ND や各 application 上のデータ、bootstrap 時の初期設定に加えて application/pod image も削除して再起動。 |
検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう
シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします
下記より関連するコンテンツにアクセスできます