{"id":154,"date":"2015-02-28T15:38:04","date_gmt":"2015-02-28T07:38:04","guid":{"rendered":"http:\/\/140.128.102.245\/wordpress\/?p=154"},"modified":"2015-08-14T07:00:54","modified_gmt":"2015-08-13T23:00:54","slug":"neutron-ha","status":"publish","type":"post","link":"https:\/\/blog.laszlo.tw\/?p=154","title":{"rendered":"Neutron HA"},"content":{"rendered":"<p><!--more--><\/p>\n<p><span style=\"color: #0000ff;\">===============HA Neutron\u8a2d\u5b9a=======================<\/span><\/p>\n<p>\/etc\/neutron\/neutron.conf<\/p>\n<p>[Default]<\/p>\n<p>l3_ha = True\u00a0 \u958b\u555fha\u529f\u80fd<\/p>\n<p>dhcp_agents_per_network = 2 \u5b9a\u7fa9\u7db2\u8def\u4e2ddhcp agent\u6578\u91cf<\/p>\n<p><span style=\"color: #0000ff;\">===============\u4ee5\u4e0b\u5728Controller\u57f7\u884c=======================<\/span><\/p>\n<p>neutron router-create &#8211;tenant-id $(keystone tenant-list | awk &#8216;\/admin\/ {print $2}&#8217;) &#8211;ha True ha-router \u5efa\u7acbha router<\/p>\n<p>neutron router-interface-add\u00a0ha-router demo-subnet<\/p>\n<p>neutron router-gateway-set\u00a0ha-router ext-net<\/p>\n<p>\u63a5\u4e0a\u5167\u90e8NAT \u4ee5\u53ca Gateway<\/p>\n<p>neutron l3-agent-list-hosting-router ha-router \u78ba\u8a8d\u5099\u63f4\u5217\u8868<\/p>\n<p>net\u8207subnet \u6703\u81ea\u52d5\u5efa\u7acb HA network tenant \u7528\u65bcrouter\u9593\u6e9d\u901a<\/p>\n<p>for port_id in $(neutron port-list | awk &#8216;\/HA port\/ {print $2}&#8217;); do neutron port-show ${port_id}; done\u00a0 \u7528\u65bc\u67e5\u770brouter\u9593\u8a73\u7d30\u6e9d\u901a\u72c0\u6cc1<\/p>\n<p><span style=\"color: #0000ff;\">============Network Node============<\/span><\/p>\n<p>\/var\/lib\/neutron\/ha_confs\/<span style=\"color: #ff0000;\"><strong>ROUTER_ID <\/strong><br \/>\n<\/span><\/p>\n<p>keepalived.conf \u6709\u8a73\u7d30router IP\u8207interface\u8cc7\u8a0a<\/p>\n<p>(\u53ef\u4ee5\u8207ip netns\u00a0<span style=\"color: #000000;\">exec<\/span> <span style=\"color: #ff0000;\"><strong>ROUTER_ID<\/strong> <span style=\"color: #000000;\">ip addr \u505a\u6bd4\u5c0d)<\/span><\/span><\/p>\n<p>state \u7576\u524drouter\u72c0\u614b backup or master<\/p>\n<p>\u53c3\u8003\u8cc7\u6599<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"dgTJPFRebu\"><p><a href=\"https:\/\/assafmuller.com\/2014\/08\/16\/layer-3-high-availability\/\">Layer 3 High&nbsp;Availability<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Layer 3 High&nbsp;Availability&#8221; &#8212; Assaf Muller\" src=\"https:\/\/assafmuller.com\/2014\/08\/16\/layer-3-high-availability\/embed\/#?secret=iqf5iyVsrd#?secret=dgTJPFRebu\" data-secret=\"dgTJPFRebu\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p><iframe loading=\"lazy\" title=\"L3HA-VRRP-20141201\" src=\"https:\/\/www.slideshare.net\/slideshow\/embed_code\/key\/DE3rCF0lCzIWGE\" width=\"427\" height=\"356\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;\" allowfullscreen> <\/iframe> <\/p>\n<div style=\"margin-bottom:5px\"> <strong> <a href=\"https:\/\/www.slideshare.net\/orimanabu\/l3-ha-vrrp20141201\" title=\"L3HA-VRRP-20141201\" target=\"_blank\">L3HA-VRRP-20141201<\/a> <\/strong> from <strong><a href=\"https:\/\/www.slideshare.net\/orimanabu\" target=\"_blank\">Manabu Ori<\/a><\/strong> <\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-154","post","type-post","status-publish","format-standard","hentry","category-openstack","entry"],"_links":{"self":[{"href":"https:\/\/blog.laszlo.tw\/index.php?rest_route=\/wp\/v2\/posts\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.laszlo.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.laszlo.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.laszlo.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.laszlo.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=154"}],"version-history":[{"count":13,"href":"https:\/\/blog.laszlo.tw\/index.php?rest_route=\/wp\/v2\/posts\/154\/revisions"}],"predecessor-version":[{"id":232,"href":"https:\/\/blog.laszlo.tw\/index.php?rest_route=\/wp\/v2\/posts\/154\/revisions\/232"}],"wp:attachment":[{"href":"https:\/\/blog.laszlo.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.laszlo.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.laszlo.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}