*Hi Dumitru!*

I’ve sent the required patch. Just wanted to clarify: I didn’t add 
explicit tests for the availability zone bc:

 1.

    *Northd’s logic already prevents it* – The code ensures users can’t
    create a remote service monitor with a null |az| name (this is
    covered by an existing test: ip_port_mappings validation in
    ovn-northd tests).

 2.

    Even if the |az| name is somehow removed from the service monitor
    options later, northd will restore it.

Let me know if you’d like any adjustments! thanks for the review again!


On 19.08.2025 11:30, Alexandra Rukomoinikova wrote:
> Signed-off-by: Alexandra Rukomoinikova <arukomoinikova@k2.cloud>
> ---
>   ic/ovn-ic.c | 13 +++++++------
>   1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/ic/ovn-ic.c b/ic/ovn-ic.c
> index cfdbd4b40..fa4a6b118 100644
> --- a/ic/ovn-ic.c
> +++ b/ic/ovn-ic.c
> @@ -2329,8 +2329,8 @@ create_pushed_svcs_mon(struct ic_context *ctx,
>       const struct sbrec_service_monitor *sb_rec;
>       SBREC_SERVICE_MONITOR_FOR_EACH_EQUAL (sb_rec, key,
>           ctx->sbrec_service_monitor_by_local_type) {
> -        const char *target_az_name = smap_get_def(&sb_rec->options,
> -                                                  "az-name", "");
> +        const char *target_az_name = smap_get(&sb_rec->options,
> +                                              "az-name");
>           if (!target_az_name) {
>               continue;
>           }
> @@ -2493,13 +2493,14 @@ create_service_monitor_data(struct ic_context *ctx,
>   {
>       const struct sbrec_sb_global *ic_sb = sbrec_sb_global_first(
>                                                   ctx->ovnsb_idl);
> -    const char *svc_monitor_mac = smap_get_def(&ic_sb->options,
> -        "svc_monitor_mac", "");
> +    const char *svc_monitor_mac = smap_get(&ic_sb->options,
> +                                           "svc_monitor_mac");
>   
> -    if (svc_monitor_mac) {
> -        sync_data->prpg_svc_monitor_mac = xstrdup(svc_monitor_mac);
> +    if (!svc_monitor_mac) {
> +        return;
>       }
>   
> +    sync_data->prpg_svc_monitor_mac = xstrdup(svc_monitor_mac);
>       create_pushed_svcs_mon(ctx, &sync_data->pushed_svcs_map);
>       create_synced_svcs_mon(ctx, &sync_data->synced_svcs_map);
>       create_local_ic_svcs_map(ctx, &sync_data->local_ic_svcs_map);


-- 
regards,
Alexandra.

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to