Restore o-hm port
Add script for restoring o-hm port in case of reboot.
Related-PROD: PROD-25286
Change-Id: I7f9651b6cbe39afce2ebd989aab582dbda643654
diff --git a/octavia/manager.sls b/octavia/manager.sls
index e5505c0..3723661 100644
--- a/octavia/manager.sls
+++ b/octavia/manager.sls
@@ -61,6 +61,7 @@
{%- set amp_hm_port_mac = port_mine_data[0]['octavia-health-manager-listen-port']['mac_address'] %}
{%- set amp_hm_port_id = port_mine_data[0]['octavia-health-manager-listen-port']['id'] %}
+{%- set amp_hm_port_ip = port_mine_data[0]['octavia-health-manager-listen-port']['fixed_ips'][0]['ip_address'] %}
health_manager_ovs_port:
cmd.run:
@@ -77,6 +78,23 @@
- require:
- cmd: health_manager_ovs_port
+ovs_port_o-hm0:
+ file.managed:
+ - name: /etc/network/interfaces.u/ifcfg-o-hm0
+ - makedirs: True
+ - source: salt://linux/files/ovs_port
+ - context:
+ port_name: o-hm0
+ port:
+ proto: static
+ bridge: br-int
+ ovs_port_type: ovs_port
+ address: {{ amp_hm_port_ip }}
+ netmask: 255.255.255.0
+ hwaddress: {{ amp_hm_port_mac }}
+ - template: jinja
+
+
health_manager_port_dhclient:
cmd.run:
- name: dhclient -v o-hm0 -cf {{ dhclient_conf_path }}