Skip to content

Commit

Permalink
northd: Support an option to ignore chassis features.
Browse files Browse the repository at this point in the history
Add option ignore_chassis_features for northd to bypass the support
status of features on each chassis and to directly implement the latest
features.

This is particularly useful for users who follow the suggested upgrade
order that upgrades ovn-controllers before ovn-northd, and want to
safeguard the operation of northd from being adversely affected by a
mismatched configuration of a chassis. This not only avoids feature
degradation but can also avoid risks of any broken feature in backward
compatible mode. An example of such impact is discussed at [0].

[0] https://mail.openvswitch.org/pipermail/ovs-dev/2023-September/407756.html

Signed-off-by: Han Zhou <hzhou@ovn.org>
Acked-by: Ales Musil <amusil@redhat.com>
  • Loading branch information
hzhou8 committed Sep 7, 2023
1 parent d50ee1b commit d1e43a9
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 7 deletions.
25 changes: 18 additions & 7 deletions northd/northd.c
Original file line number Diff line number Diff line change
Expand Up @@ -17058,6 +17058,17 @@ destroy_datapaths_and_ports(struct ovn_datapaths *ls_datapaths,
ovn_datapaths_destroy(lr_datapaths);
}

static void
northd_enable_all_features(struct northd_data *data)
{
data->features = (struct chassis_features) {
.ct_no_masked_label = true,
.mac_binding_timestamp = true,
.ct_lb_related = true,
.fdb_timestamp = true,
};
}

void
northd_init(struct northd_data *data)
{
Expand All @@ -17068,12 +17079,7 @@ northd_init(struct northd_data *data)
hmap_init(&data->lbs);
hmap_init(&data->lb_groups);
ovs_list_init(&data->lr_list);
data->features = (struct chassis_features) {
.ct_no_masked_label = true,
.mac_binding_timestamp = true,
.ct_lb_related = true,
.fdb_timestamp = true,
};
northd_enable_all_features(data);
data->ovn_internal_version_changed = false;
sset_init(&data->svc_monitor_lsps);
data->change_tracked = false;
Expand Down Expand Up @@ -17192,7 +17198,12 @@ ovnnb_db_run(struct northd_input *input_data,
false);
use_common_zone = smap_get_bool(&nb->options, "use_common_zone", false);

build_chassis_features(input_data->sbrec_chassis_table, &data->features);
if (smap_get_bool(&nb->options, "ignore_chassis_features", false)) {
northd_enable_all_features(data);
} else {
build_chassis_features(input_data->sbrec_chassis_table,
&data->features);
}

init_debug_config(nb);

Expand Down
23 changes: 23 additions & 0 deletions ovn-nb.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,29 @@
</column>
</group>

<column name="options" key="ignore_chassis_features">
<p>
When set to <code>false</code>, the <code>ovn-northd</code> will
evaluate the features supported by each chassis and will only
activate features that are universally supported by all chassis. This
approach is crucial for maintaining backward compatibility during an
upgrade when the <code>ovn-northd</code> is updated prior to the
<code>ovn-controller</code>. However, if any chassis is poorly
managed and the upgrade is unsuccessful, it will restrict
<code>ovn-northd</code> from activating the new features.
</p>
<p>
Alternatively, setting this option to <code>true</code> instructs
<code>ovn-northd</code> to bypass the support status of features on
each chassis and to directly implement the latest features. This
approach safeguards the operation of <code>ovn-northd</code> from
being adversely affected by a mismatched configuration of a chassis.
</p>
<p>
The default setting for this option is <code>false</code>.
</p>
</column>

<column name="options" key="mac_prefix">
Configure a given OUI to be used as prefix when L2 address is
dynamically assigned, e.g. <code>00:11:22</code>
Expand Down

0 comments on commit d1e43a9

Please sign in to comment.