openstack security group create lb-health-mgr-sec-grp
openstack security group rule create --protocol udp --dst-port $OCTAVIA_HM_LISTEN_PORT lb-health-mgr-sec-grp
openstack security group rule create --protocol udp --dst-port $OCTAVIA_AMP_LOG_ADMIN_PORT lb-health-mgr-sec-grp
openstack security group rule create --protocol udp --dst-port $OCTAVIA_AMP_LOG_TENANT_PORT lb-health-mgr-sec-grp
MGMT_PORT_ID=$(openstack port create --security-group lb-health-mgr-sec-grp --device-owner Octavia:health-mgr --host=j12-d05-07 -c id -f value --network lb-mgmt-net octavia-health-manager-standalone-listen-port)
MGMT_PORT_MAC=$(openstack port show -c mac_address -f value $MGMT_PORT_ID)
hard to reproduce....
The procedure:
enable_octavia
and run Kolla deploy all-in-one.
After that, create Octavia network:
OCTAVIA_ MGMT_SUBNET= 192.168. 100.0/24 MGMT_SUBNET_ START=192. 168.100. 2 MGMT_SUBNET_ END=192. 168.100. 254 MGMT_SUBNET --allocation-pool start=$ OCTAVIA_ MGMT_SUBNET_ START,end= $OCTAVIA_ MGMT_SUBNET_ END --network lb-mgmt-net lb-mgmt-subnet
OCTAVIA_
OCTAVIA_
openstack network create lb-mgmt-net
openstack subnet create --subnet-range $OCTAVIA_
openstack security group create lb-mgmt-sec-grp
openstack security group rule create --protocol icmp lb-mgmt-sec-grp
openstack security group rule create --protocol tcp --dst-port 22 lb-mgmt-sec-grp
openstack security group rule create --protocol tcp --dst-port 9443 lb-mgmt-sec-grp
OCTAVIA_ HM_LISTEN_ PORT=5555 AMP_LOG_ ADMIN_PORT= 10514 AMP_LOG_ TENANT_ PORT=20514
OCTAVIA_
OCTAVIA_
openstack security group create lb-health- mgr-sec- grp HM_LISTEN_ PORT lb-health- mgr-sec- grp AMP_LOG_ ADMIN_PORT lb-health- mgr-sec- grp AMP_LOG_ TENANT_ PORT lb-health- mgr-sec- grp
openstack security group rule create --protocol udp --dst-port $OCTAVIA_
openstack security group rule create --protocol udp --dst-port $OCTAVIA_
openstack security group rule create --protocol udp --dst-port $OCTAVIA_
MGMT_PORT_ ID=$(openstack port create --security-group lb-health- mgr-sec- grp --device-owner Octavia:health-mgr --host=j12-d05-07 -c id -f value --network lb-mgmt-net octavia- health- manager- standalone- listen- port)
MGMT_PORT_ MAC=$(openstack port show -c mac_address -f value $MGMT_PORT_ID)
MGMT_PORT_ IP=$(openstack port show -f yaml -c fixed_ips $MGMT_PORT_ID | awk -v IP_VER= $SERVICE_ IP_VERSION '{FS=", |";gsub( ",","") ;gsub(" '\''"," ");for( line = 1; line <= NF; ++line) {if ($line ~ /^.*- ip_address:/) {split($line, word, " ");if ((IP_VER == "4" || IP_VER == "") && word[3] ~ /\./) print word[3];if (IP_VER == "6" && word[3] ~ /:/) print word[3];} else {split($line, word, " ");for(ind in word) {if (word[ind] ~ /^ip_address=/) {split(word[ind], token, "=");if ((IP_VER == "4" || IP_VER == "") && token[2] ~ /\./) print token[2];if (IP_VER == "6" && token[2] ~ /:/) print token[2];}}}}}')
# jump to the container ovs_vswitchd ids:iface- status= active -- set Interface o-hm0 external- ids:attached- mac=$MGMT_ PORT_MAC -- set Interface o-hm0 external- ids:iface- id=$MGMT_ PORT_ID -- set Interface o-hm0 external- ids:skip_ cleanup= true
ovs-vsctl -- --may-exist add-port br-int o-hm0 -- set Interface o-hm0 type=internal -- set Interface o-hm0 external-
# Then dhcpclient : change to outside docker
sudo ip link set dev o-hm0 address $MGMT_PORT_MAC
sudo dhclient -v o-hm0