zhhuabj

Untitled

Sep 4th, 2026
71
0
100 days
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.17 KB | None | 0 0
  1. sudo add-apt-repository cloud-archive:gazpacho-proposed
  2. sudo apt update
  3. sudo apt install heat-common=1:26.0.0-0ubuntu1.1~cloud0 python3-heat=1:26.0.0-0ubuntu1.1~cloud0 heat-engine=1:26.0.0-0ubuntu1.1~cloud0 -y
  4. sudo apt install heat-api=1:26.0.0-0ubuntu1.1~cloud0 heat-api-cfn=1:26.0.0-0ubuntu1.1~cloud0 -y
  5.  
  6. ubuntu@juju-07cec9-gazpacho-2:~$ sudo apt-cache policy heat-common
  7. heat-common:
  8. Installed: 1:26.0.0-0ubuntu1.1~cloud0
  9. Candidate: 1:26.0.0-0ubuntu1.1~cloud0
  10. Version table:
  11. *** 1:26.0.0-0ubuntu1.1~cloud0 500
  12. 500 http://ubuntu-cloud.archive.canonical.com/ubuntu noble-proposed/gazpacho/main amd64 Packages
  13. 100 /var/lib/dpkg/status
  14. 1:26.0.0-0ubuntu1~cloud0 500
  15. 500 http://ubuntu-cloud.archive.canonical.com/ubuntu noble-updates/gazpacho/main amd64 Packages
  16. 1:22.0.1-0ubuntu1.3 500
  17. 500 http://availability-zone-2.clouds.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
  18. 1:22.0.0-0ubuntu1 500
  19. 500 http://availability-zone-2.clouds.archive.ubuntu.com/ubuntu noble/main amd64 Packages
  20. ubuntu@juju-07cec9-gazpacho-2:~$ dpkg -l |grep heat
  21. ii heat-api 1:26.0.0-0ubuntu1.1~cloud0 all OpenStack orchestration service - ReST API
  22. ii heat-api-cfn 1:26.0.0-0ubuntu1.1~cloud0 all OpenStack orchestration service - CFN API
  23. ii heat-common 1:26.0.0-0ubuntu1.1~cloud0 all OpenStack orchestration service - common files
  24. ii heat-engine 1:26.0.0-0ubuntu1.1~cloud0 all OpenStack orchestration service - engine
  25. ii python3-heat 1:26.0.0-0ubuntu1.1~cloud0 all OpenStack orchestration service - Python 3 files
  26. ii python3-heatclient 5.0.0-0ubuntu2~cloud0 all client library and CLI for OpenStack Heat - Python 3.x
  27.  
  28. $ openstack stack list
  29. +--------------------------------------+------------------+----------------------------------+-----------------+----------------------+--------------+
  30. | ID | Stack Name | Project | Stack Status | Creation Time | Updated Time |
  31. +--------------------------------------+------------------+----------------------------------+-----------------+----------------------+--------------+
  32. | 7d2e28d3-3d11-4803-95b8-22c1a921e85f | test-sriov | 4f57fc0e88a3460e971508aeae0c63b9 | CREATE_COMPLETE | 2026-09-04T09:07:54Z | None |
  33. | 1d73e081-4721-402f-bd58-411878f4eb0b | sriov-port-stack | 4f57fc0e88a3460e971508aeae0c63b9 | CREATE_COMPLETE | 2026-09-03T12:16:30Z | None |
  34. +--------------------------------------+------------------+----------------------------------+-----------------+----------------------+--------------+
  35.  
  36.  
  37. 2, reset profile
  38.  
  39. cat <<EOF > sriov-port-update.yaml
  40. heat_template_version: 2015-10-15
  41. parameters:
  42. sriov_net:
  43. type: string
  44. default: private
  45. resources:
  46. sriov_port:
  47. type: OS::Neutron::Port
  48. properties:
  49. name: heat-sriov-port1
  50. network: { get_param: sriov_net }
  51. value_specs:
  52. binding:profile:
  53. capabilities: ["switchdev"]
  54. card_serial_number: "MT2234420968"
  55. pci_slot: "0000:04:00.2"
  56. pci_vendor_info: "15b3:1016"
  57. pf_mac_address: "1e:38:96:af:a0:55"
  58. physical_network: "physnet1"
  59. vf_num: "1"
  60. spoof: null
  61. EOF
  62. openstack stack update -t sriov-port-update.yaml sriov-port-stack --wait
  63. 2026-09-04 09:14:20Z [sriov-port-stack]: UPDATE_IN_PROGRESS Stack UPDATE started
  64. 2026-09-04 09:14:20Z [sriov-port-stack.sriov_port]: UPDATE_IN_PROGRESS state changed
  65. 2026-09-04 09:14:24Z [sriov-port-stack.sriov_port]: UPDATE_COMPLETE state changed
  66. 2026-09-04 09:14:24Z [sriov-port-stack]: UPDATE_COMPLETE Stack UPDATE completed successfully
  67. +---------------------+--------------------------------------+
  68. | Field | Value |
  69. +---------------------+--------------------------------------+
  70. | id | 1d73e081-4721-402f-bd58-411878f4eb0b |
  71. | stack_name | sriov-port-stack |
  72. | description | No description |
  73. | creation_time | 2026-09-03T12:16:30Z |
  74. | updated_time | 2026-09-04T09:14:20Z |
  75. | stack_status | UPDATE_COMPLETE |
  76. | stack_status_reason | Stack UPDATE completed successfully |
  77. +---------------------+--------------------------------------+
  78.  
  79.  
  80. $ openstack port show heat-sriov-port1 -f json | jq '.binding_profile'
  81. {
  82. "capabilities": [
  83. "switchdev"
  84. ],
  85. "card_serial_number": "MT2234420968",
  86. "pci_slot": "0000:04:00.2",
  87. "pci_vendor_info": "15b3:1016",
  88. "pf_mac_address": "1e:38:96:af:a0:55",
  89. "physical_network": "physnet1",
  90. "vf_num": "1"
  91. }
  92.  
  93.  
  94.  
  95. 3, add spoof=true without patch
  96.  
  97. $ openstack port show heat-sriov-port1 -f json | jq '.binding_profile'
  98. {
  99. "capabilities": [
  100. "switchdev"
  101. ],
  102. "card_serial_number": "MT2234420968",
  103. "pci_slot": "0000:04:00.2",
  104. "pci_vendor_info": "15b3:1016",
  105. "pf_mac_address": "1e:38:96:af:a0:55",
  106. "physical_network": "physnet1",
  107. "vf_num": "1"
  108. }
  109. $ cat <<EOF > sriov-port-add-spoof.yaml
  110. heat_template_version: 2015-10-15
  111. parameters:
  112. sriov_net:
  113. type: string
  114. default: private
  115. resources:
  116. sriov_port:
  117. type: OS::Neutron::Port
  118. properties:
  119. name: heat-sriov-port1
  120. network: { get_param: sriov_net }
  121. value_specs:
  122. binding:profile:
  123. spoof: "true"
  124. EOF
  125. openstack stack update -t ./sriov-port-add-spoof.yaml sriov-port-stack --wait
  126. 2026-09-04 09:15:51Z [sriov-port-stack]: UPDATE_IN_PROGRESS Stack UPDATE started
  127. 2026-09-04 09:15:51Z [sriov-port-stack.sriov_port]: UPDATE_IN_PROGRESS state changed
  128. 2026-09-04 09:15:53Z [sriov-port-stack.sriov_port]: UPDATE_COMPLETE state changed
  129. 2026-09-04 09:15:53Z [sriov-port-stack]: UPDATE_COMPLETE Stack UPDATE completed successfully
  130. +---------------------+--------------------------------------+
  131. | Field | Value |
  132. +---------------------+--------------------------------------+
  133. | id | 1d73e081-4721-402f-bd58-411878f4eb0b |
  134. | stack_name | sriov-port-stack |
  135. | description | No description |
  136. | creation_time | 2026-09-03T12:16:30Z |
  137. | updated_time | 2026-09-04T09:15:49Z |
  138. | stack_status | UPDATE_COMPLETE |
  139. | stack_status_reason | Stack UPDATE completed successfully |
  140. +---------------------+--------------------------------------+
  141.  
  142.  
  143.  
  144. $ openstack port show heat-sriov-port1 -f json | jq '.binding_profile'
  145. {
  146. "capabilities": [
  147. "switchdev"
  148. ],
  149. "card_serial_number": "MT2234420968",
  150. "pci_slot": "0000:04:00.2",
  151. "pci_vendor_info": "15b3:1016",
  152. "pf_mac_address": "1e:38:96:af:a0:55",
  153. "physical_network": "physnet1",
  154. "vf_num": "1",
  155. "spoof": "true"
  156. }
  157.  
  158.  
  159.  
  160. 3, keep spoof=true unchange, so re-run again
  161.  
  162. $ openstack stack update -t ./sriov-port-add-spoof.yaml sriov-port-stack --wait
  163. 2026-09-04 09:16:37Z [sriov-port-stack]: UPDATE_IN_PROGRESS Stack UPDATE started
  164. 2026-09-04 09:16:37Z [sriov-port-stack]: UPDATE_COMPLETE Stack UPDATE completed successfully
  165. +---------------------+--------------------------------------+
  166. | Field | Value |
  167. +---------------------+--------------------------------------+
  168. | id | 1d73e081-4721-402f-bd58-411878f4eb0b |
  169. | stack_name | sriov-port-stack |
  170. | description | No description |
  171. | creation_time | 2026-09-03T12:16:30Z |
  172. | updated_time | 2026-09-04T09:16:36Z |
  173. | stack_status | UPDATE_COMPLETE |
  174. | stack_status_reason | Stack UPDATE completed successfully |
  175. +---------------------+--------------------------------------+
  176.  
  177.  
  178. $ openstack port show heat-sriov-port1 -f json | jq '.binding_profile'
  179. {
  180. "capabilities": [
  181. "switchdev"
  182. ],
  183. "card_serial_number": "MT2234420968",
  184. "pci_slot": "0000:04:00.2",
  185. "pci_vendor_info": "15b3:1016",
  186. "pf_mac_address": "1e:38:96:af:a0:55",
  187. "physical_network": "physnet1",
  188. "vf_num": "1",
  189. "spoof": "true"
  190. }
  191.  
  192.  
  193. 4, delete spoof
  194.  
  195. $ cat <<EOF > sriov-port-delete-spoof.yaml
  196. heat_template_version: 2015-10-15
  197. parameters:
  198. sriov_net:
  199. type: string
  200. default: private
  201. resources:
  202. sriov_port:
  203. type: OS::Neutron::Port
  204. properties:
  205. name: heat-sriov-port1
  206. network: { get_param: sriov_net }
  207. value_specs:
  208. binding:profile:
  209. spoof: null
  210. EOF
  211. openstack stack update -t ./sriov-port-delete-spoof.yaml sriov-port-stack --wait
  212. 2026-09-04 09:17:09Z [sriov-port-stack]: UPDATE_IN_PROGRESS Stack UPDATE started
  213. 2026-09-04 09:17:09Z [sriov-port-stack.sriov_port]: UPDATE_IN_PROGRESS state changed
  214. 2026-09-04 09:17:12Z [sriov-port-stack.sriov_port]: UPDATE_COMPLETE state changed
  215. 2026-09-04 09:17:12Z [sriov-port-stack]: UPDATE_COMPLETE Stack UPDATE completed successfully
  216. +---------------------+--------------------------------------+
  217. | Field | Value |
  218. +---------------------+--------------------------------------+
  219. | id | 1d73e081-4721-402f-bd58-411878f4eb0b |
  220. | stack_name | sriov-port-stack |
  221. | description | No description |
  222. | creation_time | 2026-09-03T12:16:30Z |
  223. | updated_time | 2026-09-04T09:17:08Z |
  224. | stack_status | UPDATE_COMPLETE |
  225. | stack_status_reason | Stack UPDATE completed successfully |
  226. +---------------------+--------------------------------------+
  227.  
  228.  
  229. $ openstack port show heat-sriov-port1 -f json | jq '.binding_profile'
  230. {
  231. "capabilities": [
  232. "switchdev"
  233. ],
  234. "card_serial_number": "MT2234420968",
  235. "pci_slot": "0000:04:00.2",
  236. "pci_vendor_info": "15b3:1016",
  237. "pf_mac_address": "1e:38:96:af:a0:55",
  238. "physical_network": "physnet1",
  239. "vf_num": "1"
  240. }
  241.  
  242.  
  243. 5, modify vf_num to 0, and add spoof=true again, and delete card_serial_number
  244.  
  245. $ cat <<EOF > sriov-port-delete-spoof.yaml
  246. heat_template_version: 2015-10-15
  247. parameters:
  248. sriov_net:
  249. type: string
  250. default: private
  251. resources:
  252. sriov_port:
  253. type: OS::Neutron::Port
  254. properties:
  255. name: heat-sriov-port1
  256. network: { get_param: sriov_net }
  257. value_specs:
  258. binding:profile:
  259. vf_num: '0'
  260. spoof: 'true'
  261. card_serial_number: null
  262. EOF
  263. openstack stack update -t ./sriov-port-delete-spoof.yaml sriov-port-stack --wait
  264. 2026-09-04 09:17:45Z [sriov-port-stack]: UPDATE_IN_PROGRESS Stack UPDATE started
  265. 2026-09-04 09:17:45Z [sriov-port-stack.sriov_port]: UPDATE_IN_PROGRESS state changed
  266. 2026-09-04 09:17:47Z [sriov-port-stack.sriov_port]: UPDATE_COMPLETE state changed
  267. 2026-09-04 09:17:47Z [sriov-port-stack]: UPDATE_COMPLETE Stack UPDATE completed successfully
  268. +---------------------+--------------------------------------+
  269. | Field | Value |
  270. +---------------------+--------------------------------------+
  271. | id | 1d73e081-4721-402f-bd58-411878f4eb0b |
  272. | stack_name | sriov-port-stack |
  273. | description | No description |
  274. | creation_time | 2026-09-03T12:16:30Z |
  275. | updated_time | 2026-09-04T09:17:45Z |
  276. | stack_status | UPDATE_COMPLETE |
  277. | stack_status_reason | Stack UPDATE completed successfully |
  278. +---------------------+--------------------------------------+
  279.  
  280.  
  281.  
  282. $ openstack port show heat-sriov-port1 -f json | jq '.binding_profile'
  283. {
  284. "capabilities": [
  285. "switchdev"
  286. ],
  287. "card_serial_number": "MT2234420968",
  288. "pci_slot": "0000:04:00.2",
  289. "pci_vendor_info": "15b3:1016",
  290. "pf_mac_address": "1e:38:96:af:a0:55",
  291. "physical_network": "physnet1",
  292. "vf_num": "0",
  293. "spoof": "true"
  294. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment