目錄

簡介

預檢查

AutoVNF備份

AutoVFN重新部署

備份還原

後檢查

簡介

本文檔介紹在Ultra-M中重新部署AutoVNF所需的步驟。AutoVNF負責啟動單個虛擬網路功能管理器(VNFM)和虛擬網路功能(VNF)。

預檢查

1.登入到OpenStack Platform Director(OSPD)，並在運行狀況報告中驗證虛擬機器(VM)的狀態。

[stack@labucs300-ospd ~]$ cat /var/log/cisco/ultram-health/*.report | grep -i xxx

[stack@labucs300-ospd ~]$ cat /var/log/cisco/ultram-health/ultram_health_uas.report

---------------------------------------------------------------------------------------------------------

VNF-ID/VNFD-ID           | UAS Node | Status| Error Info, if any

---------------------------------------------------------------------------------------------------------

10.10.10.40/LABPGW300-UAS | autovnf  | :-)   | LABPGW300-UAS:(alive)

|          |       |   labucs300-UAS-LABPGW300-UAS-core-UAS2-2:(alive)

|          |       |   labucs300-UAS-LABPGW300-UAS-core-UAS2-1:(alive)

10.10.10.40/LABPCF300-UAS | autovnf  | :-)   | LABPCF300-UAS:(alive)

|          |       |   labucs300-UAS-LABPCF300-UAS-core-UAS1-2:(alive)

|          |       |   labucs300-UAS-LABPCF300-UAS-core-UAS1-1:(alive)

10.10.10.45/LABPCF300-UGP | vnf-em   | :-)   | LABPCF300-UGP:(alive)

|          |       |   LABPCF300-LABPCF300-UGP-core-EM1-3:(alive)

|          |       |   LABPCF300-LABPCF300-UGP-core-EM1-2:(alive)

|          |       |   LABPCF300-LABPCF300-UGP-core-EM1-1:(alive)

10.10.10.45/LABPCF300-ESC | esc      | :-)   | LABPCF300-ESC:(alive)

|          |       |   LABPCF300-LABPCF300-ESC-core-ESC1-1:(alive)

|          |       |   LABPCF300-LABPCF300-ESC-core-ESC1-2:(alive)

10.10.10.45/LABPCF300-UGP | vnf      | :-)   | LABPCF300-UGP:(alive)

|          |       |   LABPCF300-LABPCF300-UGP-core-LABPCF300-CF-VDU-1:(alive)

|          |       |   LABPCF300-LABPCF300-UGP-core-LABPCF300-CF-VDU-0:(alive)

|          |       |   LABPCF300-LABPCF300-UGP-core-LABPCF300-SF-VDU-3:(alive)

|          |       |   LABPCF300-LABPCF300-UGP-core-LABPCF300-SF-VDU-2:(alive)

|          |       |   LABPCF300-LABPCF300-UGP-core-LABPCF300-SF-VDU-1:(alive)

|          |       |   LABPCF300-LABPCF300-UGP-core-LABPCF300-SF-VDU-0:(alive)

|          |       |   LABPCF300-LABPCF300-UGP-core-LABPCF300-SF-VDU-6:(alive)

|          |       |   LABPCF300-LABPCF300-UGP-core-LABPCF300-SF-VDU-5:(alive)

|          |       |   LABPCF300-LABPCF300-UGP-core-LABPCF300-SF-VDU-4:(alive)

10.10.10.48/LABPGW300-UGP | vnf-em   | :-)   | LABPGW300-UGP:(alive)

|          |       |   LABPGW300-LABPGW300-UGP-core-EM2-2:(alive)

|          |       |   LABPGW300-LABPGW300-UGP-core-EM2-3:(alive)

|          |       |   LABPGW300-LABPGW300-UGP-core-EM2-1:(alive)

10.10.10.48/LABPGW300-ESC | esc      | :-)   | LABPGW300-ESC:(alive)

|          |       |   LABPGW300-LABPGW300-ESC-core-ESC2-1:(alive)

|          |       |   LABPGW300-LABPGW300-ESC-core-ESC2-2:(alive)

10.10.10.48/LABPGW300-UGP | vnf      | :-)   | LABPGW300-UGP:(alive)

|          |       |   LABPGW300-LABPGW300-UGP-core-LABPGW300-SF-VDU-4:(alive)

|          |       |   LABPGW300-LABPGW300-UGP-core-LABPGW300-SF-VDU-5:(alive)

|          |       |   LABPGW300-LABPGW300-UGP-core-LABPGW300-SF-VDU-6:(alive)

|          |       |   LABPGW300-LABPGW300-UGP-core-LABPGW300-SF-VDU-0:(alive)

|          |       |   LABPGW300-LABPGW300-UGP-core-LABPGW300-SF-VDU-1:(alive)

|          |       |   LABPGW300-LABPGW300-UGP-core-LABPGW300-SF-VDU-2:(alive)

|          |       |   LABPGW300-LABPGW300-UGP-core-LABPGW300-SF-VDU-3:(alive)

|          |       |   LABPGW300-LABPGW300-UGP-core-LABPGW300-CF-VDU-0:(alive)

|          |       |   LABPGW300-LABPGW300-UGP-core-LABPGW300-CF-VDU-1:(alive)

---------------------------------------------------------------------------------------------------------

2.檢驗AutoVNF狀態。

[stack@labucs300-ospd ~]$ source *core

[stack@labucs300-ospd ~]$ nova list | grep LABPGW300-UAS-core-UAS2

| 8608fda4-b763-4753-95ff-2e07852098e3 | labucs300-UAS-LABPGW300-UAS-core-UAS2-1 | ACTIVE | - | Running | labucs300-UAS-LABPGW300-ORCH-NW=192.0.2.15; labucs300-UAS-LABPGW300-MGMT-NW=192.0.2.7 |

| 19f4496c-3907-4ea5-84c9-e5a6ef222392 | labucs300-UAS-LABPGW300-UAS-core-UAS2-2 | ACTIVE | - | Running | labucs300-UAS-LABPGW300-ORCH-NW=192.0.2.17; labucs300-UAS-LABPGW300-MGMT-NW=192.0.2.16

labucs300-UAS-LABPGW300-UAS-core-UAS2-2 -> VNFM2-UAS-VIP Primary

labucs300-UAS-LABPGW300-UAS-core-UAS2-1 -> Secondary

3.登入到AutoIT並檢查心跳日誌。

ubuntu@labucs300-autoit-2:~$ grep "'restarting'" /var/log/cisco/uas/heartbeat.log

2021-02-22 01:41:42,808 - 192.0.2.15: Notify Event: {'action': 'restart', 'source': 'heartbeat', 'event': 'restarting', 'ip': '192.0.2.15'}

2021-02-22 01:45:42,251 - 192.0.2.15: Notify Event: {'action': 'restart', 'source': 'heartbeat', 'event': 'restarting', 'ip': '192.0.2.15'}

2021-02-23 01:43:36,013 - 192.0.2.15: Notify Event: {'action': 'restart', 'source': 'heartbeat', 'event': 'restarting', 'ip': '192.0.2.15'}

2021-02-23 01:45:55,785 - 192.0.2.15: Notify Event: {'action': 'restart', 'source': 'heartbeat', 'event': 'restarting', 'ip': '192.0.2.15'}

2021-02-24 01:45:19,680 - 192.0.2.15: Notify Event: {'action': 'restart', 'source': 'heartbeat', 'event': 'restarting', 'ip': '192.0.2.15'}

ubuntu@labucs300-autoit-2:~$ cd /var/log/cisco/uas

ubuntu@labucs300-autoit-2:/var/log/cisco/uas$ grep "Rebooting Instance" uas_USPCHBWorker.log

2019-06-26 18:26:13,088 - Rebooting Instance: 19f4496c-3907-4ea5-84c9-e5a6ef222392

2019-06-29 03:45:12,710 - Rebooting Instance: 19f4496c-3907-4ea5-84c9-e5a6ef222392

2020-07-17 00:46:25,800 - Rebooting Instance: 19f4496c-3907-4ea5-84c9-e5a6ef222392

2020-07-18 00:47:13,347 - Rebooting Instance: 19f4496c-3907-4ea5-84c9-e5a6ef222392

2020-07-18 05:11:11,133 - Rebooting Instance: 19f4496c-3907-4ea5-84c9-e5a6ef222392

2020-07-18 5:16:07,333 - Rebooting Instance: 19f4496c-3907-4ea5-84c9-e5a6ef222392

AutoVNF備份

AutoVNF負責啟動單個VNFM和VNF。AutoDeploy將例項化VNFM和VNF所需的配置傳送到AutoVNF，AutoVNF執行此操作。為了啟動VNFM，

AutoVNF直接與VIM/openstack對話，在VNFM啟動後，AutoVNF使用VNFM來啟動VNF。

AutoVNF有1:1冗餘，在UltraM設定中，有2個AutoVNF VM在HA模式下運行。

AutoVNF備份詳細資訊：

- 運行配置

- ConfD CDB DB

- AutoVNF日誌（來自AutoVNF的每個例項）

- 系統日誌配置

重要事項： 必須在對給定的POD/站點執行任何啟用/停用操作並上傳到備份伺服器之前執行備份。

1.在/opt/uas_baseconfig.txt中的主和輔助AutoIT上，將ha_debug設定為ON。

附註：ha_debug標誌全部為大寫。它可為ON或OFF。

ubuntu@labucs300-autoit-2:~$ vi /opt/uas_baseconfig.txt

ha: true

ha-vip: 172.16.181.7

ha-secret: f99d04acb84807c4c6c6c0eaad392b5c

orch-ips: 172.16.181.5,172.16.181.8

orch-intf: eth0

prov-ha-vip: 172.16.181.13

prov-intf: eth0

profile: AUTOIT

ha_debug: ON

ubuntu@labucs300-autoit-1:~$ vi /opt/uas_baseconfig.txt

ha: true

ha-vip: 172.16.181.7

ha-secret: f99d04acb84807c4c6c6c0eaad392b5c

orch-ips: 172.16.181.5,172.16.181.8

orch-intf: eth0

prov-ha-vip: 172.16.181.13

prov-intf: eth0

profile: AUTOIT

ha_debug: ON

2.使用以下命令停止主AutoIT上的AutoIT服務：

ssh   ubuntu@ < AutoIT Floating IP>

sudo -i

service autoit stop

這是為了防止在後續步驟中啟動關閉時AutoIT觸發Ultra自動化服務(UAS)的自動恢復。

ubuntu@labucs300-autoit-2:~$ sudo -i

root@labucs300-autoit-2:~#

root@labucs300-autoit-2:~# service autoit status

autoit start/running, process 25001

root@labucs300-autoit-2:~# service autoit stop

3.在檔案/opt/uas_baseconfig.txt中，在主要AutoVNF(UAS)和輔助AutoVNF(UAS)上將ha_debug設定為ON。

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-2:~$ vi /opt/uas_baseconfig.txt

ha: true

ha-vip: 192.0.2.8

ha-secret: d5a9fee60ddae4fe357677dcf1320e51

orch-ips: 192.0.2.15,192.0.2.17

orch-intf: eth0

profile: AUTOVNF

ha_debug: ON

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-2:~$ ssh ubuntu@192.0.2.15

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-1:~$ cat /opt/uas_baseconfig.txt

ha: true

ha-vip: 192.0.2.8

ha-secret: d5a9fee60ddae4fe357677dcf1320e51

orch-ips: 192.0.2.15,192.0.2.17

orch-intf: eth0

profile: AUTOVNF

ha_debug: ON

4.從OSPD關閉輔助UAS，並給予讚揚。

. corerc ; openstack server stop <VMName>

labucs300-UAS-LABPGW300-UAS-core-UAS2-2 -> VNFM2-UAS-VIP Primary

labucs300-UAS-LABPGW300-UAS-core-UAS2-1 -> Secondary

[stack@labucs300-ospd ~]$ nova list | grep LABPGW300-UAS-core-UAS2

| 8608fda4-b763-4753-95ff-2e07852098e3 | labucs300-UAS-LABPGW300-UAS-core-UAS2-1 | ACTIVE | - | Running | labucs300-UAS-LABPGW300-ORCH-NW=192.0.2.15; labucs300-UAS-LABPGW300-MGMT-NW=192.0.2.7 |

| 19f4496c-3907-4ea5-84c9-e5a6ef222392 | labucs300-UAS-LABPGW300-UAS-core-UAS2-2 | ACTIVE | - | Running | labucs300-UAS-LABPGW300-ORCH-NW=192.0.2.17; labucs300-UAS-LABPGW300-MGMT-NW=192.0.2.16

[stack@labucs300-ospd ~]$. corerc ; openstack server stop labucs300-UAS-LABPGW300-UAS-core-UAS2-1

5.使用以下命令停止UAS上的uas-confd和autovnf服務：

service uas-confd stop

service autovnf stop

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-2:~$ sudo -i

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# service uas-confd status

uas-confd start/running, process 1305

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# service autovnf status

autovnf start/running, process 24208

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# service uas-confd stop

uas-confd stop/waiting

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# service autovnf stop

autovnf stop/waiting

6.備份UAS conf資料庫，然後使用以下命令將其複製到備份伺服器：

cd /opt/cisco/usp/uas/confd-latest/var/confd/

tar -cvf <pod>_<VNF>_UAS_cdb_backup.tar cdb/

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# cd /opt/cisco/usp/uas/confd-latest/var/confd/

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# tar -cvf Autovnf_cdb_backup.tar cdb/

cdb/

cdb/O.cdb

cdb/C.cdb

cdb/aaa_init.xml

cdb/A.cdb

root@labucs300-uas-LABPGW300-uas-core-uas2-2:/opt/cisco/usp/uas/confd-latest/var/confd# ll Autovnf_cdb_backup_cdb_backup.tar

total 1612

drwxr-xr-x 3 root root 4096 Jan 24 2017 ..

drwxr-xr-x 2 root root 4096 Jan 24 2017 log

drwxr-xr-x 8 root root 4096 Oct 11 11:30 webui

drwxr-xr-x 2 root root 4096 Oct 19 19:18 candidate

drwxr-xr-x 2 root root 4096 Oct 23 13:00 rollback

drwxr-xr-x 2 root root 4096 Oct 28 17:00 cdb

drwxr-xr-x 3 root root 4096 Oct 28 17:00 state

drwxr-xr-x 8 root root 4096 Oct 31 18:00 .

-rw-r--r-- 1 root root 1617920 Oct 31 18:00 Autovnf_cdb_backup.tar

7.使用以下命令在UAS上重新啟動uas-confd和autovnf服務：

service uas-confd start

service autovnf start

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# service uas-confd start

uas-confd start/running, process 13852

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# service autovnf start

autovnf start/running, process 13853

8.使用以下命令從OSPD重新啟動輔助UAS:

. corerc ; openstack server start <VMName>

[stack@labucs300-ospd ~]$. corerc ; openstack server start labucs300-UAS-LABPGW300-UAS-core-UAS2-1

9.在show UAS命令中驗證主和輔助UAS是否顯示為活動。

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-2:~$ sudo -i

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# confd_cli -u admin -C

Welcome to the ConfD CLI

admin connected from 127.0.0.1 using console on labucs300-uas-LABPGW300-uas-core-uas2-2

labucs300-uas-LABPGW300-uas-core-uas2-2#show uas

uas version 6.2.0

uas state active

uas external-connection-point 192.0.2.8

INSTANCE IP STATE ROLE

-----------------------------------

0.0.0.0 error CONFD-Secondary

192.0.2.15 alive CONFD-Secondary

192.0.2.17 alive CONFD-Primary

10.在/opt/uas_baseconfig.txt檔案中，將AutoVNF(UAS)主要和次要變更為OFF。

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-2:~$ vi /opt/uas_baseconfig.txt

ha: true

ha-vip: 192.0.2.8

ha-secret: d5a9fee60ddae4fe357677dcf1320e51

orch-ips: 192.0.2.15,192.0.2.17

orch-intf: eth0

profile: AUTOVNF

ha_debug: OFF

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-2:~$ ssh ubuntu@192.0.2.15

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-1:~$ cat /opt/uas_baseconfig.txt

ha: true

ha-vip: 192.0.2.8

ha-secret: d5a9fee60ddae4fe357677dcf1320e51

orch-ips: 192.0.2.15,192.0.2.17

orch-intf: eth0

profile: AUTOVNF

ha_debug: OFF

11.使用service autoit start命令在主AutoIT上重新啟動自動服務。

ubuntu@labucs300-autoit-2:~$ sudo -i

root@labucs300-autoit-2:~# service autoit start

12.使用show命令檢驗主和輔助AutoIT是否顯示為活動。

ubuntu@labucs300-autoit-2:~$ sudo -i

root@labucs300-autoit-2:~# confd_cli -u admin -C

Welcome to the ConfD CLI

admin connected from 127.0.0.1 using console on labucs300-autoit-2

labucs300-autoit-2#show uas

uas version 6.2.0

uas state active

uas external-connection-point 172.16.181.7

INSTANCE IP STATE ROLE

-----------------------------------

172.16.181.5 alive CONFD-Secondary

172.16.181.8 alive CONFD-Primary

13.在/opt/uas_baseconfig.txt檔案中，將Primary AutoIT和Secondary AutoIT上的ha_debug都設為OFF。

ubuntu@labucs300-autoit-2:~$ vi /opt/uas_baseconfig.txt

ha: true

ha-vip: 172.16.181.7

ha-secret: f99d04acb84807c4c6c6c0eaad392b5c

orch-ips: 172.16.181.5,172.16.181.8

orch-intf: eth0

prov-ha-vip: 172.16.181.13

prov-intf: eth0

profile: AUTOIT

ha_debug: OFF

ubuntu@labucs300-autoit-1:~$ vi /opt/uas_baseconfig.txt

ha: true

ha-vip: 172.16.181.7

ha-secret: f99d04acb84807c4c6c6c0eaad392b5c

orch-ips: 172.16.181.5,172.16.181.8

orch-intf: eth0

prov-ha-vip: 172.16.181.13

prov-intf: eth0

profile: AUTOIT

ha_debug: OFF

14.從UAS收集日誌並將其傳輸到備份伺服器。

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# cd /opt/cisco/usp/uas/confd-latest/var/confd/

root@labucs300-uas-LABPGW300-uas-core-uas2-2:/opt/cisco/usp/uas/confd-latest/var/confd# cd /opt/cisco/usp/uas/scripts/

root@labucs300-uas-LABPGW300-uas-core-uas2-2:/opt/cisco/usp/uas/scripts# sudo ./collect-uas-logs.sh

Dumping output for show transaction in file /tmp/uas-logs/transactions.txt

Dumping output for show log in file /tmp/uas-logs/transactions.txt

Dumping output for show running-config in file /tmp/uas-logs/confd_output.txt

Dumping output for show uas in file /tmp/uas-logs/confd_output.txt

Dumping output for show usp in file /tmp/uas-logs/confd_output.txt

..........

15.登入到輔助AutoVNF並重複上一步以收集日誌並將其傳輸到備份伺服器。

16.備份主AutoVNF和輔助AutoVNF虛擬機器上的系統日誌配置，並將其傳輸到備份伺服器。檔案位於以下目錄中：

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# ls /etc/rsyslog.d/00-autovnf.conf

/etc/rsyslog.d/00-autovnf.conf

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# ls /etc/rsyslog.conf

/etc/rsyslog.conf

17.在主AutoIT上使用service autoit start命令啟用自動服務。

ubuntu@labucs300-autoit-2:~$ sudo -i

root@labucs300-autoit-2:~#

root@labucs300-autoit-2:~# service autoit start

autoit start/running, process 25001

18.在主要AutoVNF和AutoIT上，在/opt/uas_baseconfig.txt中將ha_debug標誌模式設定為OFF。

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-2:~$ vi /opt/uas_baseconfig.txt

ha: true

ha-vip: 192.0.2.8

ha-secret: d5a9fee60ddae4fe357677dcf1320e51

orch-ips: 192.0.2.15,192.0.2.17

orch-intf: eth0

profile: AUTOVNF

ha_debug: OFF

ubuntu@labucs300-autoit-2:~$ vi /opt/uas_baseconfig.txt

ha: true

ha-vip: 172.16.181.7

ha-secret: f99d04acb84807c4c6c6c0eaad392b5c

orch-ips: 172.16.181.5,172.16.181.8

orch-intf: eth0

prov-ha-vip: 172.16.181.13

prov-intf: eth0

profile: AUTOIT

ha_debug: OFF

19.確認UAS上運行的uas-confd和autovnf服務。

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# service uas-confd status

uas-confd start/running, process 1305

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# service autovnf status

autovnf start/running, process 24208

AutoVFN重新部署

1.登入到AutoDeploy並注意UAS例項。

ubuntu@labucs300-autodeploy-2:~$ sudo su

root@labucs300-autodeploy-2:/home/ubuntu# confd_cli -u admin -C

Welcome to the ConfD CLI

admin connected from 127.0.0.1 using console on labucs300-autodeploy-2

labucs300-autodeploy-2#show nsr

nsr         LABSGW300-instance

nsd         LABSGW300

vnfr        [ LABPCF300-LABPCF300-ESC LABPCF300-LABPCF300-UGP ]

vnf-package [ usp_6_2_b8 ]

vim-artifact vim_art_rack

nsr LABPGW300-instance

nsd         LABPGW300

vnfr        [ LABPGW300-LABPGW300-ESC LABPGW300-LABPGW300-UGP ]

vnf-package [ usp_6_2_b8 ]

vim-artifact vim_art_rack

nsr labucs300-UAS-instance

nsd         labucs300-UAS

vnfr        [ labucs300-UAS-LABPCF300-UAS labucs300-UAS-LABPGW300-UAS ]

vnf-package [ usp_6_2_b8 ]

vim-artifact vim_art_rack

2.使用deactivate nsd-id <nsd-id> vnfd <vnfd-id>命令從自動部署中停用AutoVNF。

ubuntu@labucs300-autodeploy-2:~$ /opt/cisco/usp/uas/confd-6.3.1/bin/confd_cli -u admin -C

Welcome to the ConfD CLI

admin connected from 10.10.10.10 using ssh on labucs300-autodeploy-2

labucs300-autodeploy-2#nsd:deactivate nsd-id labucs300-UAS vnfd [LABPGW300-UAS]

transaction-id 1560431372-357328

3.確認事務處理的狀態。

labucs300-autodeploy-2#show transaction

DEPLOYMENT                                                 STATUS

TX ID                               TX TYPE                ID            TIMESTAMP                        STATUS      DETAIL

------------------------------------------------------------------------------------------------------------------------------

1560431372-357328                   activate-ns-deployment labucs300-UAS 2019-06-13T13:09:32.357355-00:00 in-progress -

1560431372-357328/1560431373-102024 activate-ns-deployment labucs300-UAS 2019-06-13T13:09:33.102041-00:00 in-progress -

4.檢查事務日誌。在本例中，labucs300-UAS事務：1560431372-357328和1560431372-357328/1560431373-102024。

labucs300-autodeploy-2#show log 1560431372-357328 | display xml

<config xmlns="http://tail-f.com/ns/config/1.0">

<log xmlns="http://www.cisco.com/usp/nfv/usp-transaction">

<tx-id>1560431372-357328</tx-id>

<log>

2019-06-13 13:09:33,367 - Send Deployment notification for: labucs300-UAS-instance

2019-06-13 13:09:33,375 - Deployment activate-ns-deployment: labucs300-UAS started

2019-06-13 13:09:33,378 - Adding NSR: labucs300-UAS-instance

2019-06-13 13:09:33,385 - Start pipeline of 1 tasks

2019-06-13 13:09:33,390 - Scheduling Task: labucs300-UAS

2019-06-13 13:09:33,400 - Waiting for all workers to finish the transactions

2019-06-13 13:15:00,006 - Deployment activate-ns-deployment: labucs300-UAS succeeded

2019-06-13 13:15:00,020 - Send Deployment notification for: labucs300-UAS-instance

2019-06-13 13:09:33,437 - Send Deployment notification for: labucs300-UAS-instance-deploy

2019-06-13 13:09:33,441 - Deployment activate-ns-deployment: labucs300-UAS started

……………

labucs300-autodeploy-2#show log 1560431372-357328/1560431373-102024 | display xml

<config xmlns="http://tail-f.com/ns/config/1.0">

<log xmlns="http://www.cisco.com/usp/nfv/usp-transaction">

<tx-id>1560431372-357328/1560431373-102024</tx-id>

<log>

2019-06-13 13:09:33,437 - Send Deployment notification for: labucs300-UAS-instance-deploy

2019-06-13 13:09:33,441 - Deployment activate-ns-deployment: labucs300-UAS started

2019-06-13 13:09:33,446 - Adding NSR: labucs300-UAS-instance, VNFR: labucs300-UAS-LABPCF300-UAS, vlrs: None

2019-06-13 13:09:33,453 - Adding NSR: labucs300-UAS-instance, VNFR: labucs300-UAS-LABPGW300-UAS, vlrs: None

2019-06-13 13:09:33,463 - VNF deployment pre-check success(all-not-present)

2019-06-13 13:09:33,472 - VNF-Package deployment pre-check success(all-not-present)

2019-06-13 13:09:33,481 - VIM-Artifact deployment pre-check success

2019-06-13 13:09:33,487 - Skipping VIM-Orch pre-deployment, since VIM-Orch is not defined

2019-06-13 13:09:33,496 - Skipping VIM pre-deployment, since VIM is not defined

2019-06-13 13:09:33,499 - NS pre-check success

2019-06-13 13:09:33,503 - Copying '/home/ubuntu/usp-6_2_b8.iso' to '/var/cisco/isos/labucs300-UAS_usp_6_2_b8'

2019-06-13 13:09:53,359 - Updated path to URL 'http://172.16.181.14:5000/isos/labucs300-UAS_usp_6_2_b8'

5.等待事務完成，並確認狀態。

labucs300-autodeploy-2#show transaction

DEPLOYMENT                                            STATUS

TX ID                               TX TYPE                ID            TIMESTAMP                        STATUS DETAIL

------------------------------------------------------------------------------------------------------------------------------

1560431372-357328                   activate-ns-deployment labucs300-UAS 2019-06-13T13:09:32.357355-00:00 success -

1560431372-357328/1560431373-102024 activate-ns-deployment labucs300-UAS 2019-06-13T13:09:33.102041-00:00 success -

6.使用activate nsd-id <nsd-id> vnfd <vnfd-id>命令從AutoDeploy啟用AutoVNF VNFD。

ubuntu@labucs300-autodeploy-2:~$ /opt/cisco/usp/uas/confd-6.3.1/bin/confd_cli -u admin -C

Welcome to the ConfD CLI

admin connected from 10.253.110.47 using ssh on labucs300-autodeploy-2

labucs300-autodeploy-2#nsd:activate nsd-id labucs300-UAS vnfd [LABPGW300-UAS]

transaction-id 1560431371-357330

7.使用以下命令檢查事務狀態並從事務中收集日誌：

show transaction

show log <transaction-id> | display xml

show log <transaction-id> | display xml

8.等到事務完成。show transaction命令會顯示事務的狀態。

備份還原

1. On Primary AutoIT在/opt/uas_baseconfig.txt中將ha_debug標誌模式設定為ON。

ubuntu@labucs300-autoit-2:~$ vi /opt/uas_baseconfig.txt

ha: true

ha-vip: 172.16.181.7

ha-secret: f99d04acb84807c4c6c6c0eaad392b5c

orch-ips: 172.16.181.5,172.16.181.8

orch-intf: eth0

prov-ha-vip: 172.16.181.13

prov-intf: eth0

profile: AUTOIT

ha_debug: ON

2.在主AutoIT上停止服務自動化。此步驟是為了防止AutoIT自動恢復UAS。

ubuntu@labucs300-autoit-2:~$ sudo -i

root@labucs300-autoit-2:~#

root@labucs300-autoit-2:~# service autoit status

autoit start/running, process 25001

root@labucs300-autoit-2:~# service autoit stop

3.在主UAS上，在/opt/uas_baseconfig.txt中將ha_debug標誌模式設定為ON。

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-2:~$ vi /opt/uas_baseconfig.txt

ha: true

ha-vip: 192.0.2.8

ha-secret: d5a9fee60ddae4fe357677dcf1320e51

orch-ips: 192.0.2.15,192.0.2.17

orch-intf: eth0

profile: AUTOVNF

ha_debug: ON

4.在輔助UAS上，在/opt/uas_baseconfig.txt中將ha_debug標誌模式設定為ON。

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-1:~$ cat /opt/uas_baseconfig.txt

ha: true

ha-vip: 192.0.2.8

ha-secret: d5a9fee60ddae4fe357677dcf1320e51

orch-ips: 192.0.2.15,192.0.2.17

orch-intf: eth0

profile: AUTOVNF

ha_debug: ON

5.在OSPD上，使用OpenStack命令停止輔助UAS伺服器。

labucs300-UAS-LABPGW300-UAS-core-UAS2-2 -> VNFM2-UAS-VIP Primary

labucs300-UAS-LABPGW300-UAS-core-UAS2-1 -> Secondary

[stack@labucs300-ospd ~]$. corerc ; openstack server stop labucs300-UAS-LABPGW300-UAS-core-UAS2-1

6.在主UAS上，停止uas-confd服務。

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-2:~$ sudo -i

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# service uas-confd status

uas-confd start/running, process 1305

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# service uas-confd stop

uas-confd stop/waiting

7.在主UAS上，將CDB的備份歸檔檔案複製到目錄/opt/cisco/usp/uas/confd-latest/var/confd/。

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# cp Autovnf_cdb_backup.tar to /opt/cisco/usp/uas/confd-latest/var/confd/

8.在主UAS上，刪除CBD目錄下的檔案。

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# cd /opt/cisco/usp/uas/confd-latest/var/confd/ ; rm cdb/*

9.在主UAS上，從CDB備份檔案提取檔案。

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# cd /opt/cisco/usp/uas/confd-latest/var/confd/ ; tar -xvf <archive_backup_tar_file>

10.在OSPD上使用OpenStack命令重新啟動主UAS。

[stack@labucs300-ospd ~]$ source *core

[stack@labucs300-ospd ~]$ nova list | grep LABPGW300-UAS-core-UAS2

| 8608fda4-b763-4753-95ff-2e07852098e3 | labucs300-UAS-LABPGW300-UAS-core-UAS2-1 | ACTIVE | - | Running | labucs300-UAS-LABPGW300-ORCH-NW=192.0.2.15; labucs300-UAS-LABPGW300-MGMT-NW=192.0.2.7 |

| 19f4496c-3907-4ea5-84c9-e5a6ef222392 | labucs300-UAS-LABPGW300-UAS-core-UAS2-2 | ACTIVE | - | Running | labucs300-UAS-LABPGW300-ORCH-NW=192.0.2.17; labucs300-UAS-LABPGW300-MGMT-NW=192.0.2.16

labucs300-UAS-LABPGW300-UAS-core-UAS2-2 -> VNFM2-UAS-VIP Primary

labucs300-UAS-LABPGW300-UAS-core-UAS2-1 -> Secondary

[stack@labucs300-ospd ~]$ nova reboot --hard 19f4496c-3907-4ea5-84c9-e5a6ef222392

Request to reboot server <Server: auto-testautovnf1-uas-2> has been accepted.

11.等待主UAS出現。在重新啟動後檢查主UAS上的UAS狀態。主狀態為活動狀態，而輔助狀態顯示狀態未知。

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-2:~$ sudo -i

root@labucs300-uas-LABPGW300-uas-core-uas2-2:~# confd_cli -u admin -C

Welcome to the ConfD CLI

admin connected from 127.0.0.1 using console on labucs300-uas-LABPGW300-uas-core-uas2-2

labucs300-uas-LABPGW300-uas-core-uas2-2#show uas

uas version 6.2.0

uas state active

uas external-connection-point 192.0.2.8

INSTANCE IP STATE ROLE

-----------------------------------

192.0.2.15 unknown CONFD-Secondary

192.0.2.17 alive CONFD-Primary

12.在OSPD上，使用OpenStack命令啟動輔助UAS。

[stack@labucs300-ospd ~]$. corerc ; openstack server start labucs300-UAS-LABPGW300-UAS-core-UAS2-1

13.在OSPD上，驗證主和輔助UAS的狀態是否處於活動狀態。

[stack@labucs300-ospd ~]$ openstack server list | grep labucs300-UAS-LABPGW300

| 19f4496c-3907-4ea5-84c9-e5a6ef222392 | labucs300-UAS-LABPGW300-UAS-core-UAS2-2 | ACTIVE | labucs300-UAS-LABPGW300-ORCH-NW=192.0.2.17; labucs300-UAS-LABPGW300-MGMT-NW=192.0.2.16 | labucs300-UAS-usp_6_2_b8-core-uas |

| 8608fda4-b763-4753-95ff-2e07852098e3 | labucs300-UAS-LABPGW300-UAS-core-UAS2-1 | ACTIVE | labucs300-UAS-LABPGW300-ORCH-NW=192.0.2.15; labucs300-UAS-LABPGW300-MGMT-NW=192.0.2.7 | labucs300-UAS-usp_6_2_b8-core-uas |

14.在主UAS上，驗證主UAS和輔助UAS的狀態是否處於活動狀態。

labucs300-uas-LABPGW300-uas-core-uas2-2#show uas

uas version 6.2.0

uas state active

uas external-connection-point 192.0.2.8

INSTANCE IP STATE ROLE

-----------------------------------

192.0.2.15 alive CONFD-Secondary

192.0.2.17 alive CONFD-Primary

15.在主AutoIT上啟動自動服務。

ubuntu@labucs300-autoit-2:~$ sudo -i

root@labucs300-autoit-2:~# service autoit start

16.驗證主和輔助UAS的安全外殼(SSH)會話保持運行幾分鐘時間。

17.在主UAS上，將/opt/uas_baseconfig.txt中的ha_debug標誌模式設定為OFF。

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-2:~$ vi /opt/uas_baseconfig.txt

ha: true

ha-vip: 192.0.2.8

ha-secret: d5a9fee60ddae4fe357677dcf1320e51

orch-ips: 192.0.2.15,192.0.2.17

orch-intf: eth0

profile: AUTOVNF

ha_debug: OFF

18.  在輔助UAS上，在/opt/uas_baseconfig.txt中將ha_debug標誌模式設定為OFF。

ubuntu@labucs300-uas-LABPGW300-uas-core-uas2-1:~$ cat /opt/uas_baseconfig.txt

ha: true

ha-vip: 192.0.2.8

ha-secret: d5a9fee60ddae4fe357677dcf1320e51

orch-ips: 192.0.2.15,192.0.2.17

orch-intf: eth0

profile: AUTOVNF

ha_debug: OFF

19.在/opt/uas_baseconfig.txt中，在Primary AutoIT上將ha_debug標誌模式設定為OFF。

ubuntu@labucs300-autoit-2:~$ vi /opt/uas_baseconfig.txt

ha: true

ha-vip: 172.16.181.7

ha-secret: f99d04acb84807c4c6c6c0eaad392b5c

orch-ips: 172.16.181.5,172.16.181.8

orch-intf: eth0

prov-ha-vip: 172.16.181.13

prov-intf: eth0

profile: AUTOIT

ha_debug: OFF

20.在AutoVNF上，檢查00-autovnf.conf和rsyslog.conf檔案，然後從以前的備份中還原它們。

ubuntu@autoit-tb1-autovnf1-core-avf-1:~#sudo su

root@autoit-tb1-autovnf1-core-avf-1:~#ls /etc/rsyslog.d/00-autovnf.conf

00-autovnf.conf

root@autoit-tb1-autovnf1-core-avf-1:~#/home/ubuntu#ls /etc/rsyslog.conf

rsyslog.conf

後檢查

在OSPD上，檢驗兩個AutoVNF是否均處於活動狀態，並檢查Ultra-M運行狀況檢查報告。

[stack@labucs300-ospd ~]$ cat /var/log/cisco/ultram-health/*.report | grep -i xxx

[stack@labucs300-ospd ~]$ cat /var/log/cisco/ultram-health/ultram_health_uas.report