Skip to content

Instantly share code, notes, and snippets.

@flavio-fernandes
Created January 8, 2021 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flavio-fernandes/f6fdd6cdce461c5e7ba07bedfbc23750 to your computer and use it in GitHub Desktop.
Save flavio-fernandes/f6fdd6cdce461c5e7ba07bedfbc23750 to your computer and use it in GitHub Desktop.
output of fw.sh with openstack ml2/ovn
ref: https://gist.github.com/flavio-fernandes/863e48f012b7975e1d46c896b262dfc9
vagrant@stack:~$ bash /vagrant/fw.sh
WARNING: setting legacy OS_TENANT_NAME to support cli tools.
+/vagrant/fw_2.sh:main:10 set -o errexit
+/vagrant/fw_2.sh:main:12 openstack server create --nic net-id=private,v4-fixed-ip=10.0.0.10 --flavor m1.nano --image 438ab721-342d-47b9-8e30-4158f39a18ee --key-name demo d
+-------------------------------------+-----------------------------------------------------------------+
| Field | Value |
+-------------------------------------+-----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-SRV-ATTR:host | None |
| OS-EXT-SRV-ATTR:hypervisor_hostname | None |
| OS-EXT-SRV-ATTR:instance_name | |
| OS-EXT-STS:power_state | NOSTATE |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | None |
| OS-SRV-USG:terminated_at | None |
| accessIPv4 | |
| accessIPv6 | |
| addresses | |
| adminPass | 75AmG6rYvadZ |
| config_drive | |
| created | 2021-01-08T15:14:04Z |
| flavor | m1.nano (42) |
| hostId | |
| id | 54bba400-f52d-40b3-bff8-8b9236fe91ac |
| image | cirros-0.5.1-x86_64-disk (438ab721-342d-47b9-8e30-4158f39a18ee) |
| key_name | demo |
| name | d |
| progress | 0 |
| project_id | 00de0aa650a7493ebf5dab7dea0dbed6 |
| properties | |
| security_groups | name='default' |
| status | BUILD |
| updated | 2021-01-08T15:14:04Z |
| user_id | ac1c7280bbb1442eb68ebb068b1c8d24 |
| volumes_attached | |
+-------------------------------------+-----------------------------------------------------------------+
+/vagrant/fw_2.sh:main:13 sleep 3
++/vagrant/fw_2.sh:main:13 openstack port list --server d -f value -c ID
+/vagrant/fw_2.sh:main:13 openstack port set --name dp 8f07806b-0f74-47cd-b8ab-ad0dcf82fd17
+/vagrant/fw_2.sh:main:15 openstack server create --nic net-id=private,v4-fixed-ip=10.0.0.11 --flavor m1.nano --image 438ab721-342d-47b9-8e30-4158f39a18ee --wait --key-name demo e
+-------------------------------------+-----------------------------------------------------------------+
| Field | Value |
+-------------------------------------+-----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | stack |
| OS-EXT-SRV-ATTR:hypervisor_hostname | stack.wt |
| OS-EXT-SRV-ATTR:instance_name | instance-00000002 |
| OS-EXT-STS:power_state | Running |
| OS-EXT-STS:task_state | None |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2021-01-08T15:14:17.000000 |
| OS-SRV-USG:terminated_at | None |
| accessIPv4 | |
| accessIPv6 | |
| addresses | private=10.0.0.11, fd51:4be0:5bf4:0:f816:3eff:fe50:d913 |
| adminPass | 7xue7BjV5EPb |
| config_drive | |
| created | 2021-01-08T15:14:13Z |
| flavor | m1.nano (42) |
| hostId | 90c8d54939ade397d1760eee7f004eb481eb91d23f683e7b34f2f9d3 |
| id | ce4f1b9a-47f2-40b1-9fcd-dd1d45ba1ff1 |
| image | cirros-0.5.1-x86_64-disk (438ab721-342d-47b9-8e30-4158f39a18ee) |
| key_name | demo |
| name | e |
| progress | 0 |
| project_id | 00de0aa650a7493ebf5dab7dea0dbed6 |
| properties | |
| security_groups | name='default' |
| status | ACTIVE |
| updated | 2021-01-08T15:14:18Z |
| user_id | ac1c7280bbb1442eb68ebb068b1c8d24 |
| volumes_attached | |
+-------------------------------------+-----------------------------------------------------------------+
+/vagrant/fw_2.sh:main:16 sleep 3
++/vagrant/fw_2.sh:main:16 openstack port list --server e -f value -c ID
+/vagrant/fw_2.sh:main:16 openstack port set --name ep 8151b8b7-69ff-4854-a82e-ac9ac63d2364
+/vagrant/fw_2.sh:main:18 FIP=172.24.4.8
+/vagrant/fw_2.sh:main:19 openstack floating ip create --floating-ip-address 172.24.4.8 public
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| created_at | 2021-01-08T15:14:27Z |
| description | |
| dns_domain | |
| dns_name | |
| fixed_ip_address | None |
| floating_ip_address | 172.24.4.8 |
| floating_network_id | bfbcc7c1-c0a6-4581-8afc-e1a9c7bf7fba |
| id | 6956adad-5fa2-4196-8e4e-07aa5bbd4f5f |
| name | 172.24.4.8 |
| port_details | None |
| port_id | None |
| project_id | 00de0aa650a7493ebf5dab7dea0dbed6 |
| qos_policy_id | None |
| revision_number | 0 |
| router_id | None |
| status | DOWN |
| subnet_id | None |
| tags | [] |
| updated_at | 2021-01-08T15:14:27Z |
+---------------------+--------------------------------------+
+/vagrant/fw_2.sh:main:20 openstack floating ip show 172.24.4.8
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| created_at | 2021-01-08T15:14:27Z |
| description | |
| dns_domain | |
| dns_name | |
| fixed_ip_address | None |
| floating_ip_address | 172.24.4.8 |
| floating_network_id | bfbcc7c1-c0a6-4581-8afc-e1a9c7bf7fba |
| id | 6956adad-5fa2-4196-8e4e-07aa5bbd4f5f |
| name | 172.24.4.8 |
| port_details | None |
| port_id | None |
| project_id | 00de0aa650a7493ebf5dab7dea0dbed6 |
| qos_policy_id | None |
| revision_number | 0 |
| router_id | None |
| status | DOWN |
| subnet_id | None |
| tags | [] |
| updated_at | 2021-01-08T15:14:27Z |
+---------------------+--------------------------------------+
++/vagrant/fw_2.sh:main:22 openstack floating ip show 172.24.4.8 -f value -c id
+/vagrant/fw_2.sh:main:22 FIP_UUID=6956adad-5fa2-4196-8e4e-07aa5bbd4f5f
+/vagrant/fw_2.sh:main:22 echo 6956adad-5fa2-4196-8e4e-07aa5bbd4f5f
6956adad-5fa2-4196-8e4e-07aa5bbd4f5f
+/vagrant/fw_2.sh:main:25 openstack floating ip port forwarding create --internal-ip-address 10.0.0.10 --internal-protocol-port 22 --port dp --external-protocol-port 2020 --protocol tcp 6956adad-5fa2-4196-8e4e-07aa5bbd4f5f
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| description | |
| external_port | 2020 |
| id | 44e37695-70bf-4994-ac56-641f3a26080c |
| internal_ip_address | 10.0.0.10 |
| internal_port | 22 |
| internal_port_id | 8f07806b-0f74-47cd-b8ab-ad0dcf82fd17 |
| name | None |
| project_id | |
| protocol | tcp |
+---------------------+--------------------------------------+
++/vagrant/fw_2.sh:main:29 openstack floating ip port forwarding list 6956adad-5fa2-4196-8e4e-07aa5bbd4f5f -f value -c 'Internal IP Address' -c ID
++/vagrant/fw_2.sh:main:29 cut '-d ' -f1
++/vagrant/fw_2.sh:main:29 grep 10.0.0.10
+/vagrant/fw_2.sh:main:29 PF_ID=44e37695-70bf-4994-ac56-641f3a26080c
+/vagrant/fw_2.sh:main:29 echo 44e37695-70bf-4994-ac56-641f3a26080c
44e37695-70bf-4994-ac56-641f3a26080c
+/vagrant/fw_2.sh:main:31 openstack floating ip show 172.24.4.8
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| created_at | 2021-01-08T15:14:27Z |
| description | |
| dns_domain | |
| dns_name | |
| fixed_ip_address | None |
| floating_ip_address | 172.24.4.8 |
| floating_network_id | bfbcc7c1-c0a6-4581-8afc-e1a9c7bf7fba |
| id | 6956adad-5fa2-4196-8e4e-07aa5bbd4f5f |
| name | 172.24.4.8 |
| port_details | None |
| port_id | None |
| project_id | 00de0aa650a7493ebf5dab7dea0dbed6 |
| qos_policy_id | None |
| revision_number | 1 |
| router_id | 1b7c35a3-f5a1-4997-b755-bff64d42901b |
| status | DOWN |
| subnet_id | None |
| tags | [] |
| updated_at | 2021-01-08T15:14:33Z |
+---------------------+--------------------------------------+
+/vagrant/fw_2.sh:main:32 openstack floating ip port forwarding list 6956adad-5fa2-4196-8e4e-07aa5bbd4f5f
+--------------------------------------+--------------------------------------+---------------------+---------------+---------------+----------+-------------+
| ID | Internal Port ID | Internal IP Address | Internal Port | External Port | Protocol | Description |
+--------------------------------------+--------------------------------------+---------------------+---------------+---------------+----------+-------------+
| 44e37695-70bf-4994-ac56-641f3a26080c | 8f07806b-0f74-47cd-b8ab-ad0dcf82fd17 | 10.0.0.10 | 22 | 2020 | tcp | |
+--------------------------------------+--------------------------------------+---------------------+---------------+---------------+----------+-------------+
+/vagrant/fw_2.sh:main:34 echo ok
ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment