zhhuabj

Untitled

Aug 25th, 2026
67
0
90 days
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.85 KB | None | 0 0
  1. ubuntu@juju-d22955-flamingo-2:~$ sudo add-apt-repository cloud-archive:flamingo-proposed
  2. Repository: 'deb http://ubuntu-cloud.archive.canonical.com/ubuntu noble-proposed/flamingo main'
  3. Description:
  4. Ubuntu Cloud Archive for OpenStack Flamingo [proposed]
  5. More info: https://wiki.ubuntu.com/OpenStack/CloudArchive
  6. Adding repository.
  7. Press [ENTER] to continue or Ctrl-c to cancel.
  8. Adding deb entry to /etc/apt/sources.list.d/cloudarchive-flamingo.list
  9. Adding disabled deb-src entry to /etc/apt/sources.list.d/cloudarchive-flamingo.list
  10. Reading package lists... Done
  11. Building dependency tree... Done
  12. Reading state information... Done
  13. ubuntu-cloud-keyring is already the newest version (2023.11.28.1).
  14. 0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
  15. Hit:1 http://az1.clouds.archive.ubuntu.com/ubuntu noble InRelease
  16. Get:2 http://az1.clouds.archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
  17. Get:3 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
  18. Hit:4 http://az1.clouds.archive.ubuntu.com/ubuntu noble-backports InRelease
  19. Get:5 http://az1.clouds.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [1229 kB]
  20. Get:6 http://ubuntu-cloud.archive.canonical.com/ubuntu noble-updates/flamingo InRelease [6575 B]
  21. Get:7 http://az1.clouds.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [1687 kB]
  22. Get:8 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [971 kB]
  23. Get:9 http://ubuntu-cloud.archive.canonical.com/ubuntu noble-proposed/flamingo InRelease [6577 B]
  24. Get:10 http://security.ubuntu.com/ubuntu noble-security/main Translation-en [206 kB]
  25. Get:11 http://ubuntu-cloud.archive.canonical.com/ubuntu noble-proposed/flamingo/main amd64 Packages [143 kB]
  26. Get:12 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [1203 kB]
  27. Get:13 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [1392 kB]
  28. Get:14 http://security.ubuntu.com/ubuntu noble-security/restricted Translation-en [321 kB]
  29. Fetched 7416 kB in 3s (2367 kB/s)
  30. Reading package lists... Done
  31.  
  32.  
  33. sudo apt install heat-common=1:25.0.0-0ubuntu1~cloud1 python3-heat=1:25.0.0-0ubuntu1~cloud1 heat-engine=1:25.0.0-0ubuntu1~cloud1 -y
  34. sudo apt install heat-api=1:25.0.0-0ubuntu1~cloud1 heat-api-cfn=1:25.0.0-0ubuntu1~cloud1 -y
  35.  
  36. ubuntu@juju-d22955-flamingo-2:~$ sudo apt-cache policy heat-common
  37. heat-common:
  38. Installed: 1:25.0.0-0ubuntu1~cloud1
  39. Candidate: 1:25.0.0-0ubuntu1~cloud1
  40. Version table:
  41. *** 1:25.0.0-0ubuntu1~cloud1 500
  42. 500 http://ubuntu-cloud.archive.canonical.com/ubuntu noble-proposed/flamingo/main amd64 Packages
  43. 100 /var/lib/dpkg/status
  44. 1:25.0.0-0ubuntu1~cloud0 500
  45. 500 http://ubuntu-cloud.archive.canonical.com/ubuntu noble-updates/flamingo/main amd64 Packages
  46. 1:22.0.1-0ubuntu1.3 500
  47. 500 http://az1.clouds.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
  48. 1:22.0.0-0ubuntu1 500
  49. 500 http://az1.clouds.archive.ubuntu.com/ubuntu noble/main amd64 Packages
  50.  
  51. $ openstack stack list
  52. +--------------------------------------+------------------+----------------------------------+-----------------+----------------------+--------------+
  53. | ID | Stack Name | Project | Stack Status | Creation Time | Updated Time |
  54. +--------------------------------------+------------------+----------------------------------+-----------------+----------------------+--------------+
  55. | 4a5796a8-42d3-4dbb-a41f-90e52a18c779 | test-sriov | 4cfa727e460b49a98fa0fc322912b46f | CREATE_COMPLETE | 2026-08-26T02:21:33Z | None |
  56. | 057739a8-3783-4914-b93c-0633d8b8b2be | sriov-port-stack | 4cfa727e460b49a98fa0fc322912b46f | CREATE_COMPLETE | 2026-08-26T02:07:18Z | None |
  57. +--------------------------------------+------------------+----------------------------------+-----------------+----------------------+--------------+
  58.  
  59. $ openstack server list
  60. +--------------------------------------+------+--------+------------------------+-------+----------+
  61. | ID | Name | Status | Networks | Image | Flavor |
  62. +--------------------------------------+------+--------+------------------------+-------+----------+
  63. | 7c318c6e-00de-4585-a7d6-d5a102b36734 | i1 | ACTIVE | private=192.168.21.190 | jammy | m1.small |
  64. +--------------------------------------+------+--------+------------------------+-------+----------+
  65.  
  66.  
  67. 2, reset profile
  68.  
  69. $ cat <<EOF > sriov-port-update.yamlate.yaml
  70. heat_template_version: 2015-10-15
  71. parameters:
  72. sriov_net:
  73. type: string
  74. default: private
  75. resources:
  76. sriov_port:
  77. type: OS::Neutron::Port
  78. properties:
  79. name: heat-sriov-port1
  80. network: { get_param: sriov_net }
  81. value_specs:
  82. binding:profile:
  83. capabilities: ["switchdev"]
  84. card_serial_number: "MT2234420968"
  85. pci_slot: "0000:04:00.2"
  86. pci_vendor_info: "15b3:1016"
  87. pf_mac_address: "1e:38:96:af:a0:55"
  88. physical_network: "physnet1"
  89. vf_num: "1"
  90. spoof: null
  91. EOF
  92. openstack stack update -t sriov-port-update.yaml sriov-port-stack --wait
  93. [0.003s]2026-08-26 02:23:12Z [sriov-port-stack]: UPDATE_IN_PROGRESS Stack UPDATE started
  94. 2026-08-26 02:23:12Z [sriov-port-stack.sriov_port]: UPDATE_IN_PROGRESS state changed
  95. 2026-08-26 02:23:13Z [sriov-port-stack.sriov_port]: UPDATE_COMPLETE state changed
  96. 2026-08-26 02:23:13Z [sriov-port-stack]: UPDATE_COMPLETE Stack UPDATE completed successfully
  97. +---------------------+--------------------------------------+
  98. | Field | Value |
  99. +---------------------+--------------------------------------+
  100. | id | 057739a8-3783-4914-b93c-0633d8b8b2be |
  101. | stack_name | sriov-port-stack |
  102. | description | No description |
  103. | creation_time | 2026-08-26T02:07:18Z |
  104. | updated_time | 2026-08-26T02:23:12Z |
  105. | stack_status | UPDATE_COMPLETE |
  106. | stack_status_reason | Stack UPDATE completed successfully |
  107. +---------------------+--------------------------------------+
  108.  
  109. $ openstack port show heat-sriov-port1 -f json | jq '.binding_profile'
  110. {
  111. "capabilities": [
  112. "switchdev"
  113. ],
  114. "card_serial_number": "MT2234420968",
  115. "pci_slot": "0000:04:00.2",
  116. "pci_vendor_info": "15b3:1016",
  117. "pf_mac_address": "1e:38:96:af:a0:55",
  118. "physical_network": "physnet1",
  119. "vf_num": "1"
  120. }
  121.  
  122.  
  123. 3, add spoof=true without patch
  124.  
  125. $ openstack port show heat-sriov-port1 -f json | jq '.binding_profile'
  126. {
  127. "capabilities": [
  128. "switchdev"
  129. ],
  130. "card_serial_number": "MT2234420968",
  131. "pci_slot": "0000:04:00.2",
  132. "pci_vendor_info": "15b3:1016",
  133. "pf_mac_address": "1e:38:96:af:a0:55",
  134. "physical_network": "physnet1",
  135. "vf_num": "1"
  136. }
  137. $ cat <<EOF > sriov-port-add-spoof.yamloof.yaml
  138. heat_template_version: 2015-10-15
  139. parameters:
  140. sriov_net:
  141. type: string
  142. default: private
  143. resources:
  144. sriov_port:
  145. type: OS::Neutron::Port
  146. properties:
  147. name: heat-sriov-port1
  148. network: { get_param: sriov_net }
  149. value_specs:
  150. binding:profile:
  151. spoof: "true"
  152. EOF
  153. openstack stack update -t ./sriov-port-add-spoof.yaml sriov-port-stack --wait
  154. [0.003s]2026-08-26 02:24:26Z [sriov-port-stack]: UPDATE_IN_PROGRESS Stack UPDATE started
  155. 2026-08-26 02:24:26Z [sriov-port-stack.sriov_port]: UPDATE_IN_PROGRESS state changed
  156. 2026-08-26 02:24:27Z [sriov-port-stack.sriov_port]: UPDATE_COMPLETE state changed
  157. 2026-08-26 02:24:27Z [sriov-port-stack]: UPDATE_COMPLETE Stack UPDATE completed successfully
  158. +---------------------+--------------------------------------+
  159. | Field | Value |
  160. +---------------------+--------------------------------------+
  161. | id | 057739a8-3783-4914-b93c-0633d8b8b2be |
  162. | stack_name | sriov-port-stack |
  163. | description | No description |
  164. | creation_time | 2026-08-26T02:07:18Z |
  165. | updated_time | 2026-08-26T02:24:26Z |
  166. | stack_status | UPDATE_COMPLETE |
  167. | stack_status_reason | Stack UPDATE completed successfully |
  168. +---------------------+--------------------------------------+
  169.  
  170.  
  171. $ openstack port show heat-sriov-port1 -f json | jq '.binding_profile'
  172. {
  173. "capabilities": [
  174. "switchdev"
  175. ],
  176. "card_serial_number": "MT2234420968",
  177. "pci_slot": "0000:04:00.2",
  178. "pci_vendor_info": "15b3:1016",
  179. "pf_mac_address": "1e:38:96:af:a0:55",
  180. "physical_network": "physnet1",
  181. "vf_num": "1",
  182. "spoof": "true"
  183. }
  184.  
  185.  
  186. 3, keep spoof=true unchange, so re-run again
  187.  
  188. $ openstack stack update -t ./sriov-port-add-spoof.yaml sriov-port-stack --wait
  189. 2026-08-26 02:25:16Z [sriov-port-stack]: UPDATE_IN_PROGRESS Stack UPDATE started
  190. 2026-08-26 02:25:16Z [sriov-port-stack]: UPDATE_COMPLETE Stack UPDATE completed successfully
  191. +---------------------+--------------------------------------+
  192. | Field | Value |
  193. +---------------------+--------------------------------------+
  194. | id | 057739a8-3783-4914-b93c-0633d8b8b2be |
  195. | stack_name | sriov-port-stack |
  196. | description | No description |
  197. | creation_time | 2026-08-26T02:07:18Z |
  198. | updated_time | 2026-08-26T02:25:16Z |
  199. | stack_status | UPDATE_COMPLETE |
  200. | stack_status_reason | Stack UPDATE completed successfully |
  201. +---------------------+--------------------------------------+
  202.  
  203. $ openstack port show heat-sriov-port1 -f json | jq '.binding_profile'
  204. {
  205. "capabilities": [
  206. "switchdev"
  207. ],
  208. "card_serial_number": "MT2234420968",
  209. "pci_slot": "0000:04:00.2",
  210. "pci_vendor_info": "15b3:1016",
  211. "pf_mac_address": "1e:38:96:af:a0:55",
  212. "physical_network": "physnet1",
  213. "vf_num": "1",
  214. "spoof": "true"
  215. }
  216.  
  217.  
  218. 4, delete spoof
  219.  
  220. $ cat <<EOF > sriov-port-delete-spoof.yamloof.yaml
  221. heat_template_version: 2015-10-15
  222. parameters:
  223. sriov_net:
  224. type: string
  225. default: private
  226. resources:
  227. sriov_port:
  228. type: OS::Neutron::Port
  229. properties:
  230. name: heat-sriov-port1
  231. network: { get_param: sriov_net }
  232. value_specs:
  233. binding:profile:
  234. spoof: null
  235. EOF
  236. openstack stack update -t ./sriov-port-delete-spoof.yaml sriov-port-stack --wait
  237. [0.003s]2026-08-26 02:26:09Z [sriov-port-stack]: UPDATE_IN_PROGRESS Stack UPDATE started
  238. 2026-08-26 02:26:09Z [sriov-port-stack.sriov_port]: UPDATE_IN_PROGRESS state changed
  239. 2026-08-26 02:26:10Z [sriov-port-stack.sriov_port]: UPDATE_COMPLETE state changed
  240. 2026-08-26 02:26:10Z [sriov-port-stack]: UPDATE_COMPLETE Stack UPDATE completed successfully
  241. +---------------------+--------------------------------------+
  242. | Field | Value |
  243. +---------------------+--------------------------------------+
  244. | id | 057739a8-3783-4914-b93c-0633d8b8b2be |
  245. | stack_name | sriov-port-stack |
  246. | description | No description |
  247. | creation_time | 2026-08-26T02:07:18Z |
  248. | updated_time | 2026-08-26T02:26:09Z |
  249. | stack_status | UPDATE_COMPLETE |
  250. | stack_status_reason | Stack UPDATE completed successfully |
  251. +---------------------+--------------------------------------+
  252.  
  253. $ openstack port show heat-sriov-port1 -f json | jq '.binding_profile'
  254. {
  255. "capabilities": [
  256. "switchdev"
  257. ],
  258. "card_serial_number": "MT2234420968",
  259. "pci_slot": "0000:04:00.2",
  260. "pci_vendor_info": "15b3:1016",
  261. "pf_mac_address": "1e:38:96:af:a0:55",
  262. "physical_network": "physnet1",
  263. "vf_num": "1"
  264. }
  265.  
  266.  
  267. 5, modify vf_num to 0, and add spoof=true again, and delete card_serial_number
  268.  
  269. $ cat <<EOF > sriov-port-delete-spoof.yamloof.yaml
  270. heat_template_version: 2015-10-15
  271. parameters:
  272. sriov_net:
  273. type: string
  274. default: private
  275. resources:
  276. sriov_port:
  277. type: OS::Neutron::Port
  278. properties:
  279. name: heat-sriov-port1
  280. network: { get_param: sriov_net }
  281. value_specs:
  282. binding:profile:
  283. vf_num: '0'
  284. spoof: 'true'
  285. card_serial_number: null
  286. EOF
  287. openstack stack update -t ./sriov-port-delete-spoof.yaml sriov-port-stack --wait
  288. [0.003s]2026-08-26 02:27:04Z [sriov-port-stack]: UPDATE_IN_PROGRESS Stack UPDATE started
  289. 2026-08-26 02:27:04Z [sriov-port-stack.sriov_port]: UPDATE_IN_PROGRESS state changed
  290. 2026-08-26 02:27:05Z [sriov-port-stack.sriov_port]: UPDATE_COMPLETE state changed
  291. 2026-08-26 02:27:05Z [sriov-port-stack]: UPDATE_COMPLETE Stack UPDATE completed successfully
  292. +---------------------+--------------------------------------+
  293. | Field | Value |
  294. +---------------------+--------------------------------------+
  295. | id | 057739a8-3783-4914-b93c-0633d8b8b2be |
  296. | stack_name | sriov-port-stack |
  297. | description | No description |
  298. | creation_time | 2026-08-26T02:07:18Z |
  299. | updated_time | 2026-08-26T02:27:04Z |
  300. | stack_status | UPDATE_COMPLETE |
  301. | stack_status_reason | Stack UPDATE completed successfully |
  302. +---------------------+--------------------------------------+
  303.  
  304.  
  305. $ openstack port show heat-sriov-port1 -f json | jq '.binding_profile'
  306. {
  307. "capabilities": [
  308. "switchdev"
  309. ],
  310. "card_serial_number": "MT2234420968",
  311. "pci_slot": "0000:04:00.2",
  312. "pci_vendor_info": "15b3:1016",
  313. "pf_mac_address": "1e:38:96:af:a0:55",
  314. "physical_network": "physnet1",
  315. "vf_num": "0",
  316. "spoof": "true"
  317. }
  318.  
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment