Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.9] Bug 2089763: configure-ovs: persist profiles after auto-connect has been set #3183

Merged
merged 1 commit into from
Jun 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions templates/common/_base/files/configure-ovs-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ contents:
}

persist_nm_conn_files() {
update_nm_conn_files br-ex phys0
copy_nm_conn_files "$NM_CONN_UNDERLAY"
if [ -f "$extra_bridge_file" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

I had a doubt about how bash behaves and if $extra_bridge_file would be available here given that the variable is defined way below but it clearly works:

  1 #!/bin/bash
  2 
  3 function test_function {
  4     echo "Foo is: $foo"
  5 }
  6 
  7 foo=bla
  8 test_function
[akaris@linux ~]$ bash -x test.sh
+ foo=bla
+ test_function
+ echo 'Foo is: bla'
Foo is: bla

update_nm_conn_files br-ex1 phys1
copy_nm_conn_files "$NM_CONN_UNDERLAY"
fi
}

update_nm_conn_files() {
Expand Down Expand Up @@ -326,8 +331,6 @@ contents:
fi

configure_driver_options "${iface}"
update_nm_conn_files "$bridge_name" "$port_name"
persist_nm_conn_files
}

# Used to remove a bridge
Expand Down Expand Up @@ -587,6 +590,7 @@ contents:
activate_nm_conn ovs-if-phys1
activate_nm_conn ovs-if-br-ex1
fi
persist_nm_conn_files
elif [ "$1" == "OpenShiftSDN" ]; then
# Revert changes made by /usr/local/bin/configure-ovs.sh during SDN migration.
rollback_nm
Expand Down